Data → Machine Learning & AI
RAG Application
An AI application pattern that retrieves external context before generating a response.
Motivation
A RAG application solves the problem of grounding a language model in external knowledge without retraining it.
Where it fits
It belongs to AI applications and data-backed product systems.
Mental model
The system retrieves relevant documents, places them in the model context, and asks the model to answer using that context.
Important details
RAG depends on chunking, embeddings, vector search, ranking, prompting, and evaluation.
Common mistakes
- Thinking RAG automatically guarantees correctness.
- Ignoring retrieval quality and source attribution.