Retrieval-augmented generation (RAG)

By Alva Chew 3 min read Updated October 24, 2026

Retrieval-augmented generation, usually shortened to RAG, is the practice of looking information up in your own documents or data and handing it to the language model before it writes an answer.

Why it exists

A large language model on its own answers from what it absorbed in training. It has never seen your refund policy, opening hours or stock list. Asked about them, it will still produce an answer. That is where hallucination comes from.

RAG changes the order of steps. The question arrives. The system searches your content for the passages most likely to hold the answer and puts them in front of the model with the question. The model then answers from those passages. The method was described in a 2020 research paper by Patrick Lewis and colleagues at Facebook AI Research, University College London and New York University (Lewis et al., 2020), and it is now a common way for business chatbots to answer from a company’s own content.

What it means in practice

A customer asks whether they can return a sale item. Without retrieval, the model guesses from how return policies usually work. With retrieval, the system pulls the two paragraphs from your returns page and the answer matches what you wrote. If your page doesn’t mention sale items, a well-built system says it doesn’t know and hands over.

So “train the chatbot on our website” is a reasonable instruction. Retrieval works on text it can find. Anything that lives only in a staff member’s head won’t be found.

Content quality decides answer quality

Gartner’s 2024 study of self-service found that in 43% of cases, customers couldn’t find content relevant to their issue (Gartner, reported by CRM Magazine, September 2024). Retrieval has the same limit. It can only find what you have written down.

  • Vague policy pages produce vague answers.
  • One fact in two places with two different values produces inconsistent answers. Fix the content, not the prompt.
  • Write down the answers your team gives from memory, such as parking, lead times or which courier you use.

Where retrieval stops

Retrieval answers questions from documents. “What is your returns policy” is a retrieval question. “Where is my order” is a different kind, because the answer sits in your order records and differs for every customer. That needs a lookup in a live system. Much of the disappointment with business chatbots comes from this gap. The tool retrieves well and can’t act, so every question with a customer-specific answer still reaches a person. See WISMO.

Retrieval also doesn’t stop the model being asked to do something it shouldn’t. That depends on limits enforced by the system, covered under AI agent.

Related terms

Back to the glossary

Answer from your own pages, and look up the rest

Start your 7-day free trial. No credit card needed. AeroChat answers from the pages you train it on, and checks orders, stock or bookings in the systems you connect when the answer isn’t in a document.

Start your 7-day free trial

On Shopify? Install AeroChat from the Shopify App Store.