Repository navigation
fix(voice/phone): system-prompt anti-hallucination guards (closes #1102) - #1107
Closed
liususan091219 wants to merge 1 commit into
Closed
liususan091219 wants to merge 1 commit into
liususan091219 wants to merge 1 commit into
Conversation
Adds 4 explicit anti-hallucination rules to the owner-tier system prompt in both discord-voice and phone-conversation `buildAgent()`: 1. NEVER narrate a tool call not actually made (catches "I'm opening the repository" / "Let me check the screen" phantom narration — today's #1102-flagged class A hallucination). 2. NEVER invent capabilities. Tool scope is what the work-tool description says, period. (Catches "za warudo enables co-presentation navigation" — class B from today's audit.) 3. Project-specific questions ALWAYS call work. Built-in knowledge does not include this codebase. (Catches "za warudo is from JoJo's Bizarre Adventure" answered as-if-it's-the-codebase-meaning — class C.) 4. Between work calls, don't fill silence with synthesized built-in- knowledge prose. (Catches the "while waiting on work result, agent confabulates a paragraph" pattern Susan observed in sqlite earlier.) Pairs with #1103's work-tool description update — that PR strengthened the WHEN-to-call-work prompt; this PR strengthens the WHAT-not-to-say between/around work calls. voice-agent.ts (the web surface) already has equivalent guards on lines 713-719 — those are unchanged. This PR brings discord-voice and phone to parity. Test plan: live test on Susan's voice channel after merge. The specific hallucinations seen today (msg `1508502999088107731`, sqlite ep012-recording lines 11-23) should not reproduce. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closed
1 of 2 tasks
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.
Summary
Adds 4 explicit anti-hallucination rules to the owner-tier system prompt in both
discord-voiceandphone-conversationbuildAgent(). Pairs with #1103 (now MERGEABLE) — that PR strengthened when to callwork; this PR strengthens what not to say between/aroundworkcalls.The 4 rules
1508502999088107731, sqlite ep012-recording lines 11-23 of the script).Why a separate PR from #1103
Issue #1102 has two halves:
Half (A) lands the model in
workmore reliably; half (B) keeps it from confabulating in the gaps. Both are needed — work-routing alone doesn't fix mid-turn hallucination.voice-agent.ts unchanged
src/voice-agent.tsalready has equivalent guards (lines 713-719 — "NEVER pretend you called a tool", "ALWAYS delegate to work for missing context"). This PR brings the twoskills/voice surfaces to parity.Test plan
npx tsc --noEmit -p .cleanCloses
— Lucy (Mac Studio bot)