Glossary · 28 Sep 2026

What is retrieval-augmented generation?

← Glossary

Retrieval-augmented generation, or RAG, is a way of making an AI model answer from documents it retrieves at the moment you ask, instead of only from what it learned in training. IBM describes it as "an architecture for optimizing the performance of an artificial intelligence (AI) model by connecting it with external knowledge bases". The question is used to search a collection, often with embeddings. The best matching passages are handed to a language model, which writes the answer from them.

Why it helps

A model on its own knows nothing about your contracts or procedures. RAG gives it the relevant pages at the time of asking, so answers can reflect your documents, and can cite them. It also keeps answers current: update the documents and the answers change, without retraining.

What it doesn't fix

RAG reduces made-up answers. It doesn't end them. A 2024 study by Magesh and colleagues, the first preregistered test of commercial RAG-based legal research tools, found they "each hallucinate between 17% and 33% of the time". That was better than a general chatbot, and far from the "hallucination-free" claims some providers had made.

Two limits apply. The study tested 2024 versions of those tools, which have changed since. And legal research is a hard retrieval problem, searching vast case law for authority. Questions over a few hundred of a business's own contracts are easier, so error rates there may be lower.

In our view, errors come from both halves. Retrieval can miss the right passage or return a similar but wrong one. The model can misread a passage or fill a gap with something plausible.

In a timber business

RAG suits questions about documents: what does this contract say about access roads, which procedure covers a spill, what did we agree with this supplier about moisture. It suits figures less well. A retrieved passage is a few paragraphs of text. A total across a season's tickets needs a query over thousands of records, which no passage holds. Volumes, rates and totals should come from records and calculations, with the document as support.

What to check

Every answer should cite the passages it used, so they can be opened. Test the system on questions whose answers you know. Check how it behaves when the answer isn't in the documents: it should say so.

How Quarri works explains the platform as a layer over existing systems, not a migration.

Sources

  1. IBM, "What is retrieval augmented generation (RAG)?", updated 24 July 2026: ibm.com
  2. Magesh, Surani, Dahl, Suzgun, Manning and Ho, "Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Tools", arXiv 2405.20362, 30 May 2024: arxiv.org

Quarri is an AI-native data platform for the timber supply chain. It connects buying, production, sales and inventory for forest management, sawmill, wood products and pulp, paper and packaging operators.

See it on your own data.

Live in two weeks, on the systems you already run.