Add 5 reform-API regression eval cases (closes #82)#90
Open
vahid-ahmadi wants to merge 1 commit into
Open
Conversation
Adds 5 Test B scenarios (b6-b10) that catch silent reform-expressibility regressions like the 2026-05-28 basic-rate +1pp failure. Each pins dataset (enhanced_frs_2023_24) and parameter_year (2025), uses expected_approx with wide tolerance_pct for direction + order-of-magnitude assertions only — no fixture files, no exact-number pinning — and uses anchor.must_mention to assert the chat's prose answer references the reform parameters by name. Branched off feat/eval-harness (PR #52) since #82 explicitly depends on the harness landing. README updated to document the two reference shapes (fixture-backed vs expected_approx-only) and the regression sub-suite. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Beta preview is ready.
|
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
Adds 5 Test B scenarios (b6-b10) under
evals/scenarios/that catch silent reform-expressibility regressions — directly motivated by the 2026-05-28 live test where the agent could not express a basic-rate +1pp reform and produced no eval signal. Closes #82.Path chosen: A (extend #52)
PR #52 (
feat/eval-harness) is OPEN, mergeable, and structurally complete (SPEC, scenarios, runner, fixture builder, grader, first results writeup). The right home for #82's cases is the existing harness — this PR branches offfeat/eval-harnessand adds 5 new scenario YAMLs in the harness's existing shape.Base branch:
feat/eval-harness(rebase ontomainonce #52 merges).What the cases assert
Per #82's constraint: direction + order-of-magnitude only — no exact-number pinning. Tax microsim numbers shift with dataset version and parameter year; exact pinning would create flaky tests.
b6_basic_rate_plus_1ppb7_pa_to_15kb8_ni_primary_threshold_plus_1kb9_child_benefit_uprate_10pctb10_two_band_collapseEach case also uses
anchor.must_mentionto assert the chat's prose names the reform parameters (basic rate, personal allowance, child benefit, etc.) andanchor.must_not_sayto catch sign-flip regressions ("revenue rise" on a costing reform, etc.).How it slots into the harness
The grader (
evals/runner/grade.py:474) already supportsexpected_approxinfields_to_compareas a fixture-free alternative path — whenreference.fixtureis omitted, the diff uses the inline expected value. No grader changes needed; the new cases use existing field paths (budget.budgetary_impact,budget.tax_revenue_impact,budget.benefit_spending_impact) that the extractor'sFIELD_LABELSalready covers.Each case pins:
dataset: enhanced_frs_2023_24parameter_year: 2025chat_settings.model_backend: uk_pythonchat_settings.num_runs: 3evals/README.mdis updated with a "Reform-API regression suite" section explaining the two reference shapes (fixture-backed vsexpected_approx-only).What's deliberately out of scope
chatbot.pyoragent_tools.py(per constraint).expected_approxplumbing.Test plan
main.B_results.mdentries for b6-b10; assertions should pass when the agent successfully expresses each reform via the PolicyEngine UK API.python -c "import yaml; from pathlib import Path; [yaml.safe_load(p.read_text()) for p in Path('evals/scenarios').glob('b[6-9]_*.yaml')]"✅ (done)expected_approx: 0magnitude-only case) doesn't crash_diff_scalar— the grader'sexpected != 0guard handles it; diff entry shows extracted-only as intended.🤖 Generated with Claude Code