What Is Retrieval Corpus?

Flavio AmielWritten byFlavio Amiel Founder, Roborank
Updated July 15, 2026

A retrieval corpus is the full collection of documents or passages that a retrieval system searches to answer a query. In a retrieval-augmented setup, the corpus is chunked, embedded, and indexed ahead of time, so that at query time the retriever draws candidate passages only from this bounded body of source material.

Key Takeaways

How a Retrieval Corpus Works

Every retrieval-augmented answer is built from a bounded set of source material, and that set is the retrieval corpus. Before any query arrives, the documents in the corpus are split into passages through chunking, each passage is turned into a vector embedding, and those embeddings are stored in a searchable index. At query time the retriever does not roam freely — it searches only within this prepared corpus, pulling the closest passages to hand to the model.

Google Cloud’s RAG Engine states the definition directly: a corpus is “a collection of documents or source of information,” and “the corpus can be queried to retrieve relevant contexts for response generation.” In its API the store is a first-class resource named RagCorpus, into which you upload or import files that become the eligible source material. Whatever is inside that corpus is retrievable; whatever is outside it simply cannot appear in an answer.

That boundary is the whole point. Once you accept that a retrieval-augmented generation system can only cite what its corpus contains, the corpus becomes a strategy surface. The step that fetches passages — chunk retrieval — is only as good as the corpus it searches. A corpus of clean, self-contained passages gives retrieval strong candidates to rank; a corpus padded with duplicates and context-dependent prose forces it to waste its limited slots.

A corpus is also a living thing, not a one-time upload. Google Cloud’s RAG Engine supports create, update, import, and delete operations on a corpus precisely because source material changes: documents are added, revised, or removed, and the index has to be refreshed to keep answers current. A stale corpus produces confidently wrong answers grounded in outdated passages, which is the same failure mode a search engine hits when its crawl of the web falls behind.

Two Kinds of Corpus

In practice a retrieval corpus takes one of two forms:

Example of a Retrieval Corpus

A concrete, documented example is Google Cloud’s RAG Engine corpus. Its documentation defines the corpus as “a collection of documents or source of information” that “can be queried to retrieve relevant contexts for response generation,” and exposes it through a RagCorpus API resource with standard create, import, list, and delete operations. A developer populates the corpus two ways the docs name explicitly — uploading files from local storage, or importing files from other storage locations — and only after that import does the material become retrievable. The corpus is the queryable repository the engine draws from; retrieval never reaches past it.

The lesson carries straight over to open-web AI search. There, the retrieval corpus is a live search index, and the equivalent of “importing a file” is having a page that an AI crawler can fetch and index. If your content is not in that corpus — blocked, unindexed, or unreachable — it is not a candidate for any answer, no matter how well written. Membership in the corpus is the precondition for every citation that follows, which is why crawlability and clean, grounding-ready passages are the foundation the rest of AI visibility sits on.

The thing people get wrong

The mistake I see is treating the corpus as a warehouse where you just dump everything and trust retrieval to sort it out. It doesn’t work that way. The corpus is the entire universe the answer can be built from — if a fact isn’t in there, no clever prompt conjures it, and if the corpus is full of near-duplicate or context-dependent passages, retrieval spends its top-k slots on mush. For open-web AI answers the corpus is a live search index, which means the real gatekeeper is whether an AI crawler could reach and read your page in the first place. Being in the corpus is the price of admission; nothing you do downstream matters until you have paid it.

Frequently Asked Questions

What is a retrieval corpus?
It is the complete set of documents a retrieval system searches to answer questions. In retrieval-augmented generation the corpus is split into chunks, embedded, and indexed in advance, and every retrieved passage comes from within it. Nothing outside the corpus can be retrieved or cited.
Is the retrieval corpus the same as a knowledge base?
Effectively yes, in RAG contexts. The corpus is the underlying collection of source documents; “knowledge base” is the common product term for that collection. Google Cloud’s RAG Engine uses “corpus” and “knowledge base” interchangeably for the queryable document store.
Can the open web be a retrieval corpus?
Yes. In web-grounded AI answers the corpus is a live search index rather than a fixed set of uploaded files. Passages are retrieved from indexed web pages at answer time, which is why crawlability and indexing determine whether your content is even eligible.
How does the corpus affect AI answer quality?
The corpus bounds what an answer can contain. A retriever can only return passages inside it, so missing coverage produces gaps and hallucinations, while noisy or duplicated documents waste limited retrieval slots. Curating clean, well-scoped source material improves every answer built on it.

The Bottom Line

A retrieval corpus is the closed world an AI answer is built from — the indexed body of documents a retriever is allowed to search. Curate it well and the system has clean evidence to cite; leave it thin or noisy and no downstream model can compensate. For open-web answers, earning a place in that corpus starts with being crawlable and indexed.

Sources

  1. Manage your RAG knowledge base (corpus) — RAG EngineGoogle Cloud

Rank & Cash — the weekly SEO breakdown

One practical teardown a week on ranking in search and getting cited by AI. No fluff.