Fix LLM judge overall pass reconciliation#978
Merged
Conversation
Derive overall_transcript_pass from criteria when present so eval-ci does not fail when the model marks every criterion pass but overall false. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Summary
Adjusts LLM-judge JSON parsing in the agent-evaluation harness to make overall_transcript_pass consistent with per-criterion judgments, addressing eval-ci failures caused by contradictory top-level booleans from the model.
Changes:
- Adds
reconcileOverallTranscriptPass()to derive overall pass fromcriteria[]when present. - Logs when reconciliation overrides the model’s top-level overall value.
- Adds a no-runner unit test for reconciliation and wires it into
npm test.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/agent-evaluation/src/llm-judge.ts | Reconciles overall pass from criteria and logs when the model’s top-level value disagrees. |
| docs/agent-evaluation/src/llm-judge-parse.test.ts | Adds unit-style assertions covering reconciliation behavior. |
| docs/agent-evaluation/package.json | Adds a new test script and includes it in the main test pipeline. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| throw new Error(`JSON.parse failed: ${detail}`); | ||
| } | ||
| const overall = Boolean(parsed.overall_transcript_pass); | ||
| const overall_from_model = Boolean(parsed.overall_transcript_pass); |
| } | ||
| } | ||
| const overall = reconcileOverallTranscriptPass(overall_from_model, criteria); | ||
| if (criteria.length > 0 && overall !== overall_from_model) { |
Parse string "true"/"false" explicitly, apply the same to criteria pass fields, only log reconciliation when overall was explicitly set, and align test assertion messages with other eval unit tests. Co-authored-by: Cursor <cursoragent@cursor.com>
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
overall_transcript_passfrom thecriteria[]array when present (logical AND of all criterion passes).llm-judge-parse.test.ts).Fixes eval-ci failure on main run 28158908775: scenario 02 passed every heuristic and LLM criterion, but the judge returned
overall_transcript_pass: false.Test plan
npm run testindocs/agent-evaluation/npm run typecheckindocs/agent-evaluation/Made with Cursor