Lumvik

Insights / AI products

Citations before generation: what we learned building Margin

By Jay, Co-founder · · 3 min read

When people ask for “AI that reads our contracts”, they usually picture a summary: a paragraph that tells them what the document says. In practice, the summary is the least useful part. The person reviewing a contract has to act on it, and they can't act on a sentence they can't check.

So when we built Margin, one of our Originals, we started from a different requirement: every finding must point to the clause it came from. No source, no answer.

Find, flag, point

Margin does three jobs. It finds structured facts: parties, dates, money, notice periods, governing law. It flags clauses that deserve a second read, such as automatic renewal, uncapped liability or a one-sided indemnity. And it points: every fact and every flag links to the exact clause, highlighted in the document.

We built all three without a language model. A clause parser, a set of regular expressions, thirteen written rules and a BM25 search index do the work in a few milliseconds, in the browser. The page says, at the top, that there is no AI model.

Why build it without a model?

Partly to prove a point: a surprising amount of “AI” value comes from structure, not generation. Dates, sums and defined terms follow patterns. Risky clauses use recognisable language. A good search ranking gets you to the right paragraph most of the time.

Mostly, though, it forced us to design the interface properly. When you can't hide behind fluent prose, you have to show your working: the highlight, the clause number, the rule that fired and why it matters.

Where a model earns its place

Rules have limits. Unusual drafting, clauses that refer to schedules, and obligations buried in long sentences all slip through. In a client product, that is where we would add a language model, behind the same interface and under the same rule:

  • The model proposes a finding and the passage that supports it.
  • We check that the passage really exists in the document before showing anything.
  • Structured output is validated against a schema; anything that fails is dropped, not guessed.
  • Accuracy is measured on a set of real examples before and after every change.

The design lesson

Trust in an AI feature doesn't come from how confident it sounds. It comes from how quickly a person can verify it. Design for the check, and the feature becomes something people rely on instead of something they double-check by hand.

If you are planning an AI feature for documents, email or support, tell us about it. We will tell you honestly whether you need a model at all.

Read next

3D on a business website: when it helps, and how to keep it fast →

WhatsApp