The core idea
Retrieval-augmented generation, or RAG, combines search with generation. When a user asks a question, the system searches an indexed source collection, places relevant passages into the model’s context, and asks the model to answer using that material.
The source collection can be updated independently of the foundation model. That makes RAG useful for product documentation, policies, property guides, and other knowledge that changes.
A typical request
- PrepareExtract readable text, divide it into retrievable chunks, and store an index.
- RetrieveConvert the question into a search request and select passages that appear relevant.
- GenerateSend the question, instructions, and selected passages to the language model.
- RespondReturn an answer, ideally with qualification, source links, and a handoff where needed.
Why RAG helps
RAG can connect an answer to organization-specific and current material that may not exist in the model’s training. It also gives the owner a practical update path: revise the source or structured answer instead of retraining a foundation model.
Why RAG still fails
Retrieval may select the wrong passage, miss a relevant synonym, mix conflicting versions, or return too little context. The model may misread good context or add an unsupported statement. Poorly scanned documents and ambiguous policies weaken the result before generation begins.
Controls beyond retrieval
- Curate sourcesRemove obsolete, duplicate, private, and unauthorized material.
- Define scopeState what the agent may answer and which topics require a person.
- Structure critical factsMake high-value answers explicit instead of burying every detail in long files.
- Test edgesTry missing, conflicting, adversarial, ambiguous, and time-sensitive questions.
- Maintain ownershipAssign a human to update the source and review gaps.