Retrieval-augmented generation — fetching relevant documents first and pasting them into the model's context so it answers from your data instead of memory.
Models only know their training data and what's in the prompt. RAG closes the gap at request time: search a knowledge base for passages relevant to the question (usually with embeddings), put the best ones in the prompt, and have the model answer grounded in them.
It's the standard pattern for "chat with your docs," fresher-than-training-data answers, and citing sources. The quality ceiling is almost always the retrieval step — if the right passage isn't fetched, the best model in the world answers from vibes.