Repository navigation
fix(rag-eval): prevent false credit for failures and duplicate results - #333
Merged
Merged
Conversation
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.
Intent
Keep failed requests, unknown IDs and duplicate hits from producing falsely perfect RAG evaluation reports.
What changed
Score distinct IDs in the server-ID namespace and retain unknown IDs in reports. Count failed non-skipped requests in recall denominators with zero credit, preserve both query errors and require an SSE done event. Preserve documented 503 and
--no-askskips and report-completion exit behavior. Document scoring and add dedicated CI for this excluded crate.How this was tested
Real CLI reproduction against loopback HTTP/SSE: 5 regressions failed before the fix, including failed/unknown gap results scoring 1.000, duplicated hits scoring 1.500, an omitted failed ask denominator and incomplete SSE receiving credit. A healthy control passed.
cargo test --manifest-path tests/rag-eval/Cargo.toml --locked -- --test-threads=1: 6 library tests and 8 CLI cases passed, including catalog-ID impersonation and explicit skip controls. CSV rows and summaries are checked. No model or AWS calls.Strict Clippy compared with
main: the same one preexistingptr_arglint in the percentile helper, no new diagnostics.cargo fmt --checkretains only preexisting source failures (main 15 versus 16 hunks, library 3 versus 4); the new CLI test and patch whitespace are clean. The existing baseline waiver applies.The new workflow parses as YAML and executes the excluded crate's library and CLI tests. Evidence is included here under the existing approval to avoid gist uploads.
Findings fixed during review
Independent fresh-context review found no unresolved findings. Subsequent formatting edits were reviewed as mechanical only.
Risk: medium
Evaluation scores and failure reporting intentionally change. HTTP 503 remains the documented AI-unavailable skip, and completed reports still exit zero while setup/output errors fail.
Closes #315.