Our first benchmark showed that a knowledge graph of a firm lets an agent answer firm-wide questions faster at the same level of accuracy. To forecast new regulations, a firm has to find every agreement, client and document that will be impacted. That means joining long-horizon connections through a large system, in our case, four examples from 120-120k matters.
The test
We generated one fictional firm at four sizes and wrote a hypothetical regulation that changes the payment terms allowed with certain counterparties. The task is to find every live agreement that must be amended. No single document answers that: whether an agreement is a target depends on who its parties are, what terms it sets (sometimes only by pointing to a firm precedent) and whether its matter is still open. At 12,000 matters there are 562 targets among 24,315 documents.
| The firm | 120 matters | 1,200 matters | 12,000 matters | 120,000 matters |
|---|---|---|---|---|
| Documents | 245 | 2,465 | 24,315 | 243,547 |
| Agreements to amend | 6 | 50 | 562 | 5,274 |
| Time to build the graph | 4 s | 52 s | 9.3 min | 50 min |
Without the graph our agent could list, search and read the firm’s files; with it, it could also query a graph built from the same files. Each setup answered three times, and every answer was scored against the list of targets the firm was generated from.
| Firm | Agreements found | Time | Input tokens | |||
|---|---|---|---|---|---|---|
| Without graph | With graph | Without graph | With graph | Without graph | With graph | |
| 120 matters | 100% | 100% | 84 s | 24 s | 190k | 48k |
| 1,200 matters | 100% | 100% | 3.8 min | 1.6 min | 937k | 166k |
Our agent on GPT-6 Sol, averaged over three runs. Agreements found is the share of the agreements to amend that the answer named.
Reading one file at a time is the weakest way to search without a graph. The point of a production-grade information retrieval exercise is to compare against the best alternatives, so at 12,000 matters we also split the firm across 12 copies of our agent and ran two coding agents, OpenAI’s Codex and Anthropic’s Claude Code, over the same files, once limited to search and once free to write their own scripts to customise their strategy for the given task.
| Approach | Agreements found | Time | Input tokens | Model cost |
|---|---|---|---|---|
| Our agent, with the graph | 100% | 2.2 min | 213k | $0.27 |
| Our agent, split across 12 agents | 96% | 27 min (3.2 min side by side) | 7.5M | $3.78 |
| Codex, search only | 100% | 11 min | 1.5M | $0.72 |
| Codex, writing scripts | 100% | 5.8 min | 683k | $0.31 |
| Claude Code, search only | 100% | 19 min | 8.9M | $6.48 |
| Claude Code, writing scripts | 100% | 9.9 min | 1.1M | $1.61 |
The 562 agreements to amend at 12,000 matters, averaged over three runs. Claude Code ran Claude Opus 5.5, every other setup GPT-6 Sol; costs at list prices.
Splitting found 96%, but read 35 times as many tokens as the graph, and three of its 36 agents missed a whole class of agreements without saying so. Both coding agents found every agreement, using search patterns or a short script to pull the parties and terms out of every file at once. The graph was still the fastest, reading a third of the tokens or fewer, because the facts the other approaches work out when the question is asked were worked out once, when the graph was built.
At 120,000 matters

At 120,000 matters there are 5,274 targets among 243,547 documents. The graph would not fit in our machine’s memory, so we built it in ten partitions, as a graph database does, and merged each query’s answers. Every setup ran with no limit on model calls, time or spending.
| Approach | Agreements found | Time | Input tokens | Model cost |
|---|---|---|---|---|
| Our agent, with the graph and export tool | 100% | 54 s | 73k | $0.05 |
| Codex, writing scripts | 100% | 4.5 min | 622k | $0.27 |
| Claude Code, writing scripts | 100% | 28 min | 599k | $0.74 |
| Codex, search only | 0% | 4.5 min | 654k | $0.30 |
| Claude Code, search only | 0% | 9.4 min | 1.2M | $0.97 |
The 5,274 agreements to amend at 120,000 matters, averaged over three runs with no limit on model calls, time or spending. A list delivered as a linked file counts. Models as above.
Limited to search, both coding agents gave up on their own after five to ten minutes, having listed fewer than a dozen agreements. Writing scripts, both found every one: Codex in four and a half minutes, Claude Code in 28, because it chose to open all 243,547 files one at a time.
Our agent with the graph had the right total from its first query. But as the product stands, a graph query hands its rows back to the model as text, 70 to a page, and every run stopped after the first page. It gave the total and said its list was incomplete rather than copy 76 pages into a reply. No limit stopped it; it chose to.
The graph’s times in this post leave out loading the graph from disk. A graph database loads once and stays ready, but our test setup could not hold the largest graph in memory and reloaded it for every query, which took up most of each run’s time.
Codex kept pace at both sizes because its approach barely grows with the firm either. Each time, it read the firm’s document index, which already records every document’s type and matter, kept the agreements on open matters and ran a short script over just those files. Its tokens went on learning the firm’s layout and writing the script, not on the list itself, so it read about the same at 12,000 and 120,000 matters. That index is a small, flat version of the graph. Without it a coding agent is left opening every file, as Claude Code did.
Conclusion
A graph’s cost does not grow in step with the firm: the firm grew a thousandfold, from 120 to 120,000 matters, but the tokens our agent read with the graph grew at most fourfold, because the joining is done once, when the graph is built. The hard part is getting the knowledge in. Much of it lives in people’s heads, so a graph has to start from what the firm already records, such as each matter’s counterparty and their documents, and be extended by rules and language models. That takes work, but once a firm has a graph it can keep extending, every later firm-wide question, from the next new law on, costs a fraction of what it would without.