AI drafting

What is retrieval-augmented generation (RAG)?

Retrieval-augmented generation, or RAG, is a way of building AI answers in two steps: look up the passages in your own documents that match the question, then write the answer from them. It is the most common technique behind grounded AI answers, and its quality depends on what the lookup finds.

In plain terms: look it up, then write. The “retrieval” step searches a collection, such as help articles, website pages or past emails, for the pieces most related to the question. The “generation” step hands those pieces to the model together with the question, so it writes from them instead of from memory.

Why it matters

RAG is why an AI tool can answer questions about your business without being trained on it. It also explains most of its failures. If the search step finds the wrong article, or nothing, the model writes from whatever it got. So answer quality depends as much on the quality and freshness of your sources as on the model.

Many tools add more than one lookup, or let the system search again when the first results do not answer the question. The principle stays the same.

An example

A customer asks how long a refund takes. Retrieval finds the refunds article and a past reply that mentions bank processing times. The model writes a reply that combines the two and can point to both.

The broader idea is grounding.

Related terms

ReplyPen drafts replies to customer email in Gmail and Outlook, with a Check note under each Draft showing what it relied on.

We're opening to new teams soon. We'll email you when your spot is ready.

Last updated September 2026