How models work

What is RAG (retrieval-augmented generation)?

A technique where the AI first looks up relevant documents and then answers using them, so replies are grounded in real sources.

Instead of relying only on what it learned during training, a RAG system searches a set of documents — a company's policies, a website, your notes — pulls out the relevant parts and hands them to the model along with your question.

That makes answers more current and more accurate, and lets the AI cite where the information came from. Most “chat with your PDF” and customer-support bots work this way.

Example

A college chatbot that answers “What is the last date for the scholarship form?” by reading the official notice, rather than guessing.

Related terms