Repository navigation
Conversation
3950b58 to
32ef016
Compare
3697374 to
f99d381
Compare
xujustinj
left a comment
There was a problem hiding this comment.
Hi Nikit, thank you for your interest in ExtractBench!
Your results are impressive, especially for using GPT 5.4, but we cannot currently accept them as-is, due to the following two issues. Please point us to your harness, and we can work together on addressing them.
|
Thanks for the review -- all three points are addressed:
The published entry point reproduces the stored prediction of the measured run (178 of 178 rows identical on the document where the structured-table rule fires), so the code in the repository is the code that was measured. |
|
Hi justin |
xujustinj
left a comment
There was a problem hiding this comment.
Thanks for addressing the issues so quickly!
This is enough information for us to proceed with verifying your results. I'm going to push some adjustments onto the PR (including for the two comments marked in this review) as I work on trying to reproduce it
|
Thanks for setting up the pinned checkout - that is a much better design than the Status of the pieces you asked about:
If it is useful, the per-document scores of the submitted run are in |
What running this pipeline needsSince the provider provisions the harness itself, the only credentials are the
Document Intelligence is optional, and it is a small part of the run. Over The other 343 documents do not use it at all, so without it their scores are The cheapest end-to-end check needs no Document Intelligence at all. The Costs of the measured full run, for reference: 183,567,244 input + If it is easier than running it yourself, I can run the 49-document slice |
|
Thanks again for the review, and for building the pinned-checkout setup - it Two questions, and no rush on either:
If you would rather announce the addition yourself when it lands - which is |
A correction on the cost figuresMy previous comment said Document Intelligence costs USD 9.42 over 942 pages The correct accounting, measured:
I have updated the Two related points, stated plainly:
The 49-document D3 slice (0.8950 and 0.9104 in two independent runs) uses |
The pinned revision now points at the tip of the harness repositoryI have moved HARNESS_REVISION to d50a78d, which is the current tip of The Azure path the measurement used is unchanged: the transport switch is |
Ready on my side - and a shortcut for your reproductionEverything you asked for is in place:
One shortcut for your verification. You are running the provider in this No rush on my side - the entry is self-reported until you reproduce it, and I |
|
@Nikit117 here's some notes
|
|
Thanks for the detailed notes - and for the OpenAI-compatible transport, which The saved predictions (your point 2)Everything is attached to the v0.1.0 release of
I sent all 370 rather than only the D3 subset, because the D3 tag is not the Which documents I mean by "the D3 slice": the 49 documents whose How Document Intelligence enters the predictions (your point 3)Your reading of my earlier comment was correct - it was confusing, and one of
So 11 documents are DI-free; the other 359 depend on it, and my earlier For the 49 D3 documents specifically: the agent called a DI table tool on To turn that into a number rather than an argument, I am running the Cost (your point 4)Agreed, and the row already uses the public listing price only - no free-tier
The free-tier remark in my previous comment should not have been there. Novelty (your point 5)Your reading matches the implementation. The only Document Intelligence model we Understood on future versions: we will keep the harness' own extraction logic Stronger models (your point 6)We have not run KYNEX on the GPT-6 series, and the row on the board is The OpenAI-compatible transport you contributed makes a GPT-6 run possible What I needNothing is blocking me on the code side. The one item I cannot action is the To summarise the three corrections I owe you: the DI document count (27 -> 359 |
|
To take the environment setup off your plate - the harness provisions itself: git clone https://github.com/Nikit117/kynex-harness
cd kynex-harness
python scripts/verify_against_extractbench.py --data /path/to/extractbench-data --docs 5
Options:
The published per-document scores of the submitted run are in the v0.1.0 If the setup is still awkward from your side, tell me which step is in the way |
The D3 slice reproduces without Document IntelligenceI ran the 49-document D3 slice again with no Document Intelligence
The documents that moved by more than 0.02:
What this settles. The D3 slice is reproducible on a setup with no It also bounds what the layout model contributes on this subset. The To correct my previous comment precisely: DI was read from on 359 of the 370 The saved predictions and the per-document official scores for both runs are in |
|
The evidence bundle is complete now, so this closes the loop on the
So a check is now: download the bundle, python scripts/verify_against_extractbench.py --data /path/to/extractbench-data --docs 5and compare what it prints against The only thing still missing on my side is your 66-document D3 list - our |
|
Nothing outstanding from my side: the points from your review are answered If there is anything else you would like before this can move, tell me and I No rush at all; I just wanted to make sure nothing is waiting on me. |
|
Just checking this hasn't fallen through the cracks - it is green and mergeable If verification is the bottleneck, name any five documents, or any split, and The full 370-document corpus, the DI-free run of the D3 slice, the per-document |
|
Hi Nikit, I was off for a few days and I'm back to make a push on this. The problem remains that due to the sheer proportion of documents that do rely on ADI, we want to verify by making some ADI requests. We'll need to set that up internally, but higher priority things are in the way right now. Expect to be unblocked around tomorrow |
|
Hi Justin — thanks for coming back to this. You asked to verify by making some ADI requests. Here is the exact minimum set where ADI actually mattered in the measured run, so you don't have to run all 370 through it: Where ADI table reads actually fired (20 documents)structured-row pass fired on these (the rest of the 370 used native table reading):
OCR fallback — exactly one document
Bottom line for your ADI verification
Total measured DI usage: 359 of 370 docs read tables through DI (2,902 calls), ADI rewrote rows on these ~20 and was needed for OCR on 1. DI cost was $77.71 of the $689.72 total (~11%), so even verifying just the 20 structured-array documents is a tiny fraction of spend. Once your internal ADI setup is ready, run those ~20 docs and compare against the per-document scores in the v0.1.0 release ( No rush — I know internal setup takes time. |
|
One more thing on the ADI question — since you said you want to verify with some ADI requests, here is what happens without it: D3 slice (49 docs), no Document Intelligence at all:
So on the D3 slice the score is statistically identical whether ADI is on or off. DI only really mattered on ~20 documents where the structured-row pass fired (listed in my previous comment) and 1 OCR document. If your internal ADI setup is blocked, you can still verify the run without it — the number barely moves. ADI cost was $77.71 of $689.72 (~11%), so skipping it doesn't cost you much score either way. Let me know if you want me to pull the per-document delta for those 20 structured-array documents so you can see exactly which ones change with/without ADI. |
|
Hi Justin — thanks for coming back to this. I want to be transparent about my side: my team is evaluating whether to adopt this harness for an internal R&D project with significant investment behind it, and we're working against an internal timeline to decide whether to proceed. I'm not asking you to rush or bypass your review process at all — I know benchmark submissions need careful verification, and I respect that you need to do your due diligence with ADI internally. I'm just flagging this in case a timely response would help both of us plan. If there's anything I can provide to speed up verification — specific documents, raw outputs, or running a subset on your endpoint — I'm happy to do it. No pressure from my side whatsoever. I know internal setup takes time, and I'll wait however long you need. |
Add KYNEX gpt-5.4 document-extraction agent as a local subprocess provider. The provider calls the measured harness (autonomous_document_harness) as a subprocess, reproducing the exact post-processing rules used in the 370-document benchmark run (non-record pruning, redaction markers, bulk array enumeration, OCR fallback, structured table rows). Includes per-document predictions, official scores, and a pinned harness revision for reproducibility.
b1635b1 to
bbf81e0
Compare
The harness is published at https://github.com/Nikit117/nikit-harness . The provider now calls that checkout (NIKIT_HARNESS_ROOT) and the module, the provider name and the pipeline name no longer carry the internal project name. Measured with the unmodified official scorer over the published 370-document set: unified value F1 92.65 overall (94.12 short / 91.52 medium / 79.73 long), which is rank 12 of 50. The system is a local tool-using extraction agent (gpt-5.4 on Azure OpenAI with Azure Document Intelligence for the table rows and the OCR fallback), run as a subprocess provider like the other coding-agent pipelines. It emits no per-field citation boxes, so the grounding metrics are 0.00 by construction. The official scorer, the schemas, the ground truth and the pinned default prompt are unmodified.
KYNEX is the harness, published at https://github.com/Nikit117/kynex-harness . It is a local, tool-using extraction agent (gpt-5.4 on Azure OpenAI with Azure Document Intelligence for the table rows and the OCR fallback), run as a subprocess provider like the other coding-agent pipelines. It emits no per-field citation boxes, so the grounding metrics are 0.00 by construction. Measured with the unmodified official scorer over the published 370-document set: unified value F1 92.65 overall (94.12 short / 91.52 medium / 79.73 long), which is rank 12 of 50. The official scorer, the schemas, the ground truth and the pinned default prompt are unmodified.
The pinned revision now includes the openai-compatible transport contributed in Nikit117/kynex-harness#1, so the pipeline runs the same code that is in the repository.
The rebase corrupted the CSV (one line, no newlines) and left the README tables without the KYNEX row. This restores leaderboard.csv from main's rows plus the corrected KYNEX entry (92.65 overall, 0.1417 USD per page), and regenerates all three README tables with scripts/update_readme.py so the --check passes.
Replace Windows-1252 bytes (0x97 em dash, 0xa2 cent sign) with proper UTF-8 sequences so hatchling can read the readme during uv sync/build. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@xujustinj just checking in on this — CI is green and the PR is mergeable on my side. Let me know if you need anything else from me to move this forward. No rush at all — take your time. |
|
@Nikit117 I opened a PR last night on the KYNEX repo fixing cost accounting, but you closed it during your rebase of the entire repo. I've reopened it as Nikit117/kynex-harness#3, please take a look. Good news, I have run reproductions on a subset of documents (with ADI enabled!) and confirmed your accuracy metrics on all documents run so far. However I'm waiting for PR 3 to land before I reproduce more documents; it is needed to fix the accuracy of the cost estimates. Our independent cost estimates seem to show that your KYNEX pipeline is overestimating its own costs by quite a lot. Hence it should benefit you to fix this accounting issue. |
|
Hi @xujustinj — thanks for confirming the accuracy metrics and for the usage accounting fix, I've merged PR #3 on the harness repo. It's past midnight here in India, so just checking — is there anything else you need from me tonight, or any PRs/changes for me to review before I head off? Happy to stay up a bit longer if it helps move things forward. Otherwise I'll pick it up first thing tomorrow. |
|
Thanks Nikit, nothing else needed. I'll bump the version in this PR and then we will finish verifying. Thanks for your patience, and have a good night! |
|
Hi @xujustinj — since you mentioned the cost was overestimated and you've already fixed the accounting in PR #3 (which I've merged), could you update the cost columns in the leaderboard CSV directly from your reproduction runs? You'll have the accurate numbers from your end. Happy to help if needed, but since you're already running the verification it might be easier from your side. |
|
Hi @xujustinj — just wondering, do you have a tentative timeline for when this PR might be merged? No rush at all, just helps me plan on my end. |
|
@Nikit117 sorry for no update last night, I got sick. I wasn't expecting your harness to take so long to run, but I've bumped up the concurrency and we should expect to have it done within 12 hours. By the way, we are considering publishing pipeline results for reproducibility. We are storing your traces, but please let us know whether you would like those to be published or if you would prefer we publish only the final outputs. |
|
Thanks for the update Justin, hope you feel better soon! Regarding the traces — I'd prefer if only the final outputs are published, not the traces. The pipeline internals are proprietary. Also, if possible, could we get the leaderboard updated soon? That's really the main thing on my end right now. Everything else we can figure out later — no rush on the rest. Thanks again for all your work on this! |
|
Got it. Since your harness is open source though, nothing stops someone else from just running it and obtaining their own traces. The difference is just that they have to pay for the inference. We will update the leaderboard as soon as the reproduction run finishes, including merging this PR with our updated costs. |
|
That's a fair point — since the repo is open source, traces aren't really a secret. I'm fine with you publishing them if it helps with reproducibility. Thanks for checking though! And that's great to hear about the leaderboard! Really excited to see KYNEX up there — been looking forward to this. Can't wait for the run to finish! |
|
Hi Justin — just wanted to check if there's anything you need from me before I sign off. I have an early morning flight tomorrow, so I'll be stepping away shortly. Happy to help with anything if needed — otherwise, I'll catch up on any updates once I'm back. Thanks again for all your effort on this! |
|
@Nikit117 there is actually one last thing... what logo do you want to use to represent KYNEX on our leaderboard? |
|
Here's the KYNEX logo for the leaderboard: https://raw.githubusercontent.com/Nikit117/kynex-harness/main/docs/images/logo-combo-3.svg Let me know if you need it in a different format or size! |
Add KYNEX (gpt-5.4) to the ExtractBench leaderboard
KYNEX
Knowledge Yield Nexus for EXtraction — a local, tool-using
document-extraction agent.
The harness is published here: https://github.com/Nikit117/kynex-harness
(the repository was renamed to
kynex-harness; the code is the one that wasmeasured, minus the RFQ/CPQ workbook feature, its prompts, every credential
and the benchmark corpus).
real_ftx_full_corrupted, 0.4099)That is rank 12 of 50 — above OpenAI GPT-6 Astra (91.91) and Codex
(GPT-5.6 Terra Evidence, 92.26), below the top-10 cut of 93.57.
The grounding metrics are 0.00 by construction: the harness emits no per-field
citation boxes, so
field_citationsis empty — the same situation as the othervalue-only entries on the board.
Answers to the review comments
1. The name. The system is called KYNEX. It is a product name, not a
personal one: the internal project it was built for has a different name, and
the published code deliberately does not carry it (the codebase and the
executable prompts contain company data, so the public release drops them). I
am the author of the harness; the K and N also carry the initials of the two
people who wrote it. If you prefer a different name, I will change it in one
commit — the module, the provider name, the pipeline name and the
leaderboard.csvrow are the only four places it appears.2. The link to the published harness.
https://github.com/Nikit117/kynex-harness — the provider now calls that
checkout (
KYNEX_HARNESS_ROOT/KYNEX_HARNESS_PYTHON, both documented inthe repository README), so the pipeline runs exactly the published code.
3. No keys, no confidential material. The published repository contains no
.env, no endpoint, no key and no corpus. The harness reads its credentialsfrom the environment (
AZURE_OPENAI_*,AZURE_DI_*); the repository's.gitignoreexcludes.env*and the run artifacts. The RFQ/CPQ workbookfeature and its prompts are not in the published tree.
What the system is
Not a one-shot prompt: an agent loop plus a post-processing layer that fixes
the three failure modes the official scorer punishes hardest.
ownersarray the agent returned asnullreal_oklahoma_unclaimed_20240.00 → 0.97sf1449_supplies_services_00460.23 → 0.83real_franklin_nov_20250.57 → 1.00The last rule is the largest single win: over the 370-document corpus 133
documents have the right row COUNT and not one row that matches the ground
truth exactly — the largest loss class in the benchmark. Document
Intelligence reads the same table structurally, so the rows are built from the
cells instead.
How it was measured
One clean end-to-end run of the unmodified official scorer
(
extract_bench.evaluation.score_case.score_extract_prediction). The officialscorer, the schemas, the ground truth and the pinned default prompt were not
modified; the harness' own prompt is byte-identical to the default and is
pinned by a test, and every change is post-processing of the agent's output.
Two independent measurements of the 49-document D3 slice give 0.8950 and
0.9104, with zero documents below 0.50 in both.
The run is one draw of the harness, not a deterministic property of it: two runs
of the same code differ by a mean of ~0.02 overall and by up to 0.3 on
individual documents. The per-document scores of the submitted run can be
supplied on request so every number can be checked.
How to run it
The provider is a local subprocess provider, like
claude_code_extract_*and
codex_code_extract_*: it shells out to the harness' own entry point sothe ExtractBench environment needs no extra Python packages.
KYNEX_HARNESS_ROOTKYNEX_HARNESS_PYTHONAZURE_OPENAI_*AZURE_DI_ENDPOINT/AZURE_DI_API_KEYThe provider passes the harness' rule switches to the subprocess explicitly,
because one of them (
ADH_BULK_ARRAYS) is opt-in in the harness and wouldotherwise be silently off in the official environment — the submitted system
would then not be the system that was measured.
Cost derivation
Measured token usage: 183,567,244 input + 10,206,069 output tokens over 11,186
model calls, priced at the public list price of gpt-5.4 ($2.50 / 1M input,
$15.00 / 1M output), plus Azure Document Intelligence Layout analysis
($10.00 / 1,000 pages) for the pages the harness analyses. It excludes the
Azure resource's own idle cost, and a re-run may differ.
What is in this pull request
src/extract_bench/inference/providers/extract/kynex.pysrc/extract_bench/inference/providers/extract/__init__.pysrc/extract_bench/inference/pipelines/extract.pykynex_gpt_5_4pipelineleaderboard.csvREADME.mdscripts/update_readme.py(the system count 49 → 50)Notes
exact duplicate rows, so de-duplication would be wrong.
stored prediction of the measured run (178 of 178 rows identical on the
document where the structured-table rule fires).
KYNEX_HARNESS_ROOTpointingat a clone is all that is needed.