Building with LLMs
RAG: Give the Model a Library Card
8 min+80 XPStep 1/10
Models can't know your data
An LLM's knowledge is frozen at training time — it doesn't know your docs, your database, or yesterday's news. RAG fixes this: retrieve relevant chunks from your knowledge base, inject them into the prompt, and let the model answer with that context.
Embed your documents → store in a vector database → at query time, embed the question, find the nearest chunks, prepend to the prompt.