Repository navigation
Ask Dave: verify reply claims instead of exact phrasing so the voice actually speaks - #19
Conversation
A reply sentence that does not match a fixed phrase is now accepted when every claim in it checks out against the selected evidence: invoice IDs, amounts (bound to their invoice or budget field), counts (with owner synonyms such as waiting/unpaid/outstanding/pending = queued+proposed+pending), outcome words, pause and policy state, and exact glossary reasons. Remaining words must come from a fixed connective/friendly vocabulary, so assessments, causes, promises, actions, URLs and @ still drop the reply. - chat: no fixed phrase list; no digits, IDs, outcome/vault-state words, assessments, actions or URLs - no_record beside other keys is ignored - "<ID> was blocked because <exact glossary meaning>", and a next-step sentence inherits the previous sentence's invoice ID - activity count line adds "Waiting to be paid: N" - COUNTERSIGN_ASK_DEBUG also prints the dropped reply text Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…voice card
- reasoning_effort:'low' (NEAR AI ignores 'none', enable_thinking and
thinking:{type:'disabled'}; 'low' drops reasoning to ~1 token)
- the model sees the 10 most recent invoices plus any named in the question;
code still renders and verifies from the full facts pack
- help:spot-bad-invoice how-to card, routed for faulty/fake/scam questions
- "current" accepted as connective wording in replies
"how is my agent doing?" on the current vault: 25.3 s -> 3.7 s, reply shown.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Update: speed + spot-bad-invoice card (commit on this branch)Reasoning off. I probed NEAR AI with
Less evidence to the model. The model now sees the 10 most recent invoices plus any invoice named in the question. Code still renders and verifies answers from the full facts pack, and the report card still lists every bill. Timing (same question, same vault,
The new debug line showed the earlier drop was caused only by the word "current", which is now accepted.
Tests: |
…it found
- agent/ask/battery.json: 30 real-owner questions incl. typos and off-script
- scripts/ask-battery.ts: live run, table of direct / facts only / refused /
error with time; saves raw selections to work/ask-battery-last.json
- verifier: supplier amounts bound to the supplier, flag phrases and flag
counts bound to the invoice, IDs listed by a selected record, "it"/"this"
in glossary text, help-card commands and the card's own words
- owner "pending" no longer accepts the strict pending count ("0 pending"
while 12 wait was misleading); a leading Yes/No is never accepted
- debug reason names the failing claim and sentence
First run: 12/30 direct, 2.8 s median; one misleading reply, now rejected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Acceptance battery: run 2 (
|
| # | Question | Result | Time |
|---|---|---|---|
| 1 | hi dave | direct | 3.1 s |
| 2 | how are you | direct | 4.6 s |
| 3 | how many pending invoices do I have | direct | 2.9 s |
| 4 | what's waiting | direct | 26.0 s |
| 5 | did beans get paid | facts only | 1.3 s |
| 6 | why is milk blocked | facts only | 1.9 s |
| 7 | how do I know if an invoice is fake | direct | 1.3 s |
| 8 | can I pay 1 NEAR now | facts only | 1.4 s |
| 9 | what happened today | facts only | 7.1 s |
| 10 | who did I pay most | facts only | 52.4 s |
| 11 | is anything weird | facts only | 3.6 s |
| 12 | how do I raise my limit | direct | 4.0 s |
| 13 | why isn't anything paying | facts only | 6.1 s |
| 14 | hw many bills r blokced | direct | 2.9 s |
| 15 | wats my budget left | facts only | 5.6 s |
| 16 | is my vault paused? | facts only | 1.6 s |
| 17 | how much is in the vault | direct | 0.9 s |
| 18 | thanks dave | direct | 1.1 s |
| 19 | any problems with pastry co? | facts only | 16.1 s |
| 20 | how many have been paid so far | direct | 2.2 s |
| 21 | why was INV-PASTRY-02-b52ef8a9 blocked? | direct | 5.5 s |
| 22 | how is my agent doing? | direct | 7.8 s |
| 23 | what are my current rules? | facts only | 2.7 s |
| 24 | how do i pause payments | direct | 1.4 s |
| 25 | whats going on with my bills lol | facts only | 2.3 s |
| 26 | can you pay milk for me | facts only | 2.5 s |
| 27 | how much did i spend this week | facts only | 6.2 s |
| 28 | is INV-BEANS-02-b52ef8a9 a duplicate? | facts only | 2.6 s |
| 29 | yo dave whats up | direct | 2.9 s |
| 30 | what's the weather tomorrow | refused (correct) | 2.2 s |
Why the other 15 drop. Almost every dropped reply adds an unchecked inference:
- causal "so …" ("so yes", "so that isn't the cause", "so renew it", "so no single supplier was paid most");
- a leading "Yes";
- a paraphrased reason ("blocked because the spending policy expired" instead of the glossary text).
These are the claims the safety rule exists to stop. A check against the saved selections shows that cutting only the unverified sentences would reach about 19/30: still below 24.
Reaching 24 would mean accepting model-written causes and yes/no answers, which would weaken the rule. I have not made that change.
A reply is checked sentence by sentence. Sentences whose every claim checks out are shown in order; unverified ones (model-written causes, "Yes", paraphrased reasons) are cut and listed in COUNTERSIGN_ASK_DEBUG output. A greeting left on its own is not shown, a next step whose invoice sentence was cut is cut too, and small talk is still all-or-nothing. The safety rule is unchanged: nothing shown contains an unchecked claim. Offline replay of battery run 2's saved selections: 14/30 -> 19/30 direct. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sentence trimmingA reply is now checked sentence by sentence:
The safety rule is unchanged: nothing shown contains an unchecked claim. Offline replay of battery run 2's saved model answers (no new calls): 14/30 → 19/30 answered directly. The five new replies:
Tests: |
Found in hands-on testing. Verification and the model call are unchanged; only code-written cards, computed facts and their reply phrasings. - help:policy and help:renew point to "Your rules" on the demo website (no longer CLI-only). - New computed fact "runway": vault available / rolling daily budget, exact BigInt, rounded down with the remainder. No policy, expired rules and a zero budget are said plainly, with the matching card below. - "What fits" now reads "Today you can still pay N more bills of X. Your daily budget (R left) runs out before your vault (A) does." Same numbers; earlier phrasings stay accepted. - New help:stablecoin (1Click lab preview, no money moves) and help:fees. Fees checked in the contract: authorize, reserve and execute are executor-only calls signed by the executor account, which prepays gas; the vault's available balance and policy usage move only by the invoice amount. - help:resume adds the expired-invoice and expired-rules next steps. - New no-answer text, exported so the battery script stays in sync. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Why
Ask Dave's conversational reply was dropped on nearly every question. For example, "hi dave" was dropped as "not supported small talk", and "how many pending invoices do I have" was dropped even though the facts were right. The verifier only accepted replies built from fixed phrase patterns.
Safety rule: unchanged
Every factual claim in a reply is still checked against the selected evidence. That covers every invoice ID, amount, count, outcome word, pause state, policy state and reason. Any claim that can't be verified drops the reply, and the owner sees the code-rendered facts exactly as before. What changed is the wording around verified claims: it no longer has to be one of a fixed set of phrases.
What changed (
agent/ask/voice.ts,agent/ask/answer.ts)@are rejected too.pendingcount is also accepted);no_recordis ignored when other keys are selected;COUNTERSIGN_ASK_DEBUG=1now also prints the dropped reply text (stderr only; the owner never sees it).The SYSTEM prompt now:
activity(fitstays for "how many payments can I make");Tests
npm run test:ask: 48/48. Two new tests cover:deepEqualin "How is my agent doing?", which now ends with "Waiting to be paid: 0."npm run test:ask:sandbox: 1/1.npm test: 11/11.npm run test:app: 61/61.Live (current agent vault, 4 model calls,
COUNTERSIGN_ASK_DEBUG=1)This ran before the last two changes (debug reply text, and a count carrying over to "queued and waiting"). Vault: 18 bills (12 queued, 3 paid, 3 blocked).
Only 1 of 4 replies was shown live. The old debug line didn't include the rejected text, so I couldn't see which claim failed. That's why debug now prints it. A follow-up live run (4 calls) is needed to see the exact dropped text and tune the vocabulary. Don't merge before that.
🤖 Generated with Claude Code