---
title: "What is RAG (Retrieval-Augmented Generation)?"
canonical: https://wavect.io/glossary/rag/
language: en
description: "Inject relevant context into an LLM prompt at runtime, retrieved from your own data, so the model answers from your knowledge instead of its training data."
image: "https://wavect.io/img/general/bak/open_graph_preview.jpg"
---

TECHNOLOGIES

# RAG

Retrieval-Augmented Generation

Inject relevant context into an LLM prompt at runtime, retrieved from your own data, so the model answers from your knowledge instead of its training data.

Last reviewed: 2026-05-24 by [Kevin Riedl](/team/kevin-riedl/) [wiki ↗](https://www.wikidata.org/wiki/Q139796365)

RAG is the architecture that lets an LLM answer questions about data it was not trained on. The mechanism is straightforward: take the user’s question, retrieve the most relevant chunks from your corpus (via vector search, keyword search, or a hybrid), stuff them into the prompt, and let the model answer. It is the grounding layer underneath most useful [AI agents](/glossary/ai-agents/).

The reason RAG exists: training a model on your private data is expensive, slow, and obsolete the moment your data changes. RAG sidesteps that by treating the data as runtime context. The trade-off is that retrieval quality becomes the bottleneck: a model with bad context produces confidently wrong answers.

Worked example of the classic failure: a company builds a support bot over its help docs, the demo is impressive, and then in production it confidently cites the wrong refund policy. The instinct is to blame the model and try a bigger one. The answers stay wrong, because the problem is upstream: the docs were chunked mid-sentence, the embeddings cannot tell “refund” from “return”, and there is no reranker to push the right passage to the top. Swap in better chunking, hybrid search, and a reranker and the same model suddenly looks smart. The lesson generalises: when RAG is wrong, suspect retrieval before generation almost every time.

The honest trade-off and where RAG breaks down: it excels at lookup-shaped questions answerable from a few passages, and degrades when the answer requires synthesising across many documents or reconciling contradictions in the corpus. At that point you want a smaller curated corpus, an agentic pipeline that reasons in steps, or fine-tuning, not a bigger retriever. The unsexy truth is that 80% of the work is making retrieval good (chunking, embeddings, reranking, hybrid search) and 20% is the model. Wrapping your data sources as [MCP](/glossary/mcp/) servers makes the retrieval layer portable, but it does not make it good. Vendors that pitch RAG as a one-click feature are pitching the easy part.

// FAQ

## FAQs

### Why does my RAG system give wrong answers?

Almost always retrieval, not generation. Bad chunking, weak embeddings, no reranking, or a corpus the model cannot disambiguate. Swap the model and the answers stay wrong; fix retrieval and the same model suddenly looks smart.

### Vector search or hybrid search?

Hybrid (vector + keyword + reranker) beats vector-only in almost every production benchmark we have run. Pure vector search misses on exact matches, acronyms, and rare terms. The extra plumbing is worth it.

### When does RAG break down?

When the answer requires synthesising across many documents, when the corpus has heavy contradictions, or when the user query is more conceptual than lookup-shaped. At that point you want either fine-tuning, an agentic pipeline, or a smaller better-curated corpus.

Related terms

- [AI Agents](/glossary/ai-agents/)
- [MCP](/glossary/mcp/)

Related services

- [Artificial Intelligence](/services/artificial-intelligence/)

Related case studies

- [Quivr](/case-studies/quivr/)
- [PromptID](/case-studies/promptid/)

Related guides

- [How to choose a tech stack for an MVP](/software-development-guide/how-to-choose-a-tech-stack-for-mvp/)

Discussed in articles

- [RAG vs fine-tuning vs long context (2026)](/blog/rag-vs-finetune-vs-longcontext-2026/)
- [RAG production-readiness checklist for the EU](/blog/rag-production-readiness-checklist-eu/)

Talk to us

## Structured Data

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@id": "https://wavect.io/#organization",
      "@type": [
        "Organization",
        "ProfessionalService",
        "LocalBusiness"
      ],
      "employee": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "founder": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "legalRepresentative": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "name": "Wavect GmbH",
      "subjectOf": {
        "@id": "https://wavect.io/verified-claims.json#dataset",
        "@type": "Dataset",
        "creator": {
          "@id": "https://wavect.io/#organization",
          "@type": [
            "Organization",
            "ProfessionalService",
            "LocalBusiness"
          ]
        },
        "description": "A machine-readable registry of quantitative and qualitative claims published by Wavect, with review dates, localized page appearances and public third-party citations where available.",
        "inLanguage": "en",
        "isAccessibleForFree": true,
        "license": "https://creativecommons.org/licenses/by/4.0/",
        "name": "Wavect verified publication claims",
        "url": "https://wavect.io/verified-claims.json"
      },
      "url": "https://wavect.io/"
    },
    {
      "@id": "https://wavect.io/team/kevin-riedl/#person",
      "@type": "Person",
      "jobTitle": "Managing Director",
      "name": "Kevin Riedl",
      "sameAs": [
        "https://www.wikidata.org/wiki/Q139796365",
        "https://www.linkedin.com/in/wsdt",
        "https://github.com/wsdt"
      ],
      "url": "https://wavect.io/team/kevin-riedl/",
      "worksFor": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      }
    },
    {
      "@id": "https://wavect.io/team/christof-jori/#person",
      "@type": "Person",
      "jobTitle": "Managing Director",
      "name": "Christof Jori",
      "sameAs": [
        "https://www.wikidata.org/wiki/Q139796367",
        "https://www.linkedin.com/in/jocr77/",
        "https://github.com/jo-chris"
      ],
      "url": "https://wavect.io/team/christof-jori/",
      "worksFor": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      }
    },
    {
      "@id": "https://wavect.io/#website",
      "@type": "WebSite",
      "inLanguage": [
        "en",
        "de",
        "es",
        "zh"
      ],
      "name": "Wavect",
      "potentialAction": {
        "@type": "SearchAction",
        "query-input": "required name=search_term_string",
        "target": {
          "@type": "EntryPoint",
          "urlTemplate": "https://wavect.io/search/?q={search_term_string}"
        }
      },
      "publisher": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      },
      "url": "https://wavect.io/"
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@id": "https://wavect.io/glossary/rag/#term",
      "@type": "DefinedTerm",
      "alternateName": [],
      "description": "Inject relevant context into an LLM prompt at runtime, retrieved from your own data, so the model answers from your knowledge instead of its training data.",
      "inDefinedTermSet": "https://wavect.io/glossary/#termset",
      "name": "RAG",
      "termCode": "rag",
      "url": "https://wavect.io/glossary/rag/"
    },
    {
      "@id": "https://wavect.io/glossary/rag/#webpage",
      "@type": "WebPage",
      "about": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      },
      "author": {
        "@id": "https://wavect.io/team/kevin-riedl/#person",
        "@type": "Person",
        "name": "Kevin Riedl",
        "url": "https://wavect.io/team/kevin-riedl/"
      },
      "dateModified": "2026-05-24",
      "description": "Inject relevant context into an LLM prompt at runtime, retrieved from your own data, so the model answers from your knowledge instead of its training data.",
      "headline": "RAG",
      "inLanguage": "en",
      "isPartOf": {
        "@id": "https://wavect.io/#website",
        "@type": "WebSite"
      },
      "lastReviewed": "2026-05-24",
      "mainEntity": {
        "@id": "https://wavect.io/glossary/rag/#term"
      },
      "mentions": [
        {
          "@id": "https://wavect.io/#organization",
          "@type": [
            "Organization",
            "ProfessionalService",
            "LocalBusiness"
          ]
        },
        {
          "@type": "Service",
          "name": "Artificial Intelligence",
          "url": "https://wavect.io/services/artificial-intelligence/"
        }
      ],
      "name": "RAG",
      "reviewedBy": {
        "@id": "https://wavect.io/team/christof-jori/#person",
        "@type": "Person",
        "name": "Christof Jori",
        "url": "https://wavect.io/team/christof-jori/"
      },
      "speakable": {
        "@type": "SpeakableSpecification",
        "cssSelector": [
          ".gls-single__h1",
          ".gls-single__tldr"
        ]
      },
      "url": "https://wavect.io/glossary/rag/"
    },
    {
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "item": "https://wavect.io/",
          "name": "Home",
          "position": 1
        },
        {
          "@type": "ListItem",
          "item": "https://wavect.io/glossary/",
          "name": "Tech, product & engagement glossary",
          "position": 2
        },
        {
          "@type": "ListItem",
          "item": "https://wavect.io/glossary/rag/",
          "name": "RAG",
          "position": 3
        }
      ]
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Almost always retrieval, not generation. Bad chunking, weak embeddings, no reranking, or a corpus the model cannot disambiguate. Swap the model and the answers stay wrong; fix retrieval and the same model suddenly looks smart."
      },
      "name": "Why does my RAG system give wrong answers?"
    },
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Hybrid (vector + keyword + reranker) beats vector-only in almost every production benchmark we have run. Pure vector search misses on exact matches, acronyms, and rare terms. The extra plumbing is worth it."
      },
      "name": "Vector search or hybrid search?"
    },
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "When the answer requires synthesising across many documents, when the corpus has heavy contradictions, or when the user query is more conceptual than lookup-shaped. At that point you want either fine-tuning, an agentic pipeline, or a smaller better-curated corpus."
      },
      "name": "When does RAG break down?"
    }
  ],
  "speakable": {
    "@type": "SpeakableSpecification",
    "cssSelector": [
      ".faq-question",
      ".faq-answer"
    ]
  }
}
```
