Add an evaluation harness for file selection and content generation#18
Add an evaluation harness for file selection and content generation#18AshwinUgale wants to merge 3 commits into
Conversation
|
Per-run model calls (counts from the actual corpus; $ is order-of-magnitude on gpt-4o-mini):
Per case ≈ index discovery (~2) + full-scan (~1) + content gen (1 per annotated file). Indexes are committed, so normal runs pay $0 for indexing. |
|
🤖 Finished Review · ✅ Success · Started 5:01 PM UTC · Completed 5:15 PM UTC |
|
gpt-4o-mini, N=3 — sharing for interest; the harness is the deliverable, not these numbers:
Discovery looks lexically driven: renaming one code file ( |
ReviewFindingsMedium
Low
Info
Previous runReviewFindingsMedium
Low
Info
|
|
Thanks for the thorough pass — addressed it:
|
|
🤖 Finished Review · ✅ Success · Started 6:16 PM UTC · Completed 6:29 PM UTC |
|
Hi @AshwinUgale, thanks for the PR! This is a really big PR. Since we have to manually review everything, could you please split it into smaller, more focused PRs? It'll help us review it much faster. Thanks! |
|
Hi @csoceanu , Splitting this into three smaller, focused PRs per your request. They stack (each is a dependency of the next), so they land in sequence:
I'm closing this one. |
Implements the eval harness from #14 . PR 1 of 2 (harness only; CI is PR 2). Strictly additive — all new under eval/, no existing file touched.
What it does: runs the real pipeline against test cases and scores both decisions — file selection (precision/recall/F1, index and full-scan paths scored separately) and content generation (deterministic assertions + a no-fence check).
Contents (~93 files, all under eval/):
Harness — execute.py, prep_index.py, aggregate.py, eval.yaml, judges/
Scorer — scoring/: verbatim copy of agent-eval-harness's score.py + support modules; PROVENANCE.md records source/commit + "modifications: none"
Corpus — 10 hand-authored cases (5 positive / 5 negative)
README.md + .gitignore
Design choices (per our discussion):
Copy, not pip — traced score.py's imports: the deterministic path needs only config.py + events.py (stdlib + pyyaml); LLM/MLflow machinery is lazy and unused. Byte-identical, no rewiring.
Frozen indexes (option c) — pre-built .doc-index/ per case + stubbed git fns. (a) mock loses the real path; (b) build-every-run is costly × N; (c) is cheapest and matches the cached-on-main production path. Diff is fed as a string — no git repo.
Two paths scored separately — a blended score hides which regressed.
Assertions, not LLM-judge (v1) — schema reserves the judge slot for v2.
N runs → pass-rate for LLM non-determinism (N=3 PR / N=10 nightly).
Run:
export MODEL_API_BASE=... MODEL_API_KEY=... MODEL_NAME=gpt-4o-mini
python eval/prep_index.py --all
python eval/execute.py --run-id myrun --samples 3
python eval/aggregate.py --run-id myrun --samples 3
Out of scope: CI (PR 2), LLM-judge (v2), mined cases (no corpus exists yet).
Cost + preliminary findings in comments below.
@csoceanu