Drainpipe Knowledge Base
How does AI RAG work?
RAG, or Retrieval-Augmented Generation, is an AI framework that improves the performance of a large language model (LLM) by giving it access to external, up-to-date, or proprietary data. It’s designed to solve the problem of LLMs sometimes providing outdated, inaccurate, or “hallucinated” information because their knowledge is limited to the data they were originally trained on.
RAG (Retrieval-Augmented Generation) is a three-step process:
- Query & Retrieval: A user asks a question. This query searches an external Knowledge Base (like a company’s documents) to find the most relevant chunks of information.
- Augmentation: These retrieved, factual chunks are added to the user’s original query.
- Generation: The Large Language Model (LLM) receives both the query and the new, specific context, allowing it to generate a highly accurate, evidence-based response.
