Repository navigation
Recognise loose fact phrasings and reuse the wallet the asker just typed - #110
Merged
Merged
Conversation
Four misses from one production DM: - "Guarde na sua memoria que eu quero os meus valores em reais brasileiro" saved nothing. Accept remember wrappers (guarde/grave/anote/lembre/salve na sua memória que, remember that), "quero (ver) os (meus) valores em X", and the real in every number and gender. - "Oque vide sabe sobre mim ?" went to the corpus. "o que <word> sabe sobre mim" / "what do <word> know about me" now shows the asker's facts when the word is "você" in any spelling or a short lowercase typo of it; names and other pronouns are excluded. - "Você sabe qual é a moeda do meu país ?" went to the corpus. It and its variants show the preferred currency; with none saved the reply says how to save one. - A DeFi follow-up asked "Qual carteira?" right after the asker typed one, and "A carteira que eu acabei de passar" was searched for. A chain route with no typed, carried or saved address now uses the latest address the asker typed in their own remembered turns at this location (logged as asker_typed), and a bare pointer back at a wallet re-asks the latest chain question with it. Alerts get the same fallback. The chain call budget is keyed per question as well as per address so that follow-up is not refused as the earlier run calling again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes four misses from one production DM (Portuguese).
Bugs
Guarde na sua memoria que eu quero os meus valores em reais brasileiro— not recognised, went to the corpus.Oque vide sabe sobre mim ?— typo of "você", went to the corpus.Você sabe qual é a moeda do meu país ?— went to the corpus.verifique as pools de liquidez nesta wallet 0xB26B…45e0, a follow-up was answered "Qual carteira?", andA carteira que eu acabei de passarwas searched for in the corpus.Fixes
guarde/grave/anote/lembre/salve (na sua memória) que,remember that) before any fact statement;(eu) quero (ver) os (meus) valores em X; BRL aliases in every number/gender (reais brasileiro,real brasileiros,brazilian reals). Existing false-positive guards kept and extended (quanto é 100 reais em dólar?,quero trocar 100 reais em dólar, ...).o que/oque/oq <one word> sabe sobre mimandwhat do <one word> know about mewhen the word is "você"/vc/tu/u or a short lowercase typo; capitalised names and other pronouns (o que o João…,o que ele…) do not show the asker's facts.Você sabe qual …/do you know what …before a named fact.qual a moeda do meu país,qual a minha moeda de base,what's the currency of my country,which currency do I useshowpreferred_currency; with none saved the reply (EN/PT) says so and suggestsminha moeda é o real.asker_typed. Another person's message, retrieved content, answers and other locations are never sources. A bare pointer back (a carteira que eu acabei de passar,essa carteira,the wallet I just gave you) re-asks the latest chain question with that address; with no address typed it asks for one (never the saved wallet).Tests
tests/unit/test_facts_and_wallet_follow_up.py: the exact production sentences, variants, false-positive guards, follow-up routing, alert fallback; budget regression intest_defi_positions.py.tests/e2e/test_facts_and_wallet_follow_up.py: DM transcript (save, show, currency with and without a saved value), DM follow-ups read the typed wallet, channel follow-up uses the channel-typed address, and an address only in another person's message, the corpus, or the asker's DM is never read in the channel.fix-facts-and-wallet-follow-up(validates strict).