latentbrief
← Back to concepts

Concept

RAG (Retrieval-Augmented Generation)

A way of making AI smarter by letting it look things up before answering, instead of relying only on what it memorised during training.

Think about how you answer questions. For things you know well, you answer from memory. For things you are less certain about, you look them up first - you check a document, search the web, or ask a colleague. RAG gives AI the same ability: look things up before you answer.

Without this, an AI model can only draw on knowledge it absorbed during training - a process that ended months or even years before you are talking to it. That training used text from the public internet, which means the AI has no idea what happened last week, knows nothing about your company's internal documents, and cannot tell you where it got any of its information. It is working purely from memory.

With RAG, before the AI generates a response, the system first searches through a collection of documents - your company files, a library of articles, a customer database - and pulls out the most relevant pieces. Those pieces are handed to the AI along with your question, and the AI writes its answer based on what it just read, not just what it vaguely remembers from training.

The practical difference is large. A RAG-powered system can tell you exactly which document it used to answer your question. You can update the knowledge it draws on simply by adding new files to the database, without rebuilding the AI from scratch. And it is far less likely to make things up, because it has actual source material to work from rather than trying to reconstruct facts from memory.

The main limitation is that there is only so much text you can hand to the AI at once. So the system has to be smart about which pieces of which documents are most relevant to retrieve - pulling out the useful chunks from potentially thousands of files, rather than dumping everything in at once.

Analogy

An open-book exam versus a closed-book exam. In a closed-book exam, you can only use what you memorised. In an open-book exam, you can look things up before you write your answer - but you still need to understand the material well enough to find and use it correctly. RAG is the open-book version of AI.

Real-world example

When you ask a customer service chatbot about your specific order, it does not guess. It pulls up your order record, reads it, and then answers based on what it sees. Without RAG, the chatbot would have no way to know anything specific about you - it would only know general information about the company.

Why it matters

RAG is the main reason AI has become practical for businesses. Companies can now build AI systems that work accurately with their own private, up-to-date information - without the enormous cost and risk of retraining an entirely new AI model every time something changes.

In the news

No recent coverage - check back later.

Related concepts