Skip to content

fix(chat): stop document chat substituting a neighbouring value for an absent fact - #614

Open
arhyneRWU wants to merge 1 commit into
ui-insight:mainfrom
arhyneRWU:feat/document-chat-absence-hardening
Open

fix(chat): stop document chat substituting a neighbouring value for an absent fact#614
arhyneRWU wants to merge 1 commit into
ui-insight:mainfrom
arhyneRWU:feat/document-chat-absence-hardening

Conversation

@arhyneRWU

@arhyneRWU arhyneRWU commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Ports the absence-handling hardening that KB_CHAT_SYSTEM_PROMPT already carries to DOCUMENT_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

Test Plan

Related Issues

Closes #610

Happy to adjust the wording or placement if you'd prefer it structured differently.

🤖 Generated with Claude Code

@arhyneRWU
arhyneRWU force-pushed the feat/document-chat-absence-hardening branch from 65c8c88 to a9677c1 Compare August 6, 2026 04:43
@ViaJables

Copy link
Copy Markdown
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>
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.

[Feature] Port KB_CHAT_SYSTEM_PROMPT's absence-handling hardening to DOCUMENT_CHAT_SYSTEM_PROMPT

2 participants