fix(chat): stop document chat substituting a neighbouring value for an absent fact - #614
Open
arhyneRWU wants to merge 1 commit into
Open
fix(chat): stop document chat substituting a neighbouring value for an absent fact#614arhyneRWU wants to merge 1 commit into
arhyneRWU wants to merge 1 commit into
Conversation
arhyneRWU
force-pushed
the
feat/document-chat-absence-hardening
branch
from
August 6, 2026 04:43
65c8c88 to
a9677c1
Compare
Collaborator
|
Releasing 4.10 today, I am going to review this a bit so expect this in 4.11. |
…n absent fact Benchmarked against real grant proposals, the dominant document-chat failure was substitution, not invention: asked for an indirect cost rate when only a fringe rate exists, models returned the fringe rate with a genuine citation to a real line. KB_CHAT_SYSTEM_PROMPT already carries absence-handling hardening from the earlier grounding fixes; DOCUMENT_CHAT_SYSTEM_PROMPT had only the softer 'if the documents do not contain enough information' line, which a dense budget never triggers. Port the tested guidance: verify the document states the specific thing asked, never substitute related values, blank is not zero, no unstated boilerplate, and a stated 'None' is an answer. On a 16-item machine-verified absence set this took three local models from 9/16, 10/16 and 8/16 correct to 16/16, 15/16 and 14/16; positive controls unchanged (no over-declining). Closes ui-insight#610. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
arhyneRWU
force-pushed
the
feat/document-chat-absence-hardening
branch
from
August 11, 2026 02:42
a9677c1 to
819c574
Compare
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
Ports the absence-handling hardening that
KB_CHAT_SYSTEM_PROMPTalready carries toDOCUMENT_CHAT_SYSTEM_PROMPT, using the exact wording I benchmarked in #610. The dominant document-chat failure in my grant-proposal benchmarking was substitution, not invention: asked for an indirect cost rate when only a fringe rate exists, every model returned the fringe rate with a genuine citation to a real line — the citation checks out, so the wrong answer survives review.With this guidance, three local models went from 9/16, 10/16 and 8/16 correct on a 16-item machine-verified absence set to 16/16, 15/16 and 14/16, and the worst subtype (neighbour-present) went 5/5 on all three. Two positive controls (facts genuinely present, including a field whose stated value is literally "None") passed before and after — the guidance does not cause over-declining.
Changes
DOCUMENT_CHAT_SYSTEM_PROMPT— verbatim the wording tested in [Feature] Port KB_CHAT_SYSTEM_PROMPT's absence-handling hardening to DOCUMENT_CHAT_SYSTEM_PROMPT #610test_kb_chat_prompt_has_numeric_and_consistency_guardrails)Test Plan
make ci)CHANGELOG.mdRelated Issues
Closes #610
Happy to adjust the wording or placement if you'd prefer it structured differently.
🤖 Generated with Claude Code