Review a whole contract portfolio in an afternoon
A regulation changes, and somebody asks a question about every contract you hold. Which of our agreements let us terminate on short notice? Which are affected by the new rule? Not one contract — all of them — and the answer is wanted by Friday.
Today that is a team reading for a fortnight, or a model writing a summary of each and hoping. This is a third way: map every contract, decide about each one, and keep the evidence for every decision.
Map and reduce
Map means asking the same question of every document independently. Reduce means gathering the answers into something a person can act on. TypeSafe names map-reducing large bodies of data as one of the things its Jev model is for, which makes sense: the question is fixed, the answers are a list, and you ask it thousands of times.
The trap: a contract is not one file
It is a master agreement, then amendments, then schedules, filed over years by different people. An amendment says the notice clause is deleted and replaced — and rarely restates anything else. The operative wording exists in no single file. It is the original, as modified, in order.
Ask your question of each file separately and you get the wrong answer for every amended contract — confidently, at scale, in a spreadsheet that looks authoritative.
So before you ask anything, assemble each contract as it actually stands. FastMemory links each amendment to the agreement and clause it modifies; walking forward from the master agreement gives you the current wording, with the route through every amendment. The unit you map over stops being a file and becomes a contract as it stands today. That single change fixes most of the errors.
Build it
1. Get the contracts into a folder. They are probably PDFs — and a PDF is a set of instructions for painting a page, not a document. Find the original word-processor files where you can; read the extracted text yourself where you cannot.
2. Write down the names each counterparty goes by. A trading name, a legal entity, an abbreviation. An amendment names its master agreement by the legal name; the agreement was saved under the trading name. A person knows they are the same company; nothing in either document says so, and the amendment never joins its agreement. This list is an hour of work and the most valuable hour in the project.
cargo install fastmemory
fastmemory build ./contracts
Build locally. These are contracts.
3. Write the questions as if a junior lawyer will read them. A choice question — can we terminate for convenience? — with the options yes, yes with notice, no, and the contract is silent. Silent is not the same as no; leave it out and every silent contract becomes a confident no. Add does not apply, because some documents in the folder will not be contracts. Then a score question for notice, so you can sort by how long you would wait.
4. Map. For each contract, fastmemory query for its termination and notice clauses, with the route. Send that chain to Jev as state with your questions; store the answers, probabilities and route. Each contract is independent, so run them in parallel and record which are done so a rerun only does what is missing.
Send the governing clauses rather than whole contracts. Jev's context window is 32,000 tokens according to Cloudflare's model page; a long agreement with schedules can exceed it, and most of it has nothing to do with termination.
5. Reduce. Sort by answer, then by confidence. The confident ones form most of your report. The uncertain ones become a short list for a lawyer, each with its clauses already assembled. Every row opens to the clauses and amendments that produced it.
The most valuable output is what is missing
Some amendments will reference agreements you do not hold. Some schedules will be named and absent. Because the walk ends nowhere, the map can say so rather than quietly answering from what is there. In due diligence that list is often the most valuable thing produced — you are hired to find what is missing, and a process that only summarises what exists will never find it.
The next question is cheap
The week after, somebody asks a different question — liability caps, renewal dates, governing law. The map is already built and every contract is already assembled. You write new questions and run the map step again. The expensive part was never the reading; it was working out what each contract actually says today.
Honest caveats, and where this is wrong
- There is no official integration between FastMemory and Jev; the batch job is yours.
- Jev is in early access — for a review somebody will rely on, run it beside a person on a sample first. Test hardest on amended contracts; that is where a naive build fails.
- This finds and classifies clauses. It does not tell you whether a clause is good for you. That is judgement.
- A folder of short standalone agreements with no amendments has no chain — ask each one directly.
- If the answer you want is a written memo, Jev is the wrong tool for that step by design.
Try it
Pick one question your legal team is asked about every contract. Write down its possible answers, including silent and does not apply. Then take a handful of contracts with amendments, answer it by hand, and note every document you opened. Count how many a file-by-file approach would have got wrong.
FastMemory is free and open source: github.com/FastBuilderAI/memory.