A 30-page contract, answered in minutes

Published · 3 min read · Русский · Українська

Watch the video Watch the video

A lawyer has a 30-page lease, and client documents can't be sent to an outside service. I suggested that the law firm from my previous video run a model on its own computer: the lawyer asks questions about the contract and gets an answer or a finished document a couple of minutes later.

The director isn't against AI. He wants his staff to work faster, but he doesn't want client contracts going anywhere. A local model responds on the computer it's running on, so there's no need to upload the original document to the cloud. You can set up the computer next to the desk and see where the file is processed, but calling something a "local model" doesn't prove that the whole setup runs locally.

So I'd first check not just the model itself, but the document's entire journey: how text is extracted from the PDF, where files are stored, where the search snippets come from, and whether any extra data is sent elsewhere. Even if the model runs on the computer, a separate search or processing step might use an outside service. To keep everything local, you need to check every step. One option for running models on different hardware is llama.cpp, which supports local inference and server mode (llama.cpp overview).

You could start with Qwen3 8B in Ollama: the model library lists its size as 5.2 GB and its context window as 40K tokens (Qwen3 in Ollama). But a 30-page document alone doesn't tell you whether it will fit in the context window. First, you need to extract the text and calculate how much there is, and the model file size isn't the same as the amount of memory you'll need. I suggested getting a powerful graphics card, such as an RTX 4090, but you should choose the model and computer only after testing them with real documents and questions from the lawyers.

Don't test it by asking whether the answer "sounds convincing." Test it against points a lawyer has already checked by hand. Ask what penalties are listed, where the contract allows termination, and what exceptions apply. Then ask a separate question whose answer isn't in the document. Ask the model to show the contract passage behind each conclusion, then compare it with the original. ContractNLI specifically tests whether a statement is supported by a contract, contradicted by it, or not mentioned, and identifies the supporting passages (ContractNLI overview).

A small model may not be as capable as ChatGPT, and I won't pretend otherwise. But it might be enough to find a specific clause or penalty, as long as it doesn't miss relevant points and shows where its answer came from. In the ContractEval study on legal risk assessment, open models lagged behind proprietary ones in accuracy and usefulness, and a larger model didn't solve every problem equally well (ContractEval findings). So test it on the kinds of contracts you actually use: it should find the right clauses, avoid confusing exceptions, and say "the document doesn't answer this" when that's true.

If you need a setup that works with documents, searches through them, and gives answers linked to the exact passage, WebDaddy describes this work on its page about AI systems for business. For client contracts, the rule is simple: don't send a file to a cloud chat until you've checked that every step, from upload to answer, stays on the computer.

Want this done for your business?

An AI agent from $500, a document assistant from $800, fixed price and deadline. Or describe your task and get a plan with a price for each step

Sources

  1. Qwen3 - Ollama model library
  2. ContractEval: Benchmarking LLMs for Clause-Level Legal Risk Identification in Commercial Contracts
  3. ContractNLI: A Dataset for Document-level Natural Language Inference for Contracts