Guide · 6 min read · Updated

How to build AI that cites its sources

By the SeedInov Studio team, from our own builds.

Why citations decide whether AI gets used

A bid team can spend three weeks on a proposal and lose it on day one, because the bid bond had to be the original, not a copy, and that rule sat in one sentence deep in the submission section. In that world, a confident wrong answer is worse than no answer.

So the product has to show its work. If every finding links to the page and clause it came from, checking it takes seconds and the team can actually rely on it.

The hard part is reading the document

Any model can summarise a clean page of text. Real tenders and contracts are not clean.

  • Layouts. Two-column pages, headers and footers, tables that run across pages.
  • Scans. Annexes that are pictures of paper, not text.
  • Numbering. Clause numbers that restart in every appendix, so “§4.2” alone is not an address.

Most of the work in Syphon went into layout-aware parsing that keeps every sentence tied to its page and clause. Once that anchor exists, every later step can point back to the source.

Retrieve first, then write

The order matters. In Contract Blitz the contract is split into clauses with their section numbers and stored for retrieval. For each question, the relevant clause is retrieved first, the explanation is written from it, and the flag links back to it. Nothing is said about a contract that is not in the contract.

This is retrieval-augmented generation (RAG), but the principle is simpler than the name: the model is only allowed to work from text you can show the user.

Let it say “Not in the document”

Models are trained to be helpful, which makes them want to answer. A document AI needs an explicit, honest way out. In Syphon, when a tender does not cover a question, the answer is “Not in the document”. That one behaviour does more for trust than any accuracy figure.

Put the team's rules on top

Extraction finds what the document says. Rules decide what matters to this team: a disqualifying bid bond, a 90-day notice period, payment terms that disagree between sections. Syphon applies each team's own rules to every tender the same way, and Contract Blitz scores each contract against legal and industry norms.

LayerJobExample
ParsingRead every page faithfully, with anchorsPage 147, §9.3
ExtractionList every requirement or clauseOriginal bid bond, 2% of bid value
RulesFlag what matters to this teamDisqualifying if missing
AnswerWrite from retrieved text, cite itLinked to the exact line

A quick checklist

  1. Keep page and clause anchors on every sentence from the start.
  2. Retrieve the passage before writing any answer.
  3. Give the model an honest “Not in the document” answer.
  4. Show the source one click away from every finding.
  5. Apply the team's own rules on top of extraction.

See it in our work

Common questions

What is RAG?

Retrieval-augmented generation: the system first finds the relevant passages in your own documents, then the model writes its answer from those passages only. Citations come naturally because the system knows which passage each answer used.

Can citations still be wrong?

They can point to the wrong passage if parsing is poor, which is why faithful reading of layouts, tables and scans is most of the work. Because each citation is one click away, a wrong one is easy to spot.

Does this work on scanned documents?

Yes, if scanned pages are read as part of the pipeline. Syphon reads tables and scanned pages and keeps page and section numbers on every sentence.

Which model do you use?

Our document products use GPT-4o for extraction and answers. The model matters less than the parsing and retrieval around it.