Skip to content

Add LandingAI ADE v2 extract pipeline and results (dpt-3-pro-20261111 + extract-20261111) - #172

Open
andreakropp wants to merge 8 commits into
run-llama:mainfrom
andreakropp:landingai-v2-pr
Open

andreakropp wants to merge 8 commits into
run-llama:mainfrom
andreakropp:landingai-v2-pr

Conversation

@andreakropp

@andreakropp andreakropp commented Nov 21, 2026 •

Copy link
Copy Markdown

Adds landingai_ade_v2_extract, a pipeline for LandingAI's current Agentic Document Extraction APIs, and its results on the full ExtractBench set as a new leaderboard.csv row, LandingAI Agentic Document Extraction (DPT-3 Pro) (Specialized APIs), with the README tables regenerated. The existing landingai_extract pipeline uses the v1 endpoints and dpt-2-latest; the current models are only served by the v2 APIs. landingai_extract is unchanged.

Results (all 370 documents, ExtractBench's own evaluator)

Metric Value
Value F1 (precision / recall) 94.11 (94.23 / 94.07); short 94.88, medium 93.26, long 88.65
Grounded F1 / page F1 66.14 / 83.48
Cost per page (billed credits × $0.01) $0.0474 (short $0.0472, medium $0.0373, long $0.0996)
Latency p50 / p90 per document (parse + extract) 279 / 720 s (max 1,423 s)
Documents failed or over the 30-minute cutoff 1 failed, 0 over the cutoff (long/real_ishares_iboxx_bond_etfs: the service's extract job hit its own time limit; failed without retry, as described below)

Run 2026-11-20 15:48–20:19 PT on the public production API, standard tier, with this branch's connector as of "locate numbers returned without ranges" (run from an earlier base, 36e9d20; the connector code is identical). Commands, into one output folder: --group long --max_concurrent 4, then --group medium --max_concurrent 8, then --group short --max_concurrent 12, then --skip_inference. One short document (sched_i__after_violence_project_ty2024) failed on a float-rounding bug in this connector's cost total (the attempt total was 1e-17 below the sum of the stage charges, which the harness rejects). The commit "sum stage charges so the attempt cost matches the components" fixes it with a test; that one document was re-run with the fix (other documents skipped), and all 370 were re-scored. The scores above are from this branch's evaluator (upstream ab573f7, including #168–#170); they match the scores from 36e9d20 exactly. The leaderboard.csv row and regenerated README (scripts/update_readme.py) are included; we can share the evaluation reports and raw outputs on request.

What the pipeline does

  • Parses each PDF with v2 Parse Jobs (dpt-3-pro-20261111), then extracts with v2 Extract Jobs (extract-20261111) from the parse Markdown. The benchmark schema is passed unchanged.
  • Both stages are async jobs polled against the document's shared execution budget, so the harness deadline and cancellation apply. Default timeouts; no provider-specific overrides.
  • An extract job that the service stops at its own time limit (error.code = "timeout") fails the document without a retry: a retry would pay for a new parse and hit the same limit. Other job failures keep the harness's usual transient/permanent handling.
  • Standard service tier (the default tier of the public API).
  • Cost: billed credits from both stages (metadata.billing.total_credits on parse and extract), at the $0.01/credit list price. Failed-attempt credits are recorded through record_response_cost.
  • Grounding: Extract returns Markdown ranges per field; these are mapped to the parse's word-level atomic_grounding boxes. Only the words that match the extracted value are kept (digits for numbers, checkbox marks for booleans), and each run of words is merged into one box. Values returned without a range are located in the Markdown (text by its words; numbers as printed, with thousands separators). A value found in several places gets a box for each. Null values get no box. No extra API calls, so Grounding_Added_Cost_Per_Page is 0.
  • The parse Markdown is kept in the raw output, so citations can be rebuilt from saved results.

Public access: self-serve sign-up at https://ade.landing.ai; key via LANDING_AI_API_KEY (or VISION_AGENT_API_KEY). Requires landingai-ade>=1.13.0 (bumped in pyproject.toml and uv.lock).

Tests: tests/extract_bench/inference/providers/extract/test_landingai_v2.py (18 tests: job flow, pinned models, unchanged schema, cost from both stages, error classification incl. no retry after an extract timeout, config validation, citation building). Full suite passes; ruff clean.

🤖 Generated with Claude Code

Andrea Kropp and others added 8 commits November 20, 2026 20:42
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Jobs)

The existing landingai_extract provider calls the Gen1 parse/extract
endpoints, which cannot reach DPT-3 parse models or v2 extract models.

- New provider landingai_ade_v2_extract: v2 Parse Job then v2 Extract Job,
  schema passed unchanged, polled against the shared execution budget.
- Cost from metadata.billing.total_credits per stage at $0.01/credit;
  partial billing kept when a later stage fails.
- New extract_landingai_v2_field_citations: maps extraction ranges to the
  parse structure's atomic_grounding (word-level on dpt-3-pro-20261111),
  falling back to the smallest overlapping block.
- Registered pipeline landingai_ade_v2_extract pinned to dpt-3-pro-20261111
  and extract-20261111, grounding on, standard tier.
- Docs, .env.example, and tests with mocked SDK responses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he range

Word-level atomic grounding (dpt-3-pro-20261111) turned each cited range into one box
per word, and ranges often include the field's printed label and neighbouring lines.
ExtractBench needs a single box that overlaps the answer-key box (IoU >= 0.5), so
multi-word values and labelled ranges missed.

With the parse Markdown, citations now keep only the words that match the extracted
value (digits for numbers, checkbox marks in the reported state for booleans, word
fragments next to matching words), merge each run into one box, and locate values that
Extract returned without ranges. The parse Markdown is kept in the raw output so
citations can be rebuilt from saved results without API calls.

On the first trial document grounded F1 goes from 71.2 to 80.0 (page F1 94.9 to 96.7);
value F1 is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-side

A failed extract job with error code 'timeout' was classified as transient,
so the runner retried it up to five times. Each retry re-ran the parse and
hit the same server limit (observed on long/real_ishares_iboxx_bond_etfs:
6 attempts, 2 h 13 min, six paid parses). The document now fails at once;
parse credits already spent stay in the cost accounting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When an extraction comes back without Markdown ranges (seen with a
budget_exhausted warning on long/real_credit_strategies_full), numbers were
not searched for, so they got no boxes. They are now located as printed,
allowing thousands separators and trailing decimal zeros; numbers with fewer
than three digits are skipped as too ambiguous. Offline re-score: credit
grounded F1 39.3 -> 56.9; the 6-document test set is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nents

(a + b) * rate can round below a * rate + b * rate, which the harness
rejects as invalid billing and fails the document (seen once in 370 docs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Full ExtractBench run (370 documents) with landingai_ade_v2_extract:
value F1 94.11, word grounding F1 66.14, page grounding F1 83.48,
$0.0474 per page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xujustinj

Copy link
Copy Markdown

Hi @andreakropp! Thanks for the submission, I will review this soon. We noticed your blog post at https://landing.ai/blog/extractbench-results-landingai-dpt-3-pro and this is totally fair criticism at the moment since I still haven't gotten around to releasing the v1.2 annotations. When we do release them, we will use landing-ai/agentic-document-extraction-benchmarks#1 to update your results

@andreakropp

Copy link
Copy Markdown
Author

Thanks for the quick reply @xujustinj
It's always hard to strike the right tone on blog posts. This is a great set of documents. I recognize that it is hard to have an answer key across 800,000+ values that everyone is happy with. As the answer key improves, then the scores at the very top will become more meaningful.

This branch has not been deployed

No deployments
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.

2 participants