RAG, step by step

What is RAG, and why does the answer depend on what the search fetches?

RAG · about 5 minutes

An LLM doesn't know your documents. RAG, retrieval-augmented generation, fixes that in two moves: a search finds a few passages that fit the question, and the model answers from them. Fetch the wrong passages and the model has nothing right to answer from.

Sketch: Xiaohei on a stepladder pulls a few pages out of a tall filing cabinet; a second Xiaohei at a desk writes the answer from them