Skip to content

Retrieval augmented generation (RAG): give your AI a library card

Retrieval augmented generation (RAG) explained with jokes: why an AI plugged into your documents makes things up less and answers better.

A general AI knows the capital of Peru, how to make tiramisu and three theories about the pyramids. It does not know your prices, your returns policy or the contract signed on Tuesday. For that, you open your archives to it: that’s retrieval augmented generation, or RAG.

Retrieval augmented generation in one sentence

Retrieval augmented generation means first finding the right passages in your documents, then handing them to the AI so it writes its answer from them. It stops reciting and starts looking things up.

The exam analogy (cheat sheet allowed)

Without RAG, the AI sits the exam from memory, and when it blanks, it improvises. With RAG, it gets its notes, and must quote the page. The only cheat sheet teachers approve of.

  1. Your documents are cut into bite-sized passages.
  2. They are indexed so the ones matching the question can be found.
  3. Those passages are slipped to the AI along with the question.
  4. It answers from them, with references.

RAG in a small business: the new hire’s questions

Monday, Kevin starts. By Tuesday he has asked three colleagues seventeen questions. With an internal assistant plugged into the quality manual, Kevin asks the assistant, which answers with the exact paragraph. The colleagues get their focus back, Kevin keeps his dignity.

The limits (this is where we stop joking)

  • If your documents are wrong or outdated, so are the answers.
  • Permissions matter: an intern must not read payslips through the assistant.
  • RAG reduces errors, it doesn’t remove them: a human stays in charge of sensitive topics.

Chatbots on your own documents are one of Octopote’s most frequent projects. Let’s see what your archives have to say. And to understand why we don’t send the whole document at once, read our article on AI tokens.

An AI agent project?

We design it with you, seriously. Well, almost.

Talk to the team
Octopote Avatar

Written by