WEB3wallet apps / dApp interfaces / token-gated membershipExplore Web3 →
AI and automation

What is RAG in AI?

RAG (retrieval-augmented generation) is a technique in which an AI system first searches your own documents for relevant passages and then has a language model write the answer from them.

Also calledretrieval-augmented generation

Why it matters for a business

RAG is usually a quicker route than retraining a model to an AI assistant that knows your products, policies and contracts.

More

The term comes from a 2020 research paper by Lewis and colleagues at Facebook AI Research.

Answers can cite the source document, so staff can check them. When a document changes, you update the index, not the model.

  • How it works

    Documents are split into chunks, stored with embeddings, and the closest chunks are added to the prompt for each question.

  • RAG vs fine-tuning

    RAG gives the model facts at question time; fine-tuning changes how the model writes, not what it knows today.

  • Quality starts upstream

    Answers are only as good as the retrieval: outdated, duplicate or badly scanned documents produce wrong answers.

RAG in an AI system
  1. InputA question, a message, a document
  2. RAGContextYour data, found by search
  3. Language modelReads, reasons and writes
  4. ResultAn answer, or an action in your tools
ChecksRules, limits, logs and a person who reviews

What it costs

Starting prices of our services on this topic, in your currency.

All our pages on this topic

RAG in practice

A way to make an AI model answer from your own documents by fetching the relevant passages first.

Example
  1. A software reseller in Reading has years of support tickets and product manuals.
  2. With RAG, its support assistant finds the matching manual section and past fixes for each new ticket and drafts a reply with links to them.
  3. Support staff review the draft before it goes out.

Which term is it?

A large language model: an AI model trained on huge amounts of text to read and write language.
Anatoly Mikhailov

From the founder

I want AI that does a real job inside your tools, with a person checking what matters. We test it on your own data before you rely on it.

Anatoly MikhailovFounder of Pazl

Got an idea? It’s one message away.

Scope agreed before development, fixed price, six-month warranty.