eval: keep the answer text, and count pages named in prose but not cited - #28
Merged
Conversation
Two gaps the first hand-audit of confident-but-wrong answers hit. The blob kept path lists and threw the answer away, so deciding whether a confident answer was wrong or the expectation too narrow meant re-asking every question against the index and hoping the model repeated itself. The answer is the cheapest field in the blob and the only one a reviewer can argue with. It is now kept whole, per question. Separately: one audited answer named the expected file in its prose, with the right symbol, and cited two other files. That scores zero, exactly like an answer that never found the page - but it is a citation failure, not a retrieval one, and the two need opposite fixes. Each question now records which expected paths its answer named without putting them in front of the caller, the run counts them, and each one logs a warning as it happens.
|
✅ Health: 9.9 (unchanged) 📋 At a glance Files & modules (2)
🔎 More signals (1)🔥 Hotspots touched (3)
📊 Full report · ⭐ Star Repowise · 📥 Install bot · Last updated 2026-07-29 17:33 UTC |
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.
Auditing the confident-but-wrong answers from the last run turned up two gaps in what a result blob records.
The answer text was thrown away. The blob kept path lists only, so deciding whether a confident answer was genuinely wrong — or the expectation too narrow — meant re-asking every one of them against the index and hoping the model repeated itself. It is the cheapest field in the blob and the only one a reviewer can argue with. Now kept whole, per question, empty string on an abstention.
One failure was wearing another's clothes. An audited answer named the expected file in its prose, with the right symbol, and cited two different files. That scores zero — identically to an answer that never found the page. But it is a citation failure, not a retrieval one, and the two need opposite fixes. Each question now records the expected paths its answer named without putting them in front of the caller (
expected_paths_named_only_in_prose), the run counts them (n_answers_naming_an_uncited_expected_path, also in the CLI summary line), and each one logs a warning as it happens.The prose check is a plain substring match on the file part of the path, and it is deliberately loose — it says "go and read this one", it is never a score. A path already in the citations or the retrieval block can never appear in it.
Tests. 6 new, failing before and passing after: the answer reaching the blob, an abstention kept as empty text rather than dropped, a prose-only mention recorded and warned about, a cited path never reported as prose-only, a
::symbolexpectation counted when its file is named, and a plain miss naming nothing.python -m pytest tests/test_answer_eval_*.py→ 137 passed (was 131).