Skip to content

Phase 2: evals harness + multi-provider lineup (Anthropic, OpenAI, Gemini) - #2

Merged
RATCHAW merged 2 commits into
mainfrom
RATCHAW/phase-2-evals
Jul 10, 2026
Merged

Phase 2: evals harness + multi-provider lineup (Anthropic, OpenAI, Gemini)#2
RATCHAW merged 2 commits into
mainfrom
RATCHAW/phase-2-evals

Conversation

@RATCHAW

@RATCHAW RATCHAW commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Brings the Phase 2 eval harness to main, plus provider selection so runs aren't locked to Anthropic.

Eval harness (packages/evals)

  • Per-field value accuracy (normalized comparison), grounding accuracy (predicted vs. annotated bbox as IoU, hit@0.5), cost per 1k docs, and hallucinated-line-item counting.
  • Reports (docs/benchmark.md + README table) generated exclusively from serialized run records — no hand-entered numbers.
  • Receipt half pinned against real CORD-v2 data (25 docs by row index + image SHA-256). DocILE invoice half is loader-ready, gated on the dataset token.
  • Tested against mock models.

Multi-provider lineup

  • models.ts is now a per-provider catalog — Anthropic, OpenAI, Google Gemini — three vision-capable tiers each, with list pricing sourced inline (2026-07).
  • Default: run every provider whose API key is set (ANTHROPIC_API_KEY / OPENAI_API_KEY / GOOGLE_GENERATIVE_AI_API_KEY); setting only one benchmarks that provider alone — a cheaper way to iterate than the full Anthropic lineup.
  • EVAL_PROVIDERS pins an explicit subset (e.g. openai,google); missing keys / unknown names error clearly.
  • Backward compatible: only ANTHROPIC_API_KEY set → the original three models.
  • Added @ai-sdk/openai and @ai-sdk/google.

Tests

100 passing (53 core + 47 evals), including 10 new models.test.ts cases for provider selection. Monorepo typecheck clean.

Pricing sources: OpenAI · Google Gemini · Anthropic (platform.claude.com/docs/en/pricing).

🤖 Generated with Claude Code

RATCHAW and others added 2 commits July 9, 2026 10:51
…ble reports

packages/evals: demo invoice/receipt schemas, dataset ground-truth mappers
(CORD-v2 receipts, DocILE invoices), normalized value comparison, bbox
grounding via IoU against annotated regions, cost tracking, and report
generation from recorded runs only.

The 25-receipt half is pinned by id + sha256 in data/manifest.json (fetched
and verified from the canonical HF parquet at a fixed revision); the DocILE
invoice half awaits the access token — loader and curation are ready.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The eval harness only ran Anthropic models. Add OpenAI and Google Gemini
as selectable providers so runs can use a cheaper lineup.

- models.ts: per-provider catalog, three vision-capable tiers each with
  list pricing sourced inline (2026-07). selectProviders/benchmarkModels
  are env-injectable and unit-tested.
- Default: run every provider whose API key is set (ANTHROPIC_API_KEY /
  OPENAI_API_KEY / GOOGLE_GENERATIVE_AI_API_KEY); setting only one
  benchmarks that provider alone. EVAL_PROVIDERS pins an explicit subset.
- Backward compatible: only ANTHROPIC_API_KEY set → the original 3 models.
- Add @ai-sdk/openai and @ai-sdk/google; 10 new tests (100 total pass).
- Sync evals/core READMEs, ROADMAP, CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@RATCHAW
RATCHAW merged commit 5638b09 into main Jul 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant