Skip to content

Score nested arrays, pairing cost, and schema defaults in extract value F1 - #38

Open
xujustinj wants to merge 2 commits into
mainfrom
justin/port-canonical-value-f1
Open

Score nested arrays, pairing cost, and schema defaults in extract value F1#38
xujustinj wants to merge 2 commits into
mainfrom
justin/port-canonical-value-f1

Conversation

@xujustinj

@xujustinj xujustinj commented Sep 9, 2026

Copy link
Copy Markdown

Summary

  • Treat nested primitive arrays (string[], number[], and null combinators) as one opaque cell instead of silently skipping them.
  • Pair nested objects and nested object-arrays with Hungarian cost over child fields, not 0/1 dict equality.
  • Fill omitted keys from JSON Schema default when present; without default, an omitted key is a one-sided miss (not implicit null). Pairing reads those same nested leaves through lookup, so omitted defaulted fields pair as the default rather than None.
  • Treat NaN/Inf/zero-size bbox IoU as a miss. Envelope grounding, per-layer F1, and Extract Element Pass Rate are unchanged.

Test plan

  • uv run --extra dev python -m pytest tests/extract_bench/evaluation/metrics/extract/test_unified_evidence_metric.py tests/extract_bench/evaluation/metrics/extract/test_array_record_match_metric.py
  • Spot-check that schemas with "default": null still treat omit as gold-null (same as before on this corpus)
  • Re-score a cached extract run after merge if leaderboard numbers should reflect the new pairing / nested-array cells

Made with Cursor

…ue F1.

Treat primitive arrays as one opaque cell, pair nested objects by child-field cost, fill omitted keys from JSON Schema default, and treat NaN/Inf/zero-size bbox IoU as a miss. Envelope grounding and per-layer metrics are unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
@xujustinj
xujustinj force-pushed the justin/port-canonical-value-f1 branch from d7b3d54 to 93763e4 Compare September 9, 2026 15:44
@xujustinj xujustinj changed the title Match experimental extract value F1 scoring Score nested arrays, pairing cost, and schema defaults in extract value F1 Sep 9, 2026
Pairing walked nested keys with .get, so omitted defaulted fields looked like None while F1 scored them as the default and could assign the wrong rows.

Co-authored-by: Cursor <cursoragent@cursor.com>
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