This translation is approved for publication. Some citations and numerical claims in the source are still under review.

Data & databases

RAG

Retrieval-augmented generation

An abbreviation for Retrieval-Augmented Generation, a technique used in applying AI. It has the AI look up external material before answering and read the supporting documents along with the question.

What does RAG mean in simple terms?

RAG is a way of telling AI, “Don't answer from memory; take material off the bookshelf, read it, and then answer.” Think of an open-book exam with textbooks and notes spread out, rather than a closed-book exam relying only on what is in your head. This lets it accurately answer about new information after its training cutoff or material it did not originally know, such as internal company documents. If you have seen a chatbot show supporting documents alongside an answer, such as “Source: internal manual, page 12,” RAG is usually running behind the scenes.

How can RAG be explained with an analogy?

Pull together the relevant materials and bring them with you before entering a meeting.

Where is RAG used?

Case 1

Anthropic — Improving RAG retrieval accuracy with Contextual Retrieval

In September 2024, Anthropic introduced Contextual Retrieval on its official blog, addressing limitations of standard RAG. When documents are split into chunks, or small passages, an LLM automatically generates a line of context describing “which part of which document this passage comes from” and prepends it to each chunk. Embeddings, which convert sentences into numerical vectors, and BM25 keyword matching are then applied together. The technique was tested against simple RAG using the same datasets and retrievers, and the cost of adding context per chunk was also disclosed.[2]
Impact: Top-20 retrieval failure rate falls from 5.7% to 1.9%, a 67% reduction from simple RAG when combined with reranking, according to Anthropic's official benchmark.

Case 2

Morgan Stanley — An internal research chatbot for wealth management advisors

Morgan Stanley worked with OpenAI to build “AI @ Morgan Stanley Assistant,” an internal GPT-4-based assistant. It uses RAG to retrieve and answer from approximately 100,000 internal research reports. When an advisor asks a natural-language question such as “What are the risks of AI-related stocks?”, it provides an answer with source citations. It expanded to the follow-up tool Debrief and became part of wealth management advisors' everyday work.[4][5]
Impact: 98% adoption among wealth management advisors (Morgan Stanley official press release, 2024).

Case 3

Korean fintech — A chatbot for terms and product information

A fintech handling approximately 120,000 inquiries each month built a hybrid architecture combining RAG with small-scale LoRA fine-tuning over 14 weeks, using 1,800 terms and product explanation documents. It combined Korean-specialized KURE embeddings, a Qdrant vector database, hybrid keyword and semantic search, and Claude Sonnet. Before adoption, the first-contact automated resolution rate—the proportion of inquiries resolved entirely by the chatbot without connecting to an agent—was around 38%.[6]
Impact: First-contact automated chatbot resolution rate rises from 38% to 71%, +33 percentage points over the pre-adoption level, while average response time falls from 4.2 to 2.6 minutes.

Case 4

Stanford CS25 — Adopting a RAG module in a regular course

Stanford University's advanced computer science course on transformers, CS25(V3), included a “Retrieval Augmented Language Models” session in its regular curriculum. Students directly study RAG design principles such as combining nonparametric external memory, or retrievers, sentence-window retrieval, and separating retriever-generator evaluation along three axes: context relevance, answer relevance, and groundedness. Public lecture videos are available for anyone to watch.[7]
Impact: 1 RAG lecture session included in the Stanford CS25(V3) regular curriculum, based on the 2024 season, with more than 600,000 cumulative views of the public lecture.

Learning steps, limitations and developments

  1. Define the document scope the system will answer from—a single clear collection such as an internal wiki, product manuals, or terms PDFs.
  2. Split documents into chunks, typically 200–800 tokens, breaking at meaningful units.
  3. Convert chunks into vectors with an embedding model and load them into a vector database, such as pgvector, Pinecone, or Chroma.
  4. When a question arrives, retrieve the top K chunks, usually top-20, attach them to the prompt, and send them to the LLM.
  5. Have every answer include source chunk IDs, and run an accuracy evaluation sheet using 30–50 questions with clear correct answers.

RAG does improve answer reliability, but if retrieval goes wrong, the LLM may confidently invent a false answer based on the wrong passage, producing “hallucination on top of hallucination.” Operational variables such as chunking methods, the embedding model's Korean-language capabilities, and the absence of an evaluation dataset greatly affect accuracy.[8] In one actual case at a Korean small IT company, adoption with a free embedding model and no evaluation dataset produced only 41% accuracy, and operations were discontinued after 4 months.[6] In a paper published in 2025, Bloomberg researchers also reported that even models that normally give safe answers may generate more risky answers when RAG brings in external documents. Outdated or conflicting internal documents are another frequently reported limitation affecting answer quality in operation. As a result, early adoption generally involves more work on reducing retrieval failures than on the hallucination reduction effect itself.

Current development falls into three broad directions. First, refining retrieval itself. Approaches that inject context into chunks to improve retrieval precision, such as Anthropic's Contextual Retrieval from September 2024, are moving toward becoming standard. Hybrid retrieval combining BM25 keyword matching with semantic matching through embeddings, plus reranking, has effectively become a basic configuration.[2] Second, evaluating retrieval and generation in distinct stages rather than leaving them undifferentiated. Stanford CS25 teaches evaluation of RAG systems along three axes: context relevance, answer relevance, and groundedness.[7] Third, moving beyond one-off retrieval to Agentic RAG, in which agents call retrieval as a tool whenever necessary. Configurations that choose between internal documents, the web, and databases depending on the situation are increasing, and a comprehensive 2025 arXiv survey describes this as RAG's next-generation standard architecture.[3]

How has RAG evolved?

2020.05
Lewis 2020 RAG paper
Facebook AI formalizes a combined retrieval-generation architecture in a NeurIPS paper.
2023—24
Enterprise adoption expands
Internal RAG gains momentum at major financial and legal companies such as Morgan Stanley and Harvey.
2024.09
Anthropic Contextual Retrieval
Automatically adding context to chunks reduces retrieval failure by up to 67%.
2025—
Agentic RAG
Evolving toward architectures in which agents call retrieval tools whenever needed.

Which concepts are related to RAG?

  • Next step
    Agentic EngineeringA workflow where agents call retrieval whenever needed
  • Related concept
    Fine-tuningAnother way to adapt a model to a domain
  • Foundational technology
    EmbeddingThe backbone of retrieval, converting chunks into vectors
  • Representative tool
    LangChainA leading framework for assembling RAG pipelines

RAG vs Fine-tuning

ComparisonRAGFine-tuning
Data locationExternal document retrievalTraining inside the model
Update costLow (replace documents)High (retrain)
Accuracy traceabilitySource citations availableEvidence is difficult to trace
FreshnessReflects updates in real timeStops at training time
ApplicationsInternal chatbots and customer supportTone and domain specialization

Which sources explain RAG?

  1. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (Lewis et al., 2020) — Academic paper · arXiv/NeurIPS · 2020-05-22
  2. Introducing Contextual Retrieval — Official company announcement · Anthropic · 2024-09-19
  3. Morgan Stanley kicks off generative AI era on Wall Street with assistant for financial advisors — Authoritative media · CNBC · 2023-09-18
  4. Key Milestone in Innovation Journey with OpenAI — Official company press release · Morgan Stanley · 2024
  5. SK hynix case study on building a RAG platform and evaluating/analyzing performance — Official company case study · AWS technology blog · 2024
  6. Customizing models for legal professionals — Official company case study · OpenAI · 2023
  7. Bloomberg's Responsible AI Research: Mitigating Risky RAGs & GenAI in Finance — Official company research · Bloomberg · 2025
  8. Stanford CS25 V3: Retrieval Augmented Language Models — Official university course · Stanford University · 2024