AI

What is RAG and why does business need it?

Why a language model cannot answer from documents it never saw, how retrieval fixes that, and what still goes wrong after the demo.

A language model answers from what it absorbed during training. Your price list, contracts and internal procedures are not in that material, so the model either does not know them or fills the gap with a sentence that reads correctly and is wrong.

Retrieval augmented generation closes that gap. At the moment of the question it fetches the relevant fragments from your own documents and hands them to the model as material to answer from. The model becomes a careful reader.

Why answering from your own data is hard

The intuitive approaches fail. Pasting whole documents into the prompt does not scale, costs money on every question, and buries the relevant paragraph in noise. Fine-tuning teaches style, not a knowledge base that changes every week.

The real difficulty is the corpus: PDFs, scans, spreadsheets, wiki pages and tickets, with duplicates, outdated versions and different access rules. Retrieval and permissions decide answer quality long before the choice of model.

  • The answer must come from a document you can point at
  • The same policy often exists in three versions
  • Access rights differ per document and must survive retrieval
  • The volume exceeds any prompt and would cost more

Need help applying this?

Tell us about your setup and constraints — we will reply with the options we would consider, including the ones that do not need us.

Discuss your project

How RAG works: index, retrieve, generate

Indexing runs ahead of time: documents are parsed into text, split into passages, converted into embeddings and stored with metadata such as source, date, owner and access group. Retrieval asks which passages sit closest to the question.

Generation is the smallest step. The prompt carries the question, a handful of passages and an instruction to answer only from them, and to say so when they do not contain the answer. The reply arrives with references.

  • Parse: text out of PDFs, scans, pages and sheets, with structure kept
  • Chunk: passages small enough to be specific, large enough to mean something
  • Retrieve: similarity search filtered by date, source and access
  • Generate: cite the passages, and refuse when evidence is missing

How RAG differs from fine-tuning, and when to choose which

Fine-tuning changes how a model behaves: tone, output format, reliability on a fixed classification. It is a poor way to teach facts, because every document update means another training run, and the model cannot show where a statement came from.

RAG changes what the model sees at answering time. Documents can be corrected, withdrawn or restricted without touching the model. Choose RAG for what our documents say, fine-tuning for how our output should look.

  • Facts that change weekly point to RAG, since the index updates
  • A fixed task with stable labels points to fine-tuning
  • Citation and access requirements point to RAG
  • The running cost differs: an index versus a training pipeline

Answer quality and the limits to expect

Retrieval fails in ordinary ways. A passage uses different words than the question, so it is never found, and a table is split from its heading. A document is correct but two years old. A filter applied after generation shows text a user may not see.

Hallucination is reduced, not removed. A model can still blend two passages or extend a statement past what it read. The defences are boring: a strict instruction, visible citations, a refusal path, and questions your colleagues actually ask.

  • A model can still answer confidently beyond what it received
  • Stale or duplicated documents produce contradictory answers
  • Access filters belong in retrieval, not only in the prompt
  • Tables, scans and multi-column layouts remain the usual failures

How to measure quality and start a pilot

Collect real questions before building anything: fifty to a hundred is enough. For each, record the document that should have been found and a short expected answer. That set separates retrieval failures from generation failures.

Scope the pilot to one domain, one team and read-only access. Ship it as a search assistant that cites sources, with a feedback control and a weekly review of misses. Automating a decision is a later step.

  • Gather real questions with the correct source document first
  • Measure retrieval hit rate and answer faithfulness separately
  • Start read-only, with citations and a visible refusal
  • Fix parsing and chunking before changing the model

Key takeaways

  • RAG answers from your documents instead of relying on model memory.
  • Most quality problems start in parsing and retrieval, not in the model.
  • Measure retrieval and faithfulness separately on real questions.

FAQ

Have a decision to make this quarter?

Tell us what has to run, who owns it today and what breaks under load. We will reply with the options we would consider, including the ones that do not need us.

Contact page