Retrieval-augmented generation has an obvious appeal for legal work. Point a model at a pile of documents, ask a question in plain English, get an answer. The problem is that a lawyer cannot file an answer. They have to file the evidence, with a citation to the exact source. An AI system that summarizes without showing its work is worse than useless in a courtroom, because it sounds confident and cannot be checked.
I built TextTimeline to solve exactly that for family-law text-message exports.
The rule: no claim without a citation
The design constraint was simple and absolute. Every result the system returns has to point back to a specific, timestamped message in the export. One hundred percent citation coverage, no exceptions. If the system cannot cite it, the system does not say it.
That one rule changes the whole architecture. You cannot let a language model free-associate and hope the summary is right. The model's job is narrowed to two things: expanding the attorney's plain-English question into search terms, and writing a readable synthesis of results that are already retrieved and already cited.
How the retrieval works
The heavy lifting is retrieval, not generation:
- Hybrid search. Dense vector similarity for meaning, plus keyword matching for names, dates, and exact phrases. Text-message threads are full of nicknames and shorthand that pure semantic search misses, so the keyword layer earns its place.
- Embed at ingest. Every message is embedded and indexed when the export is loaded, so a query is fast and the same source can be cited again instantly.
- Citations carried end to end. Each retrieved chunk keeps its message id and timestamp through the whole pipeline, so the final answer can link every line back to the source.
The language model never sees a document it is not allowed to cite, and never returns a sentence that is not backed by a retrieved message.
Why this pattern ports beyond law
Any field where being wrong is expensive needs the same discipline. Medical records, contracts, compliance review, government adjudication: the value is not a clever summary, it is a defensible answer you can trace. I have applied the same provenance-and-evaluation discipline in an open detection-evaluation shell, where an evaluation has to hold up to scrutiny rather than ride on a headline score.
The lesson from building TextTimeline and my market-intelligence product GammaRips is the same. Treat the language model as the smallest part of the system. Spend your engineering on retrieval, on data quality, and on making every output checkable. That is what separates an AI demo from an AI system someone trusts with a real decision. It is also how I approach every engagement.
Want this discipline applied to your documents?
If your team makes decisions out of a pile of documents and cannot afford a confident wrong answer, this is buildable for your data, in your cloud. Tell me what you are working with and I will tell you whether retrieval-first is the right fit.