Skip to content
echogeco
The model as a component · Tokens and sampling

Summarising a 40-page contract

Size one contract in tokens and decide between one call and a chunk-and-merge pipeline, with the month costed.

estimatemediumExercise · 3 min · 9 of 77
On this page

A legal-tech team wants a summary of every contract before the reviewer opens it. The decision turns on one count the candidate has to do before anything else.

The situation

A legal-tech team receives 300 commercial contracts a day, 40 pages each at roughly 500 words a page. Product wants a 400-word summary per contract before the reviewer opens the file, which today happens within 30 minutes of upload. The summary has to carry the cross-references a reviewer relies on — which clause caps which, which schedule a defined term points at — because a summary that misses them is worse than none. The team has a 2k-token system prompt that fixes the summary's shape and tone. Nothing is cached yet, nothing is chunked yet, and the budget owner wants a monthly figure before approving the feature.

Course constants, restated for the arithmetic: assume ¾ of a word per token (1.3 tokens per English word), a 200k-token window, P_in = $3 and P_out = $15 per million tokens, and a decode speed of 50 tokens/s. The month is 30 days, and the team works from the lesson on tokens and the context window.

The question

One call per contract or a chunk-and-merge pipeline — and what does a month cost?

A strong answer · Rubric · Where answers go wrong

Write your answer first, then open