RAG (retrieval-augmented generation)
Finding relevant documents first and putting them into the prompt, so the model answers from them.
A retriever (keyword search, vector search, or both) picks passages; the model answers using them and can cite them. Most RAG problems are retrieval problems: the right passage was never found, so the model could not use it.
Related terms
- Embeddings: Vectors of numbers that place texts with similar meaning close together.
- Context engineering: Deciding what goes into the model’s context, in what order and when, across a whole task.
- Hallucination: A fluent, confident answer that is false or not supported by the sources.
