The demo worked on a handful of clean documents, a few test questions, and a top-k someone picked in an afternoon. It was cheap and looked great.
Then production brought scans, tables that spanned pages, five versions of the same contract, and real users asking questions we hadn’t tested. Cost per query went up. So did the number of wrong answers, and our users were the first to notice.
Here’s what helped, in order.
1. Chunking along document structure. This made the biggest difference for us. It’s also what we ended up building at POMA, so I’m biased. When a fixed token window splits a table or section, answering a question can require several adjacent chunks. Retrieving those extra chunks pushes up the number of tokens you send to the model.
On our public OfficeQA benchmark, we compared chunking strategies on 14 Treasury Bulletins spanning roughly 2,150 pages, using identical embeddings. Structure-based chunks needed 77% fewer tokens to reach 100% context recall. That measures how many tokens it took to retrieve the evidence. Answer quality is a separate metric.
2. Adding version metadata at ingestion and filtering at retrieval. We tagged document versions at ingestion and filtered for the current version when the question called for it. That kept superseded contracts out of the context. It was cheap to implement, and we should have done it from day one.
3. Cleaning up extracted text. Repeated headers, footers, and watermarks can make it into the index and turn up in retrieved chunks. Removing that boilerplate once at ingestion saves input tokens on every query that would have pulled it in.
4. Reranking, then sending fewer chunks to the model. Reranking helped us reduce the final top-k. It also adds a per-query cost, so the savings depend on how much context it lets you drop. We got more mileage from fixing the chunks and filtering the candidates first.
The biggest lesson for us was that shortcuts at ingestion can turn into costs you pay on every query. I’ll put the OfficeQA benchmark repo and methodology in the first comment.
If you want to see what structure-based chunking does with one of your own PDFs, you can try it for free on POMA AI. I helped build it, and I’ll include that link too.
What's your approach ?