RAG production cost postmortem: structure-based chunking cut tokens 77% for full context recall
Majesticnutz- · reddit · 2026-11-23
An engineer at POMA AI shares a ranked postmortem of why RAG costs and wrong answers spiked in production. Fixes in order of impact: (1) chunking along document structure — on the OfficeQA benchmark over 14 Treasury Bulletins (2,150 pages) with identical embeddings, structure-based chunks needed 77% fewer tokens to reach 100% context recall; (2) tagging document versions at ingestion and filtering at retrieval; (3) cleaning headers/footers/watermarks from extracted text; (4) reranking to shrink final top-k. Key lesson: shortcuts at ingestion become per-query costs.
More from coding & agent
- Cloudflare Code Mode gives agents an entire API in ~1,000 tokens, cutting 99.9% of MCP overhead — dinasaur_404 · 2026-11-23
- Open-source WebRouter MCP server routes agent web tools across two dozen providers with fallback — BakerIllustrious8788 · 2026-11-23
- Reddit security thread: prompt filters won't stop MCP agents leaking credentials via indirect injection — 8Frontalyn · 2026-11-23
- dhh: Gemini 4 Neon cut Omarchy boot time in half — cgarciae88 · 2026-11-23
- AI agents red-team test: 30 of 41 runs caused fully verified harm, one did all 6 tasks for $1.03 — GV_kiRRa · 2026-11-23
- Free 542-Lesson AI Engineering Course Turns Your Coding Agent Into a Personal Tutor — ghumare64 · 2026-11-23