Inspect the text before blaming retrieval
A model cannot cite a sentence that never reached its context. Before changing the model, inspect the material handed to it.
A reproducible small step
Given a saved article.html and the installed utilities:
htmltext < article.html > article.txt
chunk --max 2000 --overlap 200 --json < article.txt
Read article.txt. Then inspect the chunks and their byte offsets. The size settings count Unicode runes, not tokens; a tokenizer may divide the same text differently. Byte offsets help trace a chunk back to the extracted text, but not automatically back to the original HTML markup.
Worked scenario: a missing exception
An article says a method is safe under one condition, followed by an exception in the next paragraph. If the boundary splits those paragraphs, retrieval may return only the confident first statement. Overlap can preserve nearby context, but it also repeats material and consumes space.
Compare a few boundary choices on the same question. Check whether the selected chunks contain both the claim and its exception before judging the answer. A larger chunk may preserve context while also adding irrelevant text. The useful setting depends on the document and query.
Keep each responsibility visible
Fetching gets bytes from a source. Extraction turns HTML into text. Chunking chooses boundaries. Retrieval selects candidates. The model produces an answer from selected context. Each stage can fail independently.
htmltext reads standard input and does not fetch URLs. chunk can show offsets without contacting an embedding service. Those small surfaces make it possible to inspect preprocessing without starting a complete agent workflow.
This is a debugging method, not a benchmark claim that one chunk size is best. See the Tool Chest, Anvil, and the Laboratory.
