# What Is Retrieval-Augmented Generation (RAG)?

Source: https://insertchat.com/glossary/retrieval-augmented-generation

> Retrieval-augmented generation lets an AI look up your documents before answering, so replies use your facts. Learn how RAG works, its limits, and an example.

Retrieval-augmented generation, or RAG, is a technique where an AI system first searches a set of documents for passages relevant to a question, then writes its answer using those passages. It lets a general language model answer with a specific business’s facts, and makes it easier to update answers by changing documents rather than retraining a model.

## How retrieval-augmented generation works

The approach was named in a 2020 paper by Lewis and colleagues, [Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks](https://arxiv.org/abs/2005.11401), which paired a language model with a retriever over an indexed document collection. Business assistants follow the same pattern: documents are split into passages and indexed, the question is matched against them, and the best passages go to the model with instructions to answer from them.

RAG reduces made-up answers but doesn’t eliminate them. If retrieval misses the right passage, or two sources disagree, the model can still produce a wrong answer. That’s why good systems also tell the model to admit when the sources don’t cover a question.

## Example: a therapy practice’s cancellation policy

A therapy practice uploads its intake packet, which includes a 24-hour cancellation policy and fee schedule. When a client asks by chat what happens if they cancel the morning of a session, the assistant retrieves the policy passage and quotes the fee correctly instead of guessing. No client health information is involved in answering this. This scenario is illustrative.

## RAG in InsertChat

InsertChat answers from your [knowledge base](https://insertchat.com/product/knowledge) using retrieval: your website pages, documents, spreadsheets, and written answers are processed and searched before each reply on every channel. You can let the assistant mention where an answer came from when helpful, and it says when the information isn’t available.

Check a source’s processing status before relying on it, and refresh it when your policies change. Practices that need to handle protected health information require Enterprise and a signed [business associate agreement](https://insertchat.com/glossary/business-associate-agreement). See the [therapy practice setup](https://insertchat.com/industries/therapy).

## Is RAG the same as training an AI on my data?

No. Training changes the model itself. RAG leaves the model unchanged and looks up your documents at answer time, so updates take effect as soon as a source is refreshed.

## Does RAG stop AI hallucinations?

It reduces them by giving the model the right facts, but retrieval can miss or sources can conflict. Instructions to admit gaps and a human handoff are still needed.

## Related terms

- [Knowledge base](https://insertchat.com/glossary/knowledge-base): A knowledge base is an organized collection of information that people or software use to answer questions.
- [AI hallucination](https://insertchat.com/glossary/ai-hallucination): An AI hallucination is a response from an AI system that sounds confident but is false, made up, or unsupported by its sources, such as an invented price, policy, or appointment time.
- [Conversational AI](https://insertchat.com/glossary/conversational-ai): Conversational AI is technology that lets software hold a natural conversation with people by text or voice.
- [Fallback intent](https://insertchat.com/glossary/fallback-intent): A fallback intent is the response a chatbot or voice assistant uses when it can’t match a message to anything it knows how to handle, or doesn’t have the answer.

## Related InsertChat pages

- [AI knowledge base](https://insertchat.com/product/knowledge)
- [AI front desk for therapists](https://insertchat.com/industries/therapy)

## Sources

- [Lewis et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (NeurIPS 2020)](https://arxiv.org/abs/2005.11401)
