Chunking runs once, before anyone asks a question, and it quietly decides what your LLM will ever get to read.
RAG (retrieval-augmented generation) means the system searches your documents for relevant text and pastes it into the LLM's prompt. A whole PDF is too big to search as one unit, so you split it into pieces called chunks. Each chunk becomes one searchable unit, so where you cut decides what the retriever can hand over.
Three knobs matter:
1) Size. Small chunks match a question precisely but give the LLM little to work with. Large chunks carry more context.
2) Overlap. How much text two neighbouring chunks share, so a sentence cut at the edge survives in both.
3) Structure. Whether you cut blindly every N characters, or respect paragraphs, sentences and headings.
A sane place to start: split on paragraphs and sentences first, keep chunks to a few hundred tokens (a token is roughly a word or a piece of one), add a small overlap (10 to 20 percent of the chunk size is a common start), then tune all three on your own tests.
If the size trade feels impossible, LangChain's ParentDocumentRetriever sidesteps it. It searches small chunks, and on a hit returns the larger chunk (or the whole document) that piece came from. The price is a second store for those larger pieces and more tokens in every prompt, so check on your own questions that it beats a plain, well-tuned chunk size first.