feat: runnable three-arm benchmark harness#5
Merged
Conversation
A closed-loop evaluator that operationalizes references/benchmarking.md: runs baseline / naive-swap / ModelPort-enhanced arms over an eval set, grades output-contract conformance, tool-calling accuracy, and task success, and prints a leaderboard with attribution (model delta, skill delta, net). - harness/run.py — orchestrates the three arms + leaderboard - harness/graders.py — provider-agnostic scoring (real, runs on actual output) - harness/providers.py — SimProvider (offline, deterministic) + AnthropicProvider (real Messages API; needs ANTHROPIC_API_KEY) - harness/scenarios/support_triage.json — bundled scenario fixture - harness/tests/ — 9 unit/smoke tests, wired into CI - harness/README.md — usage + the iterate-on-failures loop The simulator's numbers are illustrative (driven by prompt explicitness × a per-model literalness knob); the grading/scoring pipeline is real, so the Anthropic provider yields measured results with no other changes.
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.
What
Adds a runnable, closed-loop benchmark harness under
harness/thatoperationalizes the methodology in
references/benchmarking.md(previously docsonly). Run a migration scenario, read the leaderboard + failing cases, tighten
the enhanced system, re-run.
Three arms, same eval set + graders
Components
run.py— orchestrates the arms, prints the leaderboard + attribution (model delta / skill delta / net)graders.py— provider-agnostic scoring (contract, tool, task) that runs on real output stringsproviders.py—SimProvider(offline, deterministic) +AnthropicProvider(real Messages API)scenarios/support_triage.json— bundled fixturetests/— 9 unit/smoke tests, now run in CIThe loop, demonstrated
Tuning the bundled scenario, a vague enhanced prompt scored a negative skill
delta (cost up, quality flat). Making the contract explicit moved ModelPort
from last place to a clear win (composite 0.57 → 0.75; skill delta +0.15). The
harness even surfaced a flaw in its own composite (min-max over near-equal costs
swamped quality) — now fixed with baseline-relative, bounded normalization.
Notes
simprovider's numbers are illustrative (prompt-explicitness × per-model literalness); the grading pipeline is real, so--provider anthropicyields measured results unchanged.anthropicimported lazily for real runs.Validation
python3 scripts/validate_skill.py .→ validmarkdownlint-cli2 "**/*.md"→ 0 errorspython3 -m unittest discover -s harness/tests→ 9 passed