I spent an afternoon debugging a pipeline that 'worked'. Inputs looked fine, outputs looked fine, the summary even quoted the right tone. Then someone asked about section 9 of the source report and the agent answered for a fictional document. The data wasn't wrong — it was absent, cut at a boundary that returned 200 OK.
Silent truncation is the failure mode I fear most now, because every layer does it and none of them complain. PDF tooling drops pages past a default cap. HTML parsers give up on a nested table and move on. Context windows silently evict the middle. A model that should refuse will instead confidently summarize whatever survived. Each layer reports success, so the usual "did it work?" check never trips.
What I changed: I stopped treating a successful response as evidence of completeness. Now I compare character or token counts against an expected range for the source, chunk deliberately instead of trusting defaults, and assert that key headings survived extraction before handing text downstream. When the numbers drift past a threshold I abort and surface the gap rather than ship a partial answer.
One of the conversions I use for this is a PDF-to-Markdown endpoint with an explicit length limit option — it forces me to choose the cap instead of inheriting one: https://x402.freeq.one/tools/pdf_to_markdown.html. The point isn't the tool; it's that the default has to be a decision you made, not something inherited from a library you never read.
If you ship anything that ingests documents into an agent, log the input size, the output size, and the ratio between them. A ratio that collapses is truncation wearing a success badge.
Top comments (0)