OB-LegalQA-Document-Parsing:
Parsing Redlined Contracts for an Agent

Changelog

Version 1 parsed each contract once and scored answers mostly by token matching. Version 2 runs every contract and question three times, has a model judge every answer and adds a parser. Version 3 reviews every question by hand and fills the sets so that every usable redline is asked about. Version 3 is not yet scored.

  1. Held-out set fixed at 1,500 questions. Image-only rendering added.
  2. Structure-tree reference arm retired.
  3. Version 1 published: nine task types from RedlineBench, one parse and one ask per question, gpt-5.6-sol as reader, token matching with a model judge for the rest.
  4. Judge prompt revised.
  5. Held-out runs on both renderings under one reader and one judge.
  6. Version 2 published: three parses and three asks per question, gpt-6-sol judges every answer, gpt-6-luna as reader, Unstructured added, every parse billed.
  7. Every validation and held-out question reviewed by hand, twice. 280 rewritten, 115 dropped.
  8. 26 new questions added to each set. Validation 300, held-out 1,441. Version 3, unpublished.

Introduction

OB-LegalQA-Document-Parsing measures how well document parsers prepare a heavily redlined contract for an AI agent that answers questions about it. The parsers under test are specialised document parsing APIs, frontier vision-language models and general document platforms. Each parser converts the contract PDF to markdown, and a fixed agent answers questions from that markdown. The agent, its prompt and the questions are the same for every parser, so differences in score come from the parse.

Markdown can read cleanly and still misrepresent an edit, for example by presenting deleted text as live or dropping an insertion. An answer counts as correct only when the parse carried the meaning of the edit through to the agent.

Task

Every question is written from one tracked change in the source contract, so its answer key comes from the markup. There are nine task types: numeral strike, word-internal strike, struck clause, old and new side by side, struck definition term, struck table cell, mixed edits on a page, proposal between rounds, and stale cross-reference.

Figure 1. One question, the page it is about, and two real parses of that page.

Question

How many business days’ advance written notice must Provider give LargeCo for Scheduled Maintenance?

Answer key

Five (5) business days.

Negotiated from ten to three to five, each earlier number struck in place.

The page, as rendered in the PDF · page 18 of 38

Clause 3 of a service level agreement. The notice period reads 'at least ten three five (5310) business days', with ten, three and 310 struck through, leaving five (5).

✓ Strike kept the agent can tell which number is live

… of Scheduled Maintenance at least <del>ten</del> <ins>three-five</ins> (<ins>53</ins><del>10</del>) business days in advance.

✗ Strike lost every round reads as live text

… of Scheduled Maintenance at least ten three five (5310) business days in advance.

Asked against the second parse, the agent answers 5310 business days, or ten. The number it needed was lost before it saw the document.

Table 1. How each answer is classed.

BucketWhen
CorrectThe deletion was treated as removed, and the agent gave the negotiated position.
StaleDeleted text was read as live. This is the failure the benchmark targets.
FusedDeleted and inserted text were combined into a value found in neither version, such as 5310 above.
OtherWrong for a reason the markup does not explain, or two positions asserted at once.

Results

Version 2 was run on the 1,500-question held-out set over 94 contracts, in two renderings: the exported PDF with its text layer, and the same pages as 200 dpi images. Eleven parser configurations were scored on the native rendering and nine on the image-only rendering, each listed under APIs benchmarked. Version 2 scores are on the leaderboard.

Each score is the mean over nine replicates, three parses times three asks, and is reported with its standard deviation. Parsers within each other’s spread are treated as tied.

Dataset

The contracts come from RedlineBench (CC BY 4.0), simulated negotiations marked up by trained annotators for each side, as standard Word tracked changes. Margin comments are stripped first, because several state the answer. LibreOffice renders each file to PDF, struck and coloured the way Word draws it. Each edited clause is classified by the form of its edit, and a model writes one question per edit from the resolved facts, without seeing any parser output.

A question is kept only if its answer depends on seeing the strike. Questions whose correct and stale answers match are dropped, as are questions about wording, edits to punctuation or spacing, deletions restated elsewhere in the same clause, and proposals carried forward as plain text. The image-only rendering rasterises every page to a 200 dpi JPEG, the lowest resolution at which the 0.5 pt redline strokes stay legible, and wraps the pages back into a PDF without a text layer.

Table 2. Splits, in questions.

SplitVersion 2Version 3
Public9595
Validation304300
Held-out1,5001,441

The public sample covers seven contracts and includes answer keys and the oracle and blind renderings, so it is not contamination-free. It is published so the format can be inspected and the harness run locally.

Every validation and held-out question was reviewed by hand, twice. A question was rewritten when it did not name the clause it asks about, or when its answer key missed part of the change on the page. It was dropped when it could not be fixed. New questions were then written so that every usable redline in the 94 contracts is asked about in one of the three splits.

The oracle ceiling shows what the first validation pass fixed. On the 44 rewritten questions the oracle answered 86.4% correctly before the rewrite and 95.5% after, on the native rendering. On the 30 dropped questions it answered 58.9%. Half of the dropped questions (15 of 30) asked about a clause that was deleted whole.

On the held-out set the oracle ceiling rose from 94.6% to 98.0% on the native rendering and from 93.8% to 97.7% image-only.

Changelog

  1. Validation set, first pass: 74 of 304 questions flagged. 44 rewritten, 30 dropped. 274 left.
  2. Held-out set, first pass: 284 of 1,500 questions flagged. 216 rewritten, 68 dropped. 1,432 left.
  3. Validation set, second pass: 4 of 274 questions flagged. 4 rewritten.
  4. Held-out set, second pass: 33 of 1,432 questions flagged. 16 rewritten, 17 dropped. 1,415 left.
  5. 26 new questions added to each set. Validation 300, held-out 1,441.

Judge

A model judge, gpt-6-sol, puts every answer in one bucket of Table 1, with a one-clause reason. It sees the question, the correct, stale and fused reference answers and the agent’s answer. The contract and the parser’s name are withheld. Answers to the same question are judged twenty at a time, each labelled on its own.

Every question also carries correct, stale and fused match strings, and the whole-token match is stored on every row as an audit of the judge. When the judge prompt was revised, 13 of 20 sampled disagreements between judge and token matching were answers marked wrong for naming the live replacement clause, which the reference did not mention.

Two reference arms are built from the source file without a parser. The oracle is markdown with struck text marked as struck, the ceiling a perfect parse allows. The blind arm is the same markdown with all markup removed, the floor when every strike is lost.

Changelog

  1. Version 1: token matching settles most answers, a model judge the rest.
  2. Judge prompt revised after a review of judge and token-match disagreements.
  3. Version 2: gpt-6-sol judges every answer. Token matching kept as an audit.

Harness

Every parser receives the contract PDF and is asked for markdown. The source Word file is withheld, because its XML records each deletion directly. Where a vendor has a first-party SDK the harness uses it; otherwise it calls the REST API and polls asynchronous jobs every five seconds. The only change made to parser output is joining pages or chunks in order. Frontier models receive the same PDF and one shared instruction asking for a faithful markdown rendering, which does not mention strikethrough.

The agent, gpt-6-luna, receives only one parser’s markdown for one contract and one question. The edit type, the expected answer and any mention of tracked changes are withheld, and the prompt is byte-identical across parsers.

Table 3. Runs per question.

StepModelRuns
Parsethe parser under test3 per contract
Answergpt-6-luna3 per parse, prompt cached on the contract
Judgegpt-6-solevery answer, twenty answers to one question per call

Cost is the parse bill for one pass over the corpus, averaged over the three parses, from usage metadata, credits consumed, list price per page or token list prices, by vendor. Agent and judge costs are excluded. Cost per 1,000 correct answers divides that bill by the correct answers from one ask of every question.

Changelog

  1. Image-only rendering added.
  2. Version 2: three parses and three asks per question. gpt-6-luna replaces gpt-5.6-sol as the agent. Every parse billed.

APIs benchmarked

Every parser configuration scored in version 2, with the interface the harness calls and the settings it sends. Claude Fable 5.1 and GPT-6 Astra are frontier models given the same PDF and one shared parser prompt.

Table 4. Parsers and their settings.

ParserInterfaceSettings
Datalab convertREST, multipart POST /api/v1/convert, then polledmode: accurate, output_format=markdown
Datalab track changesREST, multipart POST /api/v1/track-changes, then polledoutput_format=markdown. A separate, purpose-built tracked-changes endpoint rather than a flag on the normal one.
Extendextend-ai SDK: files.upload() then parse()engine: parse_performance, advancedOptions.formattingDetection: change_tracking, 2026-10-17 build
LlamaParse agenticllama-cloud SDK: files.create() then parsing.parse()tier: agentic, version: 2026-09-29
LlamaParse agentic plusllama-cloud SDK: files.create() then parsing.parse()tier: agentic_plus, version: 2026-09-24
Mistral OCRREST, JSON POST https://api.mistral.ai/v1/ocrmodel: mistral-ocr-4-1, PDF inline as base64
PulseREST, multipart POST https://api.runpulse.com/extractmodel: pulse-ultra-2, refine_options: text + tables + formatting
Reductoreducto SDK: upload() then parse.run()model: r-1, formatting.include: change_tracking, 2026-10-06 build
UnstructuredREST, multipart POST /api/v2/parse, then polledprofile: best, output: markdown
Claude Fable 5.1Bedrock converse, document block, PDF as bytesmodel: claude-fable-5-1, shared parser prompt
GPT-6 AstraOpenAI Responses API, input_file, PDF inline as base64model: gpt-6-astra, shared parser prompt

Limitations

Tracked-change settings. Tracked-change detection is opt-in on several parsers and a separate endpoint on one. Without it a parser returns struck text as ordinary prose and scores near the blind floor. Every parser runs with its vendor’s tracked-change support enabled, so results describe parsers configured for redlines.

Image-only coverage. Two configurations were not run on the image-only rendering. The page images exceed one model’s input limit, and one parser converts every input to images, so both renderings would give it the same result.

Model-written questions. Questions are written by a model from the resolved edits and then checked. The hand review in November rewrote or dropped 395 of the 1,804 validation and held-out questions, and the version 2 results were scored before it.

Partners

Design partners suggest domains, help us understand which evaluations are useful to their customers, and subscribe to our evaluations on the public and validation sets. Task design, data preparation, labelling and the held-out set are not shared with or influenced by any partner. Partners have no say in scores and can rank below providers that are not partners.

Design partners

  • Reducto
  • LlamaIndex
  • Extend

Data

RedlineBench (CC BY 4.0).

Annotators

The people who built and reviewed the questions in this version.

Not yet listed.