Retrieval-Augmented Generation (RAG)

Retrieval-augmented generation (RAG) is an architecture that enhances AI model responses by first retrieving relevant information from an external knowledge base and then including that information in the prompt for the model to reference. RAG combines the language capabilities of LLMs with the accuracy of curated data sources, significantly reducing hallucinations.

Example

A customer support bot uses RAG to answer questions: when a user asks about return policies, the system first searches the company knowledge base, retrieves the relevant policy document, and includes it in the prompt so the model answers with accurate, up-to-date information.

Related Terms

Put this into practice

Build polished, copy-ready prompts in under 60 seconds with SurePrompts.

Try SurePrompts