Skip to main content
← All use cases

The scenario

Someone asks whether the Acme contract lets them sublicense. The answer is in a PDF, in a clause that amends another clause, in a folder with four versions of the same agreement. Getting it wrong is not a bad search result. It is a commercial exposure.

Step 1 — Upload the agreements, tagged by counterparty

Step 2 — Ask with the scope pinned

Every result carries the document it came from, so the answer is never detached from its source.

Step 3 — Keep the proof

For legal work the excluded list matters as much as the results. A clause that was found and cut for budget is a different situation from one that was never matched — and only the receipt distinguishes them.

Evals

  1. Load two versions of the same agreement, one superseding the other.
  2. Ask a question the two answer differently. Check which one comes back, and whether the other appears in the receipt’s excluded list.
  3. Ask about a counterparty you have no contract for. It must return nothing rather than the nearest other agreement.
  4. Pick three answers and trace each to its document_id by hand. If any cannot be traced, stop using it for anything that matters.

Guardrails

This does not give legal advice and must never be presented as doing so. It finds and summarises text. A summary of a clause is not the clause, and a retrieval system has no view on which of two conflicting provisions governs. Route anything consequential to a lawyer with the source document attached.
  • Superseded versions stay retrievable unless you say otherwise. That is usually right for contracts — but mark the old one explicitly with a correction and a reason so the status is recorded rather than inferred.
  • Never paste a clause into a prompt from memory alone when the exact wording is operative. Use the result to find the document, then read it.
  • A receipt carries ids and reasons, never content, which is what makes a receipt id safe to put in a ticket even when the underlying agreement is confidential.

Built from

Both are complete, runnable scripts: document_qa.py, context_receipts.py.