Corpus
A corpus is an organized collection of documents, texts, or other language data assembled for processing, retrieval, analysis, training, or evaluation.
Software Testing with Generative AI
A corpus is a curated collection of documents or other information assembled for retrieval and analysis.
- How it is used
- Supplies searchable context that RAG retrieves and inserts into prompts for more accurate testing-oriented LLM responses.
- How deep it goes
- Explains corpus contents, relevance selection, context-window rationale, file loading, and cosine-distance matching.
- Examples
- Uses labeled HTML pages, user-story files, booking API requirements, and Java resource-folder loading as concrete corpus examples.
- What you can do after
- Build it from scratch by loading documents, matching a query with cosine distance, and placing the closest document into a prompt.
Read how Software Testing with Generative AI explains corpus →
Natural Language Processing in Action, Second Edition
A corpus is a structured collection of documents or language samples used for linguistic analysis or model development.
- How it is used
- Supports statistical pattern-finding across documents for linguistic analysis and language-model development.
- How deep it goes
- Defines document collection, indexing, counting, and vectorization, while deferring deeper language-model mechanics to Word2Vec.
- Examples
- Uses German and English greeting messages, document indexes, token-sorting analogies, and Python Counter outputs.
- What you can do after
- Apply it via word counts and document indexes to inspect recurring language patterns.
Read how Natural Language Processing in Action, Second Edition explains corpus →
Generative AI in Action
A corpus is a collection of documents or passages assembled for information retrieval or language processing.
- How it is used
- Supports retrieval-augmented generation by supplying documents or passages for retrieval and grounded response generation.
- How deep it goes
- Explains sparse and dense retrieval mechanisms, trade-offs, selection criteria, and production quality controls.
- Examples
- Uses proprietary enterprise documents, diverse sources, current information, internal policies, and industry regulations as corpus contents.
- What you can do after
- Operate/configure a retrieval corpus and choose sparse or dense retrieval according to query, domain, and resource requirements.
AI-Powered Search
A document corpus is a collection of documents assembled for linguistic analysis or information retrieval.
- How it is used
- Frames documents as a searchable collection and supplies corpus evidence for query interpretation, concept extraction, and autocomplete.
- How deep it goes
- Explains corpus structure, text-analysis stages, and practical extraction workflows, but does not develop a full knowledge graph.
- Examples
- Uses phrase lookup, behavioral co-occurrence, and an outdoors dataset processed with spaCy for frequent concept extraction.
- What you can do after
- Apply it via spaCy and search data to interpret queries, extract vocabulary, and filter low-frequency autocomplete candidates.
Related concepts
- JSONhas part · JSON is a standardized, language-independent text format for representing structured data using objects, arrays, strings, numbers, Boolean values, and null.
- language modelused by · A language model is a computational model that represents patterns in linguistic tokens to estimate sequence probabilities and predict or generate language from context.
- retrieval-augmented generationused by · Retrieval-augmented generation is a technique that retrieves relevant information from external sources and supplies it as context to a generative model when producing an output.
- evaluation datasetpart of · An evaluation dataset is a collection of examples or test cases, often with expected or judged outcomes, designated to assess a model or system against defined criteria.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



