Skip to content

feat(assistant): read dictated turns against a project/session vocabulary - #695

Merged
thedancingdeveloper merged 1 commit into
mainfrom
feat/assistant-dictation-vocabulary
Sep 11, 2026
Merged

thedancingdeveloper merged 1 commit into
mainfrom
feat/assistant-dictation-vocabulary

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Contributor

What

On the phone, spoken requests reach the assistant already garbled — the on-device recognizer mangles domain words it has never heard. From a live transcript on dev:

Said Transcribed Assistant's reply
check Komodo on Node B "check komodo on nude b" "I'm not sure what 'on nude b' means."
start a new shell here and check Komodo "start a new show here and check Kardashian" "I'm not sure what you want me to start or check."

The model was asking the user to say it exactly — impossible, since they did say it right and the recognizer wrote it wrong.

Changes

  • Prompt: states turns are dictated; the model reads a garbled sentence against a vocabulary and the conversation, acts on the clearly-likeliest reading or asks one short question that states that reading, and never demands exact words.
  • <vocabulary> note: a second system message each voice turn — projects: … (slugs the core knows) and sessions: … (live roster). Built only for turns carrying a recognized utterance (typed turns weren't misheard, and this spares them a project.list round trip). Project slugs are fetched once and cached for VOCABULARY_TTL (5 min).
  • Safety: the names are wrapped in <vocabulary> and defanged like every other core-derived string; the prompt names the new delimiter as untrusted, so the two source-scanning prompt tests still pass.
  • Test seam: the stub core gained .answer(tool, text) for canned tools/call results, used by the new end-to-end vocabulary tests.

Verified

cargo fmt, clippy -D warnings, and the full assistant:: + vogt_tools:: suites (74 tests) pass. New tests: the note is offered every voice turn and cached across turns; a dead core costs no vocabulary and no error; project_slugs_in parses both list shapes and is bounded.

This is PR 1 of 3 from debugging "the app struggles to understand me". PR 2 adds a task-bearing agent session (so "spawn a session and check X" runs Claude with the task); PR 3 adds server-STT vocabulary + a client preference.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YG9Nsxqc6CREb56Uisnmmy

…lary

The phone's on-device recognizer transcribes a spoken turn before the
assistant sees it, and it mangles every name it does not know: 'check
Kardashian on nude b' for 'check komodo on Node B', 'start a new show
here' for 'a new shell here'. The model was then answering 'say exactly:
...', which a person cannot do — they said it right; the recognizer wrote
it wrong.

The prompt now states that turns are dictated and gives the model a
<vocabulary> note each voice turn: the project slugs the core knows and
the live session names. It reads a garbled sentence against that
vocabulary and the conversation, acts on the clearly-likeliest reading or
asks one short question that states it, and never demands exact words.

The note is built only for turns carrying a recognized utterance (a typed
turn was not misheard, and this spares it a core round trip); the project
slugs are fetched once and cached for VOCABULARY_TTL; the names are
wrapped as untrusted <vocabulary> data and defanged like every other
core-derived string. The stub core gained a per-tool canned-answer hook
so the vocabulary path can be tested end to end.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YG9Nsxqc6CREb56Uisnmmy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant