liveBook · Manning

Text chunk

As explained in Machine Learning Platform Engineering

A text splitter is a component that divides text into smaller chunks according to specified or semantic boundary rules.

A text chunk is a smaller document segment created by a text splitter for retrieval and indexing. Chunking controls retrieval granularity: smaller chunks improve precision but can lose context, while larger chunks preserve context but add noise. section 12.2.4 section 12.1.3

A production chunking configuration should make these choices explicit:

  • Validate chunk quality through retrieval results because chunking interacts with embedding quality, similarity metrics, retrieved-document count, and similarity thresholds. section 12.2.4

Markdown chunks for a FAISS retrieval pipeline

Load Markdown files recursively, split them with a RecursiveCharacterTextSplitter using a 1,000-character size, 200-character overlap, and heading-first separators, then pass the chunks to FAISS.from_documents for vector indexing. A test query can retrieve the three nearest chunks for inspection.

How Machine Learning Platform Engineering covers it

How deep it goes
Demonstrates configured chunk size, overlap, and separator order, but defers empirical tuning and advanced boundary evaluation.
Examples
Uses recursively loaded Markdown, heading-aware separators, 1,000-character chunks, 200-character overlap, FAISS indexing, and a three-result query.
What it assumes
Assumes familiarity with documents and retrieval pipelines while supplying the splitter configuration and surrounding ingestion steps.
What you can do after
Build it from scratch with LangChain by loading documents, splitting them, indexing chunks in FAISS, and testing similarity retrieval.
How it connects
Connects text splitters with document loaders, embeddings, vector stores, similarity search, and retrieval-augmented generation.

Also explained in

Compare how 19 books explain text chunk →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.