Skip to content

BigDocs

BigDocs: the benchmark

BigDocs: part 2 of 12

Over the years I have adopted a handful of patterns, mostly borrowed from data architecture and engineering to help with BigDocs work, where near enough isn’t anywhere near good enough. These patterns can be used in flexible combination, depending on the challenge, and sequenced into a workflow or pipeline. In practice, that pipeline is built as skills. Start with a skill

This article presents a benchmark of these patterns on a hard case, contract review: the pipeline against one big prompt.

The patterns

Each pattern has its own more detailed piece. Here is the short version.

The Agentic Wordhouse. A dimensional model for your words, building on Andrej Karpathy’s LLM Wiki with ideas from data warehousing.

In organisations, documents are usually accumulated and stored chronologically, one at a time. For example, a series of employment agreements goes back over time, with some variations in clauses, or executed service agreements change shape with each party. To read any one is to read a Big Document full of complex subject areas applied to a specific instance or case. To read many is to wade through a lot of content about all those subject areas.

The Wordhouse turns that around: one document per topic (limitation of liability, payment terms, data protection), with the variants as instances inside it. Each position records what we accept or reject, the fallback we can offer, when to escalate, and the exact source wording it came from in the instances where those have been considered. It’s flipping the dimension for instance of a document with all the subjects covered, to the subjects with all the instances described. How do you get this topic-centric view of a collection? It sounds like rewriting all your content would be needed, but building and maintaining the Wordhouse can be automated too, using general purpose agents such as Claude.

Structure first. Documents are written for human eyes. Numbering, indentation, tables, columns and schedules carry meaning that a model only half sees, and if you ask it to find the structure for itself it will probably find a slightly different one each time. Sometimes the numbers presented in a document aren’t there: they are just a format that is rendered as numbers when you open the document. So before any judgement, code splits the incoming document using the structure it already carries: its numbering, headings and schedules. A second, independent reader confirms every word was captured, and anything left out is left out on purpose, with a reason. A person confirms the structure in a plain text file or a review page before going any further with the work. Everything after that works through the confirmed structure as many small tasks instead of one giant one. It’s how we build reliability into the process.

The mapping file. Left to itself, an agent decides as it goes what to read and what to skip when comparing across documents, and you only find out afterwards. Better to write the job down first. The model reads a short index of the Wordhouse and proposes which topics each part of the document needs. A person approves that plan, and it becomes a fully mapped task list: every part, the topics it will be checked against, and the output each task must return. Only then does anything run. No embeddings or vector store, and you can see exactly what each task was given and why. This is how we ensure context is clean and every comparison made or synthesis performed.

Never retype. When people ask an agent to review a whole document against others and return it with the changes made, it retypes the whole document, with variations. Every time a model retypes text it has a chance to change it: 30 days becomes 60, “must” becomes “should”, a sub-clause quietly merges into its neighbour. That is where the errors nobody notices live. So instead the pattern is to let the agent operate tools that directly copy and modify text, without retyping it. Edits are operations on exact pieces of the source, placed into the customer’s own Word file by code. If the model can’t retype it, it can’t mistype it.

Output built for oversight. Outputs need reviewing, and the reviewer needs guidance. A tidy redline of a legal contract can hide its reasons, so the reviewer is left to trust it or redo it. Instead, every clause gets its own row: the decision, the positions it relied on, the reasoning, a line for the customer. Escalations and gaps are set aside for a person to decide, not quietly resolved. Make the original, the new output, and its reasons, and any extra explanatory information visible for easy review.

Maintaining the Wordhouse. A library goes stale the day after you build it, and maintenance is where most knowledge bases quietly die. The library is built and kept current by its own skill, with its own checks, so a team can look after it without a developer. A Wordhouse that maintains itself is like the data warehouse that has freshly updated and organised data. The stale one is a liability so make it easy or automatic to keep fresh.

Build the tests in. Software teams stopped trusting “it looks right” a long time ago. We need to do the same with any BigDocs work. This is borrowed straight from engineering. Every stage and every step checks its own completeness, and the work loops until the tests pass. People don’t review outputs until the agent has done the hard work.

The benchmark

The setup. This benchmark is designed to be a real-world scenario using publicly available test data. The scenario is as follows:

A software provider (us) reviews a customer’s (theirs) proposed contract bundle against its own standard paper and negotiating policy. Both sides use public, open-licensed agreements so anyone can repeat the test.

  • Our paper is Common Paper (cloud service agreement, AI addendum, data protection, SLA, professional services and cover page). The Wordhouse skill built a 22-topic library of 174 positions from it. I also added an internal policy layer: filled-in values, fallbacks, terms we reject and escalation triggers and suggested wording for negotiation.
  • The customer’s paper is the Bonterms bundle: six documents, 585 paragraphs, about 25,000 words.
  • I planted 15 departures in each test case, so there is a known right answer. They range from a one-word change to a whole new section, and from minor to serious, and include new terms no policy covers, which a good reviewer should send to a person rather than decide.

What was compared.

Treatment What it is Runs
Pipeline The patterns above, as Claude skills 11 on the Bonterms cases, 3 identical repeats on one case
Single prompt, show changes only Fresh Claude, no tools, one prompt holding our paper, the policy note and the customer contract. Asked for the changes it wants 1
Single prompt, show every paragraph Same inputs. Must return every paragraph with its decision and a reason, and is told that silence is a failure 3

The inputs are deliberately unequal. The single-prompt treatments get the raw documents and the policy; the pipeline gets the Wordhouse built from them. The Wordhouse structure is part of what is being tested in the pipeline. This is method against method, not model against model. Same model throughout: Opus 5.5 with medium reasoning.

Benchmark results: structured pipeline against one big prompt
PipelineOne prompt, changes onlyOne prompt, every paragraph
Knowing you have it all
Stopped early without saying so0 of 11Unknowable3 of 3
Paragraphs analysed100%Not reported86 to 89%
New and alien terms detected and escalated3 of 3NeverNever
Getting it right
Planted departures classified correctly (of 15)141010 to 12
Reproducibility
Same exception classification in all 3 runs14 of 15Run once only, unknown7 of 15
Agreement on how serious each exception is96%Run once only, unknown64%
Showing why
Decisions citing a checkable source85 to 87%Not reported1 to 17%
The redline
Average words deleted per changed paragraph6.52210
Section deleted without a marker0 of 3 runsn/a3 of 3 runs
Effort
Cost per runUS$7 to 10US$0.52US$4 to 4.70
Time per run5 to 6 min3 minAbout 17 min

What I found

It stops without telling you. In all three of its full runs the single prompt reached its output limit and stopped, between 11 and 14 percent short of the end. The last part of the services agreement and the whole SLA were missing, and the reply simply ended. On a larger Commonwealth government contract of about 38,000 words, both single-prompt runs stopped after 22 to 30 percent. That’s a lot of skipped clauses. In contrast, the pipeline accounted for every paragraph in every run, and listed what it set aside on purpose, with a reason. A checksum comparing the output with the original confirmed completeness, so there was no need to wonder whether everything in our paper and theirs was covered.

It is a lottery on what matters. To see whether the same answer comes back, the pipeline was run three times on the same case, and so was the every-paragraph single prompt. (The changes-only prompt was run once, so how consistent it is remains unknown.) Both noticed much the same problems: in each set of three runs, the approach agreed with itself on whether a planted departure was a problem 14 times out of 15. The difference is in how serious they said it was. Only 7 of the 15 got the same classification in all three single-prompt runs, against 14 of 15 for the pipeline. Agreement on severity was 64 percent against 96 percent. One single-prompt run scored as well as the pipeline, but you can’t tell in advance which run that will be. If you want reliability and a basis for confidence this kind of variance won’t cut it.

You don’t know why. The pipeline names a checkable library position for 85 to 87 percent of the clauses it reviews, and every position it names exists. The single prompt cited a source in just 1 percent of its reasons in one run and 17 percent in another. It can cite section numbers in our standard paper, but not an internal policy with no numbering, so the decisions that most need checking came back as assertions nobody can check.

It edits with a heavier hand. The pipeline deleted about 6.5 words per suggested changed paragraph. The single prompt deleted about 10 words when working paragraph by paragraph, and about 22 when asked only for its changes. This matters when you are suggesting changes to a contract the other party cares about: more change means more review work, and a sense that you are being difficult.

All three every-paragraph runs also deleted a whole section without saying so. Contracts usually mark a removed section “[Intentionally omitted]”, so the numbering stays the same and references from other clauses still point to the right place. The single prompt left a gap in the numbering or an empty heading instead, and didn’t update the clauses elsewhere that referred to the deleted section.

It doesn’t know what it doesn’t know. When a new term appeared that was not covered in our paper, the pipeline sent it to a person for review every time as instructed. The single prompt invented a negotiating position for it in all three cases, and confidently suggested an alternative unapproved position.

It is cheaper and slower per run. A single-prompt run cost about US$4 to US$4.70 and took about 17 minutes under these conditions. A pipeline run cost US$7 to US$10 (about twice as much) and took 5 to 6 minutes, because small tasks could run side by side. That cost is significant, but the pipeline’s results are stable and explain themselves, so there is less second-guessing and review is faster.

What the benchmark found in my own tools

The benchmark also found faults in the pipeline:

  • The library skill builds the Wordhouse from our paper, then checks its own work by confirming that every section of the source has been mapped to a topic. That check passed, yet 14 clauses that mattered had no position recorded, because a section can be mapped while some clauses inside it are missed. A targeted second run filled the gaps, and the check now works clause by clause.
  • On the government contract (run only once), the contents page was treated as part of the contract. The human structure check caught it, which is what that check is there for.
  • Before any run, I wrote down the right answer for each of the 15 planted departures: whether it is a problem, and how serious. That is the answer key, and every run was marked against it. It turned out to be too strict in places: the library skill had written escalation rules I had missed, so some answers I had marked wrong were in fact right. Corrections were allowed only when backed by library text, applied to both approaches, and checked by an independent reviewer who hadn’t seen the scores.

The good news is that skills can be improved: each fault was fixed once, in the skill, and the structure of the pipeline keeps those improvements stable.

Knowing where you stand

The pipeline doesn’t win just by being smarter. Both approaches notice most of the same problems most of the time. It wins because you know where you stand when it is finished.

With one big prompt you are left with two questions the output can’t answer: have I got it all, and should I run it again in case it changes its mind? With the structured approach every clause is accounted for, each decision points to a position you can check, a re-run gives the same answer on what matters, and what it doesn’t know is handed to a person rather than guessed.

Future

Agents are getting smarter and will continue to improve through better models and access to more structured tools. But today, where the business transaction rests on the answer, agents still need steering with some strictness: a confirmed structure to work through, a Wordhouse to point at, small tasks with clean context, and tests that don’t take the model’s word for it. That is how a team gets the benefit of better models now without betting the outcome on the run it happened to keep.

The test set doesn’t retire once the results are in. It becomes the regression suite, rerun on every model, library or skill change, so you find out when the results move before anyone else does. Build the tests in

Limits

One domain, one model, a small number of runs, and an answer key built by me and corrected after the runs under the rule described above. There are good vendor tools in this space, among them LegalOn, Spellbook, Harvey, Luminance, Kira and Ironclad. I haven’t evaluated them, and this isn’t an alternative to them. The point is the method: patterns for working with big documents, how to test the results, and how to keep watching them once they’re in use.

If your team has a document job that comes back from AI looking right and turns out not to be, bring it to a BigDocs session.