What is RAG? | Glossary

Glossary

What is RAG?

RAG, retrieval-augmented generation, makes an AI model look up relevant passages from your own documents first and then answer using them, cutting made-up answers.

RAG stands for retrieval-augmented generation. Before an AI model answers a question, the system searches a set of documents you control, pulls out the most relevant passages, and hands them to the model along with the question. The model then writes its answer from that material instead of relying only on what it absorbed in training.

The retrieval step and the generation step

Setup happens once. Your documents, such as help articles, policies or product sheets, are split into chunks of a few paragraphs. Each chunk is turned into an embedding, a list of numbers that captures its meaning, and stored in a vector database or search index.

At question time, the question is turned into an embedding too, and the system finds the chunks whose numbers are closest. Many setups also run ordinary keyword search and combine the results. The top chunks are inserted into the prompt with an instruction like "answer using only these sources". The LLM writes the reply, often citing which chunk it used. The approach was named in a 2020 research paper from Facebook AI Research.

A worked example: a returns question

An outdoor gear shop adds a help chatbot to its site. A customer asks, "Can I return a tent I've used once?" Retrieval finds the paragraph of the returns policy about used items and the paragraph on the 60-day window the shop actually offers. The model answers from those two passages. Without RAG, the model would guess from typical store policies and might promise something the shop does not offer.

Why RAG matters for a small business

RAG is how you make an AI assistant speak for your business specifically. It keeps answers current, because updating the documents updates the answers with no retraining, and it lets you show sources. If you only use AI for drafting marketing copy, you do not need it. If you want a support bot or an internal assistant over your own files, you almost certainly do.

Common RAG mistakes

  • Feeding it messy or outdated documents. The model repeats whatever it retrieves, including last year's prices.
  • Chunks that are too small or too large. Tiny chunks lose context; huge ones bury the useful sentence.
  • No fallback for missing answers. Instruct the model to say it does not know and offer a contact option when nothing relevant is found.
  • Skipping evaluation. Keep a list of real customer questions and check the answers whenever documents change.

Related terms

  • LLM: the model that writes the final answer.
  • Chatbot: the usual front end for a RAG system.
  • Prompt engineering: the instructions wrapped around retrieved text.
  • AI agent: can use retrieval as one of several tools.

Ready to put this into practice?

We.Inc lets you describe a site in chat and watch AI build it live, then refine it visually or in code.

Start Building

No credit card required

Describe your business. Get a website ready to publish.

Keep exploring

Related Resources

From the Blog

Guides

Web Design Cost in 2026: Average Prices and Freelance Rates

Website design cost in September 2026: $0 to $300 for a template, $1,000 to $5,000 with a freelancer, $5,000 to $30,000+ with an agency. Pricing models, what each tier includes and how to judge a quote.

Read
Guides

Website Cost Calculator: Estimate Your Build in 60 Seconds

Estimate your website cost in 60 seconds: a simple formula, typical and average website costs by project type, and three worked examples for September 2026. Plus a free interactive calculator.

Read
Guides

Small Business Website Cost: What to Budget in 2026

A small business website costs $200 to $600 a year on a builder, $1,000 to $5,000 with a freelancer and $5,000 to $20,000 with an agency. Budgets by business type and what to spend first, September 2026.

Read

Ready to simplify everything?

Join 15,000+ businesses that replaced their entire marketing stack with one platform.

No credit card required · Talk to sales

Product

Who It's For

Features

Resources

Company

View Sitemap