Back to list
Lv.3

RAG (Retrieval-Augmented Generation)

Retrieval-Augmented Generation

A technique where an AI retrieves relevant information from a prepared database before generating a response.

In Simple Terms

RAG is how AI looks things up in reference materials before answering, rather than relying only on what it already knows. A standard AI uses only pre-learned knowledge, so it can struggle with recent information and sometimes produces plausible-sounding errors (hallucinations). With RAG, the AI searches a prepared database for relevant content and uses it to compose its answer. Still, it's not foolproof: if the right info isn't in the database or can't be found, the answer may be wrong. It gets more accurate when the data is there — not always correct.

Behind the Name

Short for Retrieval-Augmented Generation. Retrieval means "searching for information," Augmented means "enhanced," and Generation means "producing text." Instead of training the AI to memorize new information, RAG describes a system that searches for the information it needs on the fly and uses those results as a reference when composing its answer.

Take a Closer Look!

RAG is a technique where an AI retrieves relevant information from an external database or document collection before generating its response.

A standard generative AI composes answers from the data it was trained on, which means it can't reliably handle information that emerged after training — such as recent news or proprietary internal data. When it doesn't know something, it can still produce a confident-sounding but incorrect answer, a problem known as hallucination.

With RAG, the AI first searches an external database for information related to the question. Rather than reading an entire document, it picks up short excerpts called chunks that match the search and passes those as context when generating its answer. For example, a question about an internal policy would trigger a search through the policy manual, and the matching passages would be passed to the AI to base its response on.

This means the AI doesn't need to be retrained whenever data changes — keeping the knowledge base up to date is enough to improve accuracy. That said, RAG is not foolproof: if the right chunk isn't retrieved, if key information is split across chunk boundaries, or if the AI fills in missing details on its own, errors can still occur. It's a system that improves accuracy — not one that guarantees correct answers.

CategoryAIData