Retrieval-Augmented Generation

← Back to Large Language Models

Enhance LLM responses by retrieving relevant documents and injecting them into the context. Reduces hallucination, enables access to private/recent data, and provides attributable answers.

Key Properties

Architecture

  1. User query → embed query
  2. Search vector database for similar documents
  3. Inject retrieved documents into LLM prompt
  4. LLM generates answer grounded in retrieved context

nlp llm rag retrieval