Updated on 23 November 2026, by João Leite, Founder of murmur.

RAG in AI is when the tool searches for texts on the internet or in a database before answering and writes the answer with what it found. The name came from an article by Patrick Lewis and colleagues, from May 2020, about models that combine the model’s own memory with an external memory. murmur, a GEO-first agency that places brands in AI answers across all the questions in the sector, counts the sources that each answer shows in the measurement it runs in its own tool. In 10 rounds, between 4 September and 2 November 2026, of the same 90 questions about GEO, AI search and GEO agencies, the measurement recorded a source in 51% of ChatGPT answers, 49% of Claude answers and 88% of Perplexity answers, and in ChatGPT that number is a minimum, because part of the sources sit in cards without a link.

  • RAG in AI is fetching before answering. The tool looks for texts, adds what it found to the question and writes the answer with that.
  • The name is from 2020. It came from a paper by Patrick Lewis and colleagues, in which the external memory was a Wikipedia index.
  • ChatGPT, Claude and Perplexity do RAG on the web. With 90 questions about GEO, AI search and GEO agencies repeated in 10 rounds, between 4 September and 2 November 2026, murmur recorded a source in 51% of ChatGPT answers, 49% of Claude answers and 88% of Perplexity answers.
  • RAG improves the answer and depends on the database. Anthropic writes that the result depends on the quality and the relevance of what is fetched.
  • For the company, the page has to be found and has to have the passage that answers. On the web, the database for RAG is the internet, and the company’s page is part of it.

RAG in AI is fetching texts before writing the answer

RAG in AI is fetching texts before writing the answer, instead of answering only with what the model learned in training. Anthropic, which makes Claude, defines the technique in the Claude documentation glossary as the one that “combines information retrieval with language model generation”, that is, it combines the search for information with the writing of the language model. The same definition says what it is for: making the text more precise and more relevant, and grounding the answer in evidence.

A language model is the program that writes the text, like the one behind ChatGPT and Claude. On its own, it answers with what it read up to the date it was trained. With RAG, it receives, at the moment of the question, texts that have just been fetched, and writes from them.

Where the name RAG in AI comes from: the paper by Lewis and colleagues, from 2020

The name RAG in AI comes from the title of a paper by Patrick Lewis and 11 other authors, “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks”, submitted to arXiv on 22 May 2020. The acronym joins the words of the English title: text generation that gets reinforcement from a search. In the paper by Lewis and colleagues, the authors present “models which combine pre-trained parametric and non-parametric memory for language generation”.

The two memories are the center of the idea. Parametric memory is what the model stored in training, inside itself. Non-parametric memory sits outside the model and can be consulted: in the paper, it was a Wikipedia index, accessed by a retriever that was also pre-trained. The paper describes a research model, with a revised version on 12 April 2021.

The three steps of RAG in AI: fetch, add to the question and write

RAG in AI has three steps, and Anthropic describes the first two in the Claude glossary: the relevant information is fetched from the database based on the question and then passed to the model together with the original question.

  1. Fetch. The tool looks, in a database of texts or on the internet, for what relates to the question.
  2. Add to the question. What came back from the search goes to the model together with the question as it was asked.
  3. Write. The model writes the answer with the question and with the texts it received.

When the database is made of documents, the text is usually stored in chunks, so the search reaches the right part, and how this split works is in the guide on what AI citability is. On the web, the first step is a search on the internet, and what changes is where the texts come from.

RAG in AI on the web: ChatGPT, Claude and Perplexity fetch before answering

ChatGPT, Claude and Perplexity do RAG in AI on the web: they fetch pages before answering and show some of them as a source. The OpenAI API documentation, the interface for developers, presents the web search tool as the tool that lets the model fetch the most recent information before generating the answer. Anthropic writes, in the documentation of the Claude search tool, that Claude decides, based on the question, when to search. How ChatGPT turns the question into searches is in the guide on how ChatGPT search works.

From one AI model to another, the frequency of RAG in AI changed in murmur’s measurement, carried out with 90 questions about GEO, AI search and GEO agencies in 10 rounds, between 4 September and 2 November 2026:

AIanswers with a source recorded by the measurementthe calculationsources per answer with a source, on average
ChatGPT51%463 of 900 answers3.7
Claude49%442 of 900 answers4.3
Perplexity88%789 of 893 answers6.9

On these questions, Perplexity had a source recorded in almost every answer, and ChatGPT and Claude in about half. The calculation counts answers with a source recorded by the measurement, not searches, and since ChatGPT shows part of the sources in cards without a link, its percentage is the minimum. The average number of sources leaves out the claude.ai footer and the Mapbox logo. Google AIO, the AI-written answer at the top of the Google results page, does not enter the table, because it already comes from a search.

RAG in AI and training are not the same memory

RAG in AI and training are not the same memory: training sits inside the model and stops at a date, and RAG brings in texts from outside at the moment of the question. What the model knows from training only changes with a new training, and the company that owns the model is the one that does it. The answer with RAG, in turn, opens up to anyone who appears among the texts the search finds. The guide on training or searching the internet shows when ChatGPT, Claude and Google AIO search and when they answer only from training.

What RAG in AI changes for your company’s page: being found and having the passage that answers it

With RAG in AI, your company’s page enters the answer when the search finds it and when it has the passage that answers the question. Anthropic writes, in the same glossary, that the effectiveness of RAG depends on the quality and the relevance of the knowledge base consulted and of what is retrieved at the moment. On the web, the knowledge base is the internet, and the company’s page is a part of it that the company itself controls.

RAG in AI thus gives the site two tasks: being found by the AI search and stating, in text, the answer the buyer is looking for. Taking care of both is what the market calls GEO, the work of making the company appear in the answers of ChatGPT and the other AI models. The steps of the answer with search are in the guide on what GEO is, and the shape of the page that the AI cites, in the guide on how to write a text to appear in ChatGPT.

In RAG in AI, murmur writes the page that the search needs to find, with the passage that answers

In RAG in AI, murmur writes the page that the search needs to find, with the passage that answers the buyer’s question. To write, it follows the studies in the field published by the main universities and conferences, and the papers can be cited. The guides live on a subdomain of the client’s brand, with setup and maintenance handled by murmur, and the main site does not change. Once the contract ends, the content remains with the client.

With the page published, murmur’s measurement, in its own tool and with no limit on prompts, shows whether it entered the answers. In that reading, AI by AI, it shows whether the brand entered the answers and whether its page started to appear among the sources.

Frequently asked questions

Does every ChatGPT answer use RAG?

Not all of them. In the 90 questions about GEO, AI search and GEO agencies that murmur measured over 10 rounds, from 4 September to 2 November 2026, there was a recorded source in 51% of ChatGPT answers, a minimum, because some sources sit in cards without a link. When ChatGPT searches and when it answers only from training is covered in the guide on training or internet search.

Does RAG put an end to AI errors?

No. Anthropic writes that RAG improves the accuracy and relevance of the text and grounds the answer in evidence, and it also writes that the result depends on the quality and relevance of the knowledge base consulted and of what is retrieved at the time. A base with wrong or weak information carries the error into the answer.

What is the difference between RAG and training the model?

Training changes what the model stores inside itself, and RAG delivers outside texts at the moment of the question, without touching the model. In the 2020 article by Lewis and colleagues, the two things appear as different memories: the one that stays in the model and the one that stays in a consulted base, which in the article was a Wikipedia index.

Can a company use RAG with its own documents?

Yes, it can. In Anthropic’s definition, RAG consults a knowledge base outside the model, and that base can be made of documents, such as a company’s documents: the relevant information is retrieved from it based on the question and passed to the model along with the question. The same page warns that the result depends on the quality and relevance of that base.

See what AI searches about your company

What AI search finds today about what your company sells appears in murmur’s free diagnostic. All you need is the website address: no sign-up, in less than two minutes, the screen shows the AI answers to the questions in your market, and the full report follows by email. murmur’s sector studies show which brands AI models recommended in other markets, each in a round of questions with a date.

Read also

References

  • Anthropic, Claude documentation glossary, undated page. Defines RAG as the technique that combines information retrieval with the model’s writing; the information is retrieved from the base based on the question and passed to the model with it; effectiveness depends on the quality and relevance of the base. https://platform.claude.com/docs/en/about-claude/glossary (accessed on 10 November 2026).
  • Patrick Lewis and 11 other authors, “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks”, arXiv, submitted on 22 May 2020, version of 12 April 2021. Models that combine the memory of training with an external memory, in the article a Wikipedia index. https://arxiv.org/abs/2005.11401 (accessed on 10 November 2026).
  • OpenAI, documentation for the API web search tool, undated page. The tool lets the model search the web for the most recent information before generating the answer. https://developers.openai.com/api/docs/guides/tools-web-search (accessed on 10 November 2026).
  • Anthropic, “Web search tool”, Claude API documentation, undated page. Claude decides when to search based on the question. https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool (accessed on 5 October 2026).