Skip to main content
AI

What is retrieval-augmented generation (RAG)?

Retrieval-augmented generation (RAG) is an AI architecture that combines a large language model with an external knowledge base. Instead of relying solely on training data, the model retrieves relevant documents at query time and uses them to generate more accurate, grounded responses. This reduces hallucinations and keeps answers current without retraining.

Key Considerations

  • Best suited for enterprise applications where accuracy and sourcing matter
  • Requires a well-maintained knowledge base — garbage in, garbage out
  • Can be implemented with open-source tools like LangChain, LlamaIndex, or custom pipelines
  • Significantly cheaper than fine-tuning for most use cases