RAG

AI & Retrieval
Retrieval-Augmented Generation

Retrieval-augmented generation, or RAG, is a pattern for building AI systems that answer from a specific body of knowledge. Before the language model writes anything, a retrieval step searches a collection of documents (emails, transcripts, policies, notes) and pulls out the passages most likely to hold the answer. The model then writes its response grounded in those passages.

A model answering from memory alone will confidently invent details it was never given. Tying every answer to real source material you can point back to is what makes RAG safe to put in front of a customer, and it is why we reach for it. RAG works best on long-form writing, and it is the wrong tool for exact numbers that live in a database.

Where it comes up