Skip to content

[Task]: decide and implement whether the eval judge sees the catalogue vars it grades citations against #683

Closed

Description

@sumithr

Priority / sequencing

P1 / priority: next

Suggested labels

No response

Roadmap fields

Status: Ready; Priority: P1; Size: M; Depends on: none (#679 merged). Parent epic: #680.

Problem

27 eval configs grade catalogue citations (loaded_techniques, loaded_classifications, loaded_rules, loaded_approaches, principles, ...). Those file:// catalogue vars reach only the candidate prompt. The judge's rubricPrompt receives {{ground_truth_context}} (fixed in #679) but not the catalogues, so a GROUNDING clause like "cites a technique from the loaded catalogue" is judged without the catalogue in view. The judge can then pass an invented citation or fail a real one. #679 deliberately left this as a decision for #680.

Expected outcome

A decision, backed by a measured comparison, on whether the judge also receives the catalogue vars, implemented if yes. The per-config failure triage (sibling slices) runs after this, so its classifications are not skewed by a judge-context change landing mid-way.

Scope

  • Start with the fabricated-citation probe below (judge only, fixed candidate output). Then compare the current rubricPrompt with a variant that adds the catalogue vars in a labelled block on at most 2 citation-grading configs (one reviewing-before-merge, one preparing-for-work or answering-testing-question), single pass, re-grading the same saved candidate outputs under both judge variants rather than regenerating them.
  • Also seed one test whose candidate output cites a technique that is not in the catalogue (a fabricated citation) and show which variant catches it. This is the case that decides the question, so run it first.
  • If yes: add the catalogue block to every rubricPrompt that grades citations, the same way ground_truth_context is passed, and document it in the README's rubric-authoring section. Record judge prompt size before/after.
  • If no: record why on [Task]: align the eval rubrics and A/B controls with the Claude candidate/judge results #680 and in the README.

Run budget

Eval runs are proportionate to the change (set 2026-09-14). Never run or start the full matrix here. Prove wiring statically before any real call. Rerun only the failing cases of the configs this issue names, single pass; add a repeat only for a specific case whose result is borderline or differs from the #679 run, to tell variance from a real failure. Report exactly which eval runs were made.

Acceptance criteria

Test plan

The fabricated-citation probe first, then single-pass re-grading of saved candidate outputs for the 2 sampled configs under both judge variants. If implemented across the citation-grading configs, the config lint / eval-shape tests are the evidence; do not rerun every config.

Context

Child of #680. Sibling triage slices depend on this one.

Activity

  1. added
    enhancement
    priority: next
    on Sep 14, 2026
  2. sumithr commented on Sep 14, 2026

    @sumithr
    OwnerAuthor

    Verification before merge: PR #691 at head d9ec81d

    All four acceptance criteria are met and ticked. The evidence below was checked against the branch, not the PR description.

    Acceptance criteria

    AC Met Evidence
    Before/after pass counts and judge reasons for each sampled config posted on #680 yes Pass counts are in the #680 decision comment. Judge reasons under both rubrics for all four cases were quoted from the saved runs in #680 comment 5669621454, with no new eval run. The re-grade rubric is byte-identical to the committed rubricPrompt.
    Fabricated-citation probe result posted yes #680 decision comment. A real technique that is not in the catalogue, metamorphic testing, got PASS 0.85 without the catalogue and FAIL 0.25 with it. An invented name failed both ways.
    Decision recorded; implemented across every citation-grading config; no rubric clause loosened yes The decision is recorded on #680. The guard tests/test_eval_judge_catalogue_context.py, run against the origin/main configs, fails on exactly the 18 changed configs (18 failed, 60 passed) and passes on the branch. The YAML diff removes 0 lines and adds 93, all of them catalogue block headers, vars or blank lines.
    Full pytest suite green yes uv run --no-sync pytest on a fresh clone at d9ec81d: 3510 passed, 6 skipped, 1 xfailed, coverage 100%. All 33 PR CI checks passed.

    Behaviour ledger

    Real surface: the eval harness tests/evals/promptfoo/run-eval.sh with SUMO_EVAL_BACKEND=claude, run on a fresh clone of this repo. A stand-in claude placed first on PATH recorded every prompt promptfoo sent through providers/claude_cli.py and returned a minimal valid envelope. Candidate calls got a fixed answer and judge calls got {"pass": true, ...}. No model was called.

    # Expected behaviour Real-surface call + input Observed output Met
    1 The judge receives the catalogue the candidate was given run-eval.sh skill-reviewing-before-merge-unproven-escalation.yaml, 2 cases Both judge prompts contain --- LOADED TECHNIQUES (catalogue the candidate was given) ---, then ### equivalence partitioning and 21 ### technique headings, then --- END LOADED TECHNIQUES ---, before --- CANDIDATE RESPONSE ---. The same run on origin/main has 0 header lines and 0 ### lines. yes
    2 In an A/B config the judge gets a leg-scoped REFERENCE block, and the A0 leg is still not given the catalogue run-eval.sh skill-reviewing-before-merge.ab.yaml, 3 cases x 3 legs All 3 distinct judge prompts contain the REFERENCE CLASSIFICATIONS, APPROACHES and PRINCIPLES headers plus the catalogue lines ## api_contract_change, ## strategy-orchestration and the principles heading. The 9 candidate prompts split into 3 with none of those lines (the A0 prompt, starting "You are a senior QA reviewer in an IDE chat session"), 3 with the catalogues and no skill (A1), and 3 with the catalogues and the skill (B). yes
    3 The REFERENCE wording matches what each leg renders, with principles only in A1 for tdd.ab run-eval.sh skill-implementing-with-tdd.ab.yaml, 3 cases x 3 legs Candidate prompts: 3 with principles and techniques (A1), 3 with techniques and the skill but no principles (B), 3 with neither (A0). All 3 judge prompts carry REFERENCE PRINCIPLES (the catalogue only the A1 catalogues-only leg loads; the A0 no-skill and B full-skill legs were not given it plus the principles text. yes
    4 Implemented across every config whose candidate sees a catalogue Branch guard run against the origin/main config tree, then on the branch On main, 18 test_every_rubric_prompt_renders_the_catalogues_the_candidate_saw[...] cases fail, one per changed config. On the branch they pass as part of the full suite. yes
    5 No rubric clause loosened git diff origin/main...HEAD -- tests/evals/promptfoo/*.yaml 0 removed lines. The 93 added lines are only block headers, block ends, {{var}} lines and blank lines. yes
    6 Judge prompt size before and after recorded Stub captures of unproven-escalation on main and on the branch Judge prompts grew from 6609 to 11918 bytes and from 7322 to 12631 bytes. The measured token deltas are on #680: +1,791 for techniques, +4,378 for classifications + rules. The candidate prompts are byte-identical on main and the branch. yes
    7 Documented in the README's rubric-authoring section tests/evals/promptfoo/README.md on the branch Pattern B item 4 now names the LOADED/REFERENCE block. The new ### Judge catalogue context section covers the probe result, the token cost, the #### A/B configs: leg-scoped label rule and the guard. yes

    Supporting slots

    • real_repo: a fresh clone of this repo at /Users/SumithRamsookbhai/Desktop/repos/apo/sumo-qa-finish-691 on branch d9ec81d, plus an origin/main worktree at 6467d0f for the comparisons.
    • real_surface: this change cannot be reached through the sumo-qa MCP server: it touches eval configs, a guard test and eval docs, and no tool, resource, router or skill. The real surface is the eval harness itself, run-eval.sh with the Claude backend, which drives providers/claude_cli.py and the claude CLI. The stand-in CLI captured exactly what that path sends to the judge.
    • existing_flow: the untouched skill-implementing-with-tdd.yaml was run through the same stand-in capture on origin/main and on the branch. All 5 judge prompts and all 5 candidate prompts are byte-identical, and the recursive diff was empty.
    • evals: no new eval runs. The decision evidence is the judge-only probe (8 judge calls), one single-pass Claude-backend run each of skill-reviewing-before-merge-unproven-escalation.yaml (2/2) and skill-preparing-for-work-feedback-memory.yaml (1/2), and a judge-only re-grade under the catalogue rubric (2/2 and 1/2, no verdict flipped). Neither config has changed since 841c295, and the re-grade rubric is byte-identical to the committed one.

    Other gates

    • CI: all 33 checks passed.
    • Mutation gate: mutation.yml on the head branch passed, run 34886176840.
    • Per-file review: 20 files, verdict SAFE, no material findings.
    • Unresolved review threads: 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority: next

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions