18One call
Retrieval-augmented generation
One retrieval step before the call: add passages relevant to the query to the prompt.
Also called RAG
Lewis et al., Xu et al., Anthropic, Amazon Web Services, Microsoft
The problem
The model needs knowledge it was not trained on, or that is newer than its training data.
For an AI model to be useful in specific contexts, it often needs access to background knowledge.
LLM training data is static and introduces a cut-off date on the knowledge it has.
Therefore
RAG is a method that retrieves relevant information from a knowledge base and appends it to the user's prompt, significantly enhancing the model's response.
Retrieval-augmented generation (RAG) is a pattern that extends LLM capabilities by grounding responses in your proprietary content.
We explore RAG models, which use the input sequence x to retrieve text documents z and use them as additional context when generating the target sequence y
In use
Claude Projects
As you add more files and information to your projects, Claude automatically switches to a faster mode (powered by RAG) that keeps response times quick while maintaining quality responses.
LinkedIn customer service
Our method has been deployed within LinkedIn’s customer service team for approximately six months and has reduced the median per-issue resolution time by 28.6%.
Where it breaks
Encoding text for retrieval strips its context, so retrieval can miss the passage that answers.
The problem is that traditional RAG solutions remove context when encoding information, which often results in the system failing to retrieve the relevant information from the knowledge base.
Sources
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, Douwe Kiela, Lewis et al.
- Retrieval-Augmented Generation with Knowledge Graphs for Customer Service Question AnsweringZhentao Xu, Mark Jerome Cruz, Matthew Guevara, Tie Wang, Manasi Deshpande, Xiaofeng Wang, Zheng Li, Xu et al.
- Contextual retrieval in AI systemsAnthropic, Sep 19, 2024
- What is RAG? - Retrieval-Augmented Generation AI ExplainedAmazon Web Services
- Retrieval-augmented generation (RAG) in Azure AI SearchMicrosoft
- Retrieval augmented generation (RAG) for projectsAnthropic
Added Nov 14, 2026