Skip to content

Open-source extraction scoring tool

Did your extraction get the facts right, or leave them out?

A single accuracy number hides the difference between a wrong figure and a missing row. Benchmark scores a candidate table against human-validated gold assertions, reports accuracy and coverage separately, and emits a deterministic quality_band signal for downstream policy. Your files stay on your device.

Try the gold-set scorer ->InstallUse in a Claude Artifact
Step 1 of 4: Clean gold match (HIGH)benchmark.v0
4-step walkthrough (runs offline in your browser)Engine: js-fallback · v0.5.1
PASS · EXIT 0 · QUALITY_BAND: HIGH

All 6 gold assertions passed across 3 entities: accuracy 100.0%, coverage 100.0% (HIGH).

Every string, percent (within 0.01 pp tolerance), and dollar amount (within $1,000 tolerance) matched the reference file with zero skips, emitting quality_band = HIGH and exit 0.

Accuracy (correct / resolved)100.0%
Coverage (resolved / total)100.0%
Wrong values (FAIL)0
Missing facts (SKIP)0
EntityFieldExpectedActualVerdict
comp_1property_name (string)Marquis at BriarcliffMarquis at BriarcliffPASS
comp_1cap_rate (percent)6.50%6.50%PASS
comp_3cap_rate (percent)6.76%6.76%PASS
comp_3sale_price (number)2820000028200500PASS
comp_7cap_rate (percent)6.20%6.20%PASS
comp_7sale_price (number)1940000019400000PASS
Next: see why dropping one entity lowers coverage without corrupting accuracy.
Inspect exact CLI command, benchmark.v0 JSON, and --render summary output
$ benchmark normalized.csv --assertions gold_set.jsonl --key comp_id --json
{
  "tool": "benchmark",
  "version": "benchmark.v0",
  "outcome": "PASS",
  "candidate": "normalized_clean.csv",
  "candidate_hash": "sha256:d4c3f64f6c0892dd57959205a8cb91aac9ac5ee8a3b08724e19b2cbd81120ae9",
  "assertions_file": "gold_set.jsonl",
  "assertions_hash": "sha256:52149a0ad34185c65028296f69b937627fd0e1b1f71c15cc1343846fd6c90de2",
  "key_column": "comp_id",
  "input_verification": null,
  "policy_signals": {
    "quality_band": "HIGH",
    "quality_band_basis": "all_assertions_passed"
  },
  "summary": {
    "total": 6,
    "passed": 6,
    "failed": 0,
    "skipped": 0,
    "resolved": 6,
    "accuracy": 1,
    "coverage": 1,
    "by_severity": {
      "critical": {
        "passed": 3,
        "failed": 0,
        "skipped": 0
      },
      "major": {
        "passed": 3,
        "failed": 0,
        "skipped": 0
      },
      "minor": {
        "passed": 0,
        "failed": 0,
        "skipped": 0
      }
    }
  },
  "failures": [],
  "skipped": [],
  "refusal": null
}

Claude Artifacts · @cmdrvl/web

Like this gold-set scorer? Put it in your own Claude Artifact.

Paste this prompt into Claude.ai to spin up an offline extraction benchmark scorer that separates wrong values from missing rows under benchmark.v0.

@cmdrvl/web on GitHub ->
Build an interactive React Claude Artifact called "CMD+RVL Gold-Set Extraction Scorer (benchmark)" that scores a candidate CSV against JSONL gold assertions completely in browser memory with zero server uploads.

Follow CMD+RVL's benchmark.v0 contract (https://github.com/cmdrvl/benchmark):
1. Include 3 presets (Clean PASS with HIGH quality_band and 100% accuracy/coverage, Missing entity row where accuracy stays 100% while coverage drops to 66.7% with ACCEPTABLE band and exit 1, and Wrong extracted value + missing row producing LOW band and exit 1) plus an offline Step 4 CSV + JSONL editor.
2. Support explicit compare_as types (string, number, percent, date) with numeric/percent tolerances, default ordinal redaction refs (v1/v2) vs --explicit toggle, and real SHA-256 candidate_hash and assertions_hash.
3. Show accuracy, coverage, wrong count, and skipped count in separate metric cards above the per-assertion verdict table, and place benchmark.v0 JSON and --render summary inside a collapsed inspector drawer.
4. Keep the scoring boundary clean for future @cmdrvl/web Rust WASM drop-in.

Runs inside Claude.ai Artifacts today with zero uploads (test it with Wi-Fi off). Compiled Rust WASM modules live at github.com/cmdrvl/web.

Run it locally

Install via Homebrew (cmdrvl-benchmark formula) and run benchmark.

The Homebrew formula is cmdrvl/tap/cmdrvl-benchmark and installs the benchmark executable onto your PATH. Score CSV, JSONL, Parquet, row-oriented JSON, or XLSX worksheets locally.

Recommended entry pointView cmdrvl/benchmark on GitHub ->

benchmark CLI (v0.5.1)

Scores row-oriented candidate datasets against frozen JSONL gold assertions, redacts failure values with deterministic ordinal refs by default, and emits benchmark.v0 JSON or operator summaries.

1. Install via Homebrew

brew install cmdrvl/tap/cmdrvl-benchmark

2. Run locally

benchmark normalized.csv --assertions gold_set.jsonl --key comp_id --json
Wrong vs. missing
Reports accuracy (resolved) and coverage (total) separately
Explicit compare_as
string, number, percent, or date with declared numeric tolerances
Runs locally
On your device · Works offline with zero uploads
Policy-ready band
Emits HIGH, ACCEPTABLE, or LOW quality_band for assess
For scripts and CI: standalone benchmark binary, exit codes, and refusal codes

Render compact summaries or verify --lock inputs

View cmdrvl/cmdrvl on GitHub ->

Emit one-line operator summaries with --render summary / summary-tsv, require trusted inputs via --lock, or reveal raw values for trusted operators with --explicit.

Install standalone binary

cargo install --git https://github.com/cmdrvl/benchmark

Invoke directly

benchmark normalized.csv --assertions gold_set.jsonl --key comp_id --render summary

Exit codes & verdicts

PASS (HIGH)

Exit 0

Every gold assertion matched within its declared compare_as and tolerance rules with zero skipped entities or fields.

FAIL (ACCEPTABLE / LOW)

Exit 1

One or more assertions failed (quality_band = LOW) or were skipped because an entity or field was missing (quality_band = ACCEPTABLE when zero values were wrong).

REFUSAL

Exit 2

Scoring could not run safely (for example E_KEY_NOT_FOUND, E_KEY_NOT_UNIQUE, E_KEY_NULL, E_BAD_ASSERTIONS, or E_INPUT_DRIFT).

Common refusal & finding codes

CodeWhen it firesRemediation
E_KEY_NOT_FOUNDDeclared --key column does not exist in the candidate datasetCheck candidate headers with profile and supply a valid key
E_KEY_NOT_UNIQUECandidate contains duplicate entity keysDeduplicate or pass a composite --key col_a,col_b
E_BAD_ASSERTIONSAssertion JSONL line is malformed or sets tolerance on a string/date checkValidate records against benchmark --input-schema
E_EMPTY_ASSERTIONSGold assertions file contains zero rowsProvide at least one human-validated assertion record
E_INPUT_DRIFTCandidate or assertions file drifted from supplied --lock hashVerify upstream files with lock verify --root before scoring

Learning progression

Extraction scored? Route the quality band into assess next.

benchmark never makes a proceed/block decision on its own. It emits a deterministic quality_band (HIGH, ACCEPTABLE, or LOW) that assess evaluates alongside shape, rvl, and verify.

  1. 01rvlSee what moved
  2. 02shapeCheck compatibility
  3. 03profileScope columns
  4. 04verifyEnforce rules
  5. 05packSeal proof
  6. 06veilGuard privacy

Sibling · 04 verify

Check internal business rules alongside gold-set facts.

Use verify to check declared invariants (balances, dates, tie-outs) while benchmark checks extracted values against human-validated gold truth.

Back to verify & rule checker ->

Next step · assess

Classify benchmark and verify reports into PROCEED, ESCALATE, or BLOCK.

Feed benchmark.v0 alongside verify and decoding reports into assess with a versioned YAML policy for deterministic action bands.

Continue to assess & policy router ->

What benchmark handles

  • Scores CSV, JSONL, Parquet, row-oriented JSON, and XLSX/XLS/XLSM worksheets against frozen JSONL gold assertions
  • Separates wrong values (FAIL, lowering accuracy) from missing rows or columns (SKIP, lowering coverage) so omissions never pass silently
  • Uses exact decimal parsing and explicit compare_as modes (string, number, percent, date) without guessing numeric semantics
  • Redacts failure expected/actual values by default into deterministic ordinal refs (v1, v2) or keyed HMAC markers via BENCHMARK_REDACTION_KEY
  • Derives a coarse policy_signals.quality_band (HIGH, ACCEPTABLE, LOW) directly consumable by assess policies
  • Supports composite keys (--key col_a,col_b), --lock verification, witness logging, capabilities --json, and read-only doctor triage

Explicit boundaries & limits

  • An assertion-set score only measures agreement with that supplied gold set; it does not establish accuracy outside the evaluated sample.
  • benchmark scores flat row-oriented relations and refuses to guess how to flatten nested document-shaped JSON.
  • Approved evidence is not automatically ground truth; gold assertions remain human-validated inputs.
Cairn roles
Software factory
Evidence roles
Checks and support
Semantic context
Entity identity, Source meaning
Contribution
Compare entity, field and value assertions with candidate extraction results.
Limit
An assertion-set score does not establish accuracy outside that evaluation set.
Questions this tool can support
  • How do we check the software behind this analysis?

    Evaluate extracted entity, field and value assertions against a reviewed set before relying on an extractor. Scores apply to that evaluation set only.

    Potential use, not demonstrated here

Open-source starter -> Paid lineage stack

Start free on local files. License the paid stack for warehouse-wide lineage.

Open-source Rust CLIs and @cmdrvl/web browser engines cut document token spend 10x to 100x locally and work alongside any AI assistant or hosted workspace (Rogo, Hebbia, Harvey, Claude, ChatGPT, or Codex). When your firm needs end-to-end lineage across Snowflake or your cloud warehouse (Reveal catalog, paid MCP servers, Evidence MCP receipts, x402 APIs, and offline twinning and evals), license the paid stack or start with a $500 half-day founder workshop.

Complete open-source CLI suite (17 interactive offline demos)

Explore every deterministic tool in the spine.

Full /tools/ directory ->github.com/cmdrvl ->

Intake & identity

  • vacuumInventory folders
  • hashSHA-256 / BLAKE3
  • fingerprintClassify files
  • lockPin snapshots
  • canonResolve entities

Compare & validate

  • profileScope columns
  • shapeCheck alignment
  • rvlExplain numeric moves
  • redlineDiff HTML & prose
  • verifyEnforce rules & quotes
  • coverageCheck sufficiency
  • benchmarkcurrent

Common questions

Why does benchmark exit 1 when zero values are wrong but one row is missing?
Because a candidate that drops half the entities can still have 100% accuracy on the rows it kept. Exiting 1 on skips with quality_band = ACCEPTABLE lets CI and assess treat missing coverage explicitly instead of mistaking it for a full pass.
Why is the Homebrew formula named cmdrvl-benchmark while the command is benchmark?
To avoid formula name collisions in Homebrew taps. Installing brew install cmdrvl/tap/cmdrvl-benchmark puts the benchmark binary on your PATH.
Why do failure records show expected_hash=v1 and actual_hash=v2 by default?
benchmark redacts cell contents in default JSON so sensitive financial figures do not leak into CI logs while preserving equality patterns. Pass --explicit when a trusted operator wants raw values.
Does the browser scorer upload my CSV or gold assertions?
No. Parsing, SHA-256 hashing, and assertion scoring run locally in browser memory. Turn off your Wi-Fi before Step 4 and it still works.

Related tools & reading

verify: Validate declared business rules & constraintsassess: Classify evidence bundles into PROCEED/ESCALATE/BLOCKdecoding: Reconcile conflicting multi-source claimspack: Seal tamper-evident evidence packsAll open-source CLIs & paid stack