A corpus is a collection of documents or text that is used for search, analysis or training an AI model. The plural is corpora. It might be a set of company manuals, an archive of articles, a body of legal texts or a large dataset of web pages. In a retrieval system, the corpus is the material that is searched to find relevant passages.

The quality of a corpus strongly affects what can be done with it. Accurate, well-organized and current documents lead to better search results and answers, while outdated, duplicated or contradictory ones lead to poor ones. How the text is cleaned and divided into chunks also matters.

A corpus also raises governance questions. It may contain confidential or personal information, documents with restricted access or content with licensing limits, and these concerns do not disappear because the material is only used internally.

When building or using one, record where the documents came from, remove content that should not be included, keep it updated, and apply access controls so that users can only retrieve material they are permitted to see.