# Corpus

> A big set of text that a language model learns from.

**Field:** Artificial Intelligence  
**Category:** NLP & Language  
**Also known as:** Text Corpus, Corpora

## Think of it like

Think of it like a huge pile of books. A computer reads them all to learn words.

## Definition

A corpus is a large set of text gathered for a language tool to learn from or be tested on. It can be books, news stories, web pages, chat logs or a mix. A small one has a few thousand pages, and the ones behind big chat models hold a large part of the public web. What is in the corpus shapes what the model knows and how it writes. The plural is corpora.

## Example

Jack wants a model that reads legal letters. He builds a corpus of 50,000 old letters from his firm and trains on it.

## Why it matters

A model can only learn what its corpus holds. Gaps and slants in the text become gaps and slants in the model.

## Common mistake

Thinking more text is always better. A corpus full of spam or repeats can teach the model bad habits.

## Three principles

- **A lot of text.** Gathered for one purpose.
- **Shapes the model.** It learns what is there.
- **Quality counts.** Not just size.

## Related terms

- [Training Data](https://learn.benibix.com/term/ai/training-data)
- [Natural Language Processing (NLP)](https://learn.benibix.com/term/ai/natural-language-processing)
- [Language Model](https://learn.benibix.com/term/ai/language-model)
- [Term Frequency-Inverse Document Frequency (TF-IDF)](https://learn.benibix.com/term/ai/tf-idf)

![Four documents in a row. A common word appears in all four and gets a low score. A rare word appears often in one document only and gets a high score there.](https://learn.benibix.com/diagrams/nlp-tf-idf.svg)

---

Source: https://learn.benibix.com/term/ai/corpus
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
