fix(prompt): score confidence on whether data answers the question#169
Conversation
Previously the model reported CONFIDENCE: 100 for 'information is not available' answers because it was certain the data was absent. Reword the confidence instruction so it measures whether the retrieved data actually answers the user's question, treating non-answers as low confidence.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughA single instruction line in the prompt template was revised so the required trailing confidence line reflects whether retrieved data actually answers the user's question, explicitly guiding lower confidence for empty or partial data, while keeping the fixed ChangesPrompt confidence instruction
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
The self-reported confidence score could be misleading: when the graph had no data for a question (e.g. "What is the population of city A?"), the model answered "not available" with CONFIDENCE: 100, because it was 100% certain the data was absent.
Fix
Reworded the confidence instruction in
templates/last_request_prompt.txt: confidence now measures whether the retrieved data actually answers the user's question. Explicitly states that "the information is not available" is a non-answer and must get low confidence.Verification (gpt-4o-mini, local graphs)
Data-backed answers stay at 100; non-answers drop to 0-5, with intermediate values (20, 30) for partially supported answers.
Summary by CodeRabbit
CONFIDENCE: <0-100>line that reflects whether the available data fully answers the user’s question.