DigitalRoks Icon
Agents & MCPintermediate 3 min read

RAG is an open-book exam

What is RAG (retrieval augmented generation)?

You do not need to retrain a model on your business. You need to hand it the right page at the right moment.

The short answer

Retrieval augmented generation means searching your own documents first, then giving the model the relevant passages and asking it to answer using only those. The model stops guessing and starts quoting.

The analogy

Closed-book versus open-book

Two students take the same exam. One relies on memory and writes confidently from half-remembered material. The other brings the textbook, finds the right page, and copies the correct passage into a sensible answer. RAG is handing the model the textbook — with a good index, because retrieval quality decides everything.

How it actually works
01

Three stages: chunk, find, answer

Your documents are split into chunks and indexed. A question triggers a search for the closest chunks. Those chunks go into the prompt with an instruction to answer only from them. Every stage has a failure mode you can test independently.

02

Retrieval failure looks like hallucination

If the search returns the wrong page, the model either says "not in the document" or answers from general knowledge — which reads like a confident mistake. Before blaming the model, check what it was actually given.

03

Good chunking is unglamorous and decisive

Split by meaning, not by character count: one policy per section, one product per block, headings kept with their text. A chunk that starts mid-sentence is a chunk that will be misread.

Where it bites

“RAG means the AI has learned my business.”

It has access to your documents at answer time. Nothing is learned permanently, which is good — update the document and the answer changes immediately, with no retraining.

Try it now
15 minutes

Test retrieval before you trust it

  1. 1Choose ten pages of your own documentation — pricing, policies, service descriptions.
  2. 2Put them in a chat and ask five questions the documents should answer.
  3. 3For each answer, ask "which passage did you use?" and check it is the right one.
  4. 4Now ask one question the documents do not answer. A good setup says so plainly. If it invents an answer, your instruction needs the "say you don't know" constraint.
Where to go next

Retrieval usually means an embedding model plus a language model. Having both behind one account keeps the experiment cheap.

Get Started Free on SkillBoss →

Affiliate link. If you sign up through it, DigitalRoks may earn a commission at no extra cost to you. Recommendations are written the same way either way.

Common questions
RAG or fine-tuning?

RAG for facts that change. Fine-tuning for style and format that stays fixed. Most business needs are RAG, because most business knowledge changes monthly.

How current can the answers be?

As current as your index. Re-index on a schedule or on save; a stale index is the most common cause of "the AI gave me the old price".

Will RAG stop hallucination?

It sharply reduces it when the answer exists in your documents. It does not remove the need to check details that matter.

Keep going

Where this connects

Where this concept goes next.

You know the idea now. The next step is either wiring it up yourself (MCPHubz) or handing the build to someone (GoZealio).