insomnia.club back to site
[ ai glossary · building with ai ]

Retrieval-augmented generation (RAG)

What is retrieval-augmented generation (RAG)?

Retrieval-augmented generation (RAG) is a technique in which an AI system first searches your own documents or data for passages relevant to a question, then gives those passages to a language model to write its answer. The model answers from your current, approved information instead of relying only on what it learned in training, and can cite sources.

01why it matters for a business

RAG is how most companies make a general model useful on their own knowledge: policies, contracts, product documentation, support history, standard operating procedures. It keeps answers current, because updating a document updates the answers without retraining anything. It allows citations, so users can check the source. And when built properly it respects access controls, because retrieval can be limited to what each user is allowed to see.

Most RAG failures are retrieval failures, not model failures. If the search step returns the wrong passages, the model will confidently answer from the wrong material. Quality depends on unglamorous work: cleaning documents, splitting them sensibly, keeping metadata such as dates and owners, combining semantic and keyword search, and testing with real questions.

02what it looks like in practice

A commercial HVAC contractor has years of equipment manuals, service bulletins, and technician notes. Field technicians ask an assistant on their phones how to clear a specific fault code on a specific unit. The system retrieves the matching manual section and recent bulletins for that model, and the model writes a short answer with links to the pages it used. When a bulletin is superseded, the old one is retired from the index and the answers change the same day.

03common mistakes

04related terms

05where insomnia club fits

Retrieval over your own documents and records is a core part of Insomnia Club's AI work: the data layer, permissions, citations, and the evaluation set that proves answers are right before launch.

see custom AI development →
← Reasoning modelall 60 termsROI of AI →

tell us what keeps you up at night.

Scoped by the people who ship it. Priced before we start.

book a call drop your number

info@insomnia.club