If you’ve ever wondered how Perplexity manages to cite real, current sources while a general-purpose chatbot sometimes makes up data, the answer is almost always a technique called RAG.

What it is, in detail

RAG stands for Retrieval-Augmented Generation. It’s a technique that combines two steps: first the system retrieves relevant documents or information from an external source — it could be the live web, a collection of company documents, or a specific knowledge base — then it uses a language model to generate an answer based on that retrieved information, instead of relying only on what it “remembers” from training.

Why it’s useful

A traditional language model has knowledge fixed at the point it was trained, and can generate plausible but false information when it’s missing the requested fact. With RAG, the model instead has access to up-to-date, verifiable information at the exact moment it generates the answer, which reduces (without fully eliminating) the risk of hallucinations and allows it to cite the sources it used.

Where you’ve already encountered it

You don’t need to understand the technical details to use it: you run into RAG every time an AI tool cites sources with clickable links instead of answering “from memory”. It’s the mechanism behind Perplexity, the “web search” features built into ChatGPT, Gemini, and Copilot, and many enterprise assistants that answer by consulting internal documents instead of inventing plausible-sounding responses.