Open
Conversation
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
joshblack
August 21, 2026 23:23
View session
Member
|
@copilot add support for showing good and bad examples for each criteria and make sure this is provided into the prompt for the judge agent. Also make sure no part of the judge prompt is in the environment when running the scenario |
Agent-Logs-Url: https://github.com/primer/agent-eval/sessions/0940f4bf-b547-44c5-afe7-2757a5445de8 Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Copilot stopped work on behalf of
joshblack due to an error
August 22, 2026 03:06
joshblack
marked this pull request as ready for review
August 22, 2026 15:05
Contributor
There was a problem hiding this comment.
Pull request overview
Adds rubric-based, repeatable LLM judging for scenarios in @primer/agent-eval, including schema validation, structured judgeResult output, and website UI surfacing rubric configs and per-run rubric results.
Changes:
- Introduces scenario
rubricconfiguration (model + optional reasoning effort + weighted criteria with optional minimum thresholds) and validates it during scenario loading/output parsing. - Adds a new judge runner that evaluates the workspace + final agent response, producing a structured, weighted
judgeResult. - Exposes rubric configuration/results in the website scenario and experiment run pages, and documents the new scoring dimension.
Show a summary per file
| File | Description |
|---|---|
| website/src/scenarios.ts | Extends website scenario model to include optional rubric config from resolved scenarios. |
| website/src/app/scenarios/[id]/components/Page.tsx | Renders rubric configuration details on the scenario detail page. |
| website/src/app/experiments/[id]/runs/[date]/page.tsx | Includes judgeResult in run details derived from AgentEvalOutput. |
| website/src/app/experiments/[id]/runs/[date]/components/Page.tsx | Displays rubric evaluation results (score + per-criterion judgments) in run UI. |
| README.md | Documents rubric score as an additional scoring dimension. |
| packages/agent-eval/src/treatment.ts | Extends TreatmentResult to optionally carry a typed JudgeResult. |
| packages/agent-eval/src/scenarios.ts | Adds runtime validation for rubric in scenario configs (model/effort/criteria validation). |
| packages/agent-eval/src/scenarios.test.ts | Adds tests for accepting valid rubrics and rejecting incomplete score descriptions. |
| packages/agent-eval/src/scenario-config.ts | Re-exports rubric-related types for scenario authoring. |
| packages/agent-eval/src/run.ts | Runs rubric judging after the agent run (with workspace lock-down) and includes judgeResult in results; factors copy excludes into a constant. |
| packages/agent-eval/src/run.test.ts | Adds a small check ensuring scenario config is excluded from copied workspace via SCENARIO_COPY_EXCLUDES. |
| packages/agent-eval/src/output.ts | Extends output schema to include optional rubric config in resolved scenarios and optional judgeResult in results. |
| packages/agent-eval/src/output.test.ts | Adds fixture coverage for parsing/serializing judgeResult in output. |
| packages/agent-eval/src/judge.ts | Implements judge prompt/args, response parsing/validation, weighted scoring, and threshold enforcement. |
| packages/agent-eval/src/judge.test.ts | Adds unit tests for prompt composition, CLI args, parsing, weighting, thresholds, and fenced JSON handling. |
| packages/agent-eval/src/index.ts | Exports new judge result types from the package entrypoint. |
| packages/agent-eval/src/experiment-config.ts | Adds Rubric, RubricCriterion, and RubricScore types and wires rubric into ScenarioConfig. |
| packages/agent-eval/README.md | Documents how to configure rubrics and what judge results contain. |
| .changeset/tasty-steaks-give.md | Declares a minor release for adding rubric-based judging. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 19/19 changed files
- Comments generated: 3
- Review effort level: Lite
| {criterion.description ? <p>{criterion.description}</p> : null} | ||
| <p className="text-body-small text-muted"> | ||
| Weight: {criterion.weight} | ||
| {criterion.minimumScore ? ` · Minimum score: ${criterion.minimumScore}` : null} |
| <strong> | ||
| {criterion.name}: {criterion.score}/5 | ||
| </strong> | ||
| {criterion.minimumScore ? ` (minimum ${criterion.minimumScore})` : null} |
Comment on lines
+345
to
+349
| if (treatment.scenario.config.rubric) { | ||
| console.log('Locking workspace for rubric evaluation...') | ||
| await sandbox.runCommand('chown', ['-R', 'root:root', '.'], {user: 'root'}) | ||
| await sandbox.runCommand('chmod', ['-R', 'a-w', '.'], {user: 'root'}) | ||
| judgeResult = await runJudge({ |
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.
Adds repeatable LLM evaluation using weighted, criterion-level rubrics. Each criterion defines concrete 1–5 score descriptions and can enforce a minimum passing score.
Changelog
New
rubricconfiguration with judge model, reasoning effort, weighted criteria, and thresholds.judgeResultoutput with weighted score, explanations, and threshold status.view,grep, andglob.Changed
Removed