Glossary

RAG (Retrieval-Augmented Generation)

RAG is an architectural pattern that augments an LLM with up-to-date data from an external store. Instead of "memorising" all facts in model parameters, the needed information is retrieved at query time and passed as context.

RAG flow

  1. User asks a question
  2. The system uses vector search to find relevant documents
  3. Documents are added to the prompt as context
  4. The LLM generates an answer based on the context

Benefits

When needed

Q&A over corporate documentation, search in a large knowledge base, a chatbot answering product questions.