Chunking is splitting a document into smaller passages before embedding, so each piece can be indexed, searched and returned on its own.
Embedding models and context windows both have size limits, and a whole PDF is too large and too mixed to be one vector. Chunking cuts it into pieces: by paragraph, by heading, by a fixed token count with overlap, or by page. Each chunk is embedded and stored with metadata saying where it came from. When a search matches a chunk, the system returns that passage plus its location.
Chunk size is a trade-off. Small chunks are precise but lose surrounding context. Large chunks keep context but blur the match and use more of the window. Overlap between neighbors reduces the chance of cutting a sentence in half. Format matters too: tables in CSV or XLSX, slides and scanned pages need different splitting than prose. Good chunk metadata (page, position, source file) is what makes a retrieved passage checkable later.