LLMs & AI Engineering · Building with LLMs
RAG: letting the model look things up
Retrieval-augmented generation: find the right documents, paste them into the prompt, answer with citations.
Step 1 of 4 · Overview15 min read ·
Docs
runbooks, past breaks
Chunk + embed
text → vectors
Vector search
find nearest chunks to the question
Prompt
question + top chunks
Answer
grounded, with sources
An embedding turns text into a vector so similar meanings land close together. At question time you embed the question, fetch the closest chunks, and tell the model to answer only from them.
| Problem | RAG helps because… |
|---|---|
| Model doesn't know your firm's runbook | you retrieve the runbook text |
| Knowledge goes stale | update the documents, not the model |
| Hallucination | answers can cite the retrieved source |
Key idea
Work idea: index past resolved breaks + ops runbooks. New break → retrieve the 5 most similar past cases → LLM suggests the likely cause and the fix that worked before.Next: Practice