fix: QA prompt instructs LLM to use recall tool#400
Merged
Merged
Conversation
The eval QA system prompt said 'based on the provided context' which made the LLM answer only from the system prompt injection. It never invoked the recall tool, missing all searchable details. Now explicitly instructs: use recall to search for specific details, follow t:<id> source citations for exact values. Recall now invoked on every QA question (verified via gateway logs).
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
The eval QA system prompt told the LLM to answer 'based on the provided context', which made it answer only from the system prompt injection. It never invoked the recall tool — confirmed by zero recall invocations across all CM-1 questions.
Fix
Updated QA_SYSTEM prompt to explicitly instruct the LLM to:
t:<id>source citations for exact valuesResults
Recall is now invoked on every QA question (verified via gateway logs). However, the gateway strips the recall tool after the first call (#399), so the LLM can't follow up on source citations. The scoring impact is limited by this architectural constraint.
Files Changed
packages/core/eval/baselines.ts— QA_SYSTEM prompt