A pharmaceutical company builds a RAG system over clinical trial reports. Each report is a 300-page PDF containing executive summary, methodology, results tables, adverse events section, and regulatory submissions. The team uses fixed-size 512-token chunks. Retrieval quality for questions about adverse events is poor, while retrieval for executive summary questions is good. Investigation shows adverse events sections use highly structured tabular data that loses meaning when chunked at 512 tokens (tables are split mid-row). What document-aware chunking strategy resolves this?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — structure-aware chunking is the architecturally correct solution for heterogeneous documents. PDFs contain multiple content types with different semantic coherence requirements: paragraphs chunk naturally at sentence boundaries, tables must be kept intact (a split table is meaningless), and section headers provide natural document-level boundaries.
Full explanation below image
Full Explanation
Structure-aware chunking is the architecturally correct solution for heterogeneous documents. PDFs contain multiple content types with different semantic coherence requirements: paragraphs chunk naturally at sentence boundaries, tables must be kept intact (a split table is meaningless), and section headers provide natural document-level boundaries. Chunking at detected structural boundaries preserves content integrity — a table becomes one chunk (even if 800 tokens), a short paragraph becomes a smaller chunk. Option A (larger fixed-size) is a blunt instrument: it might fit small tables but still splits large ones, and creates unnecessarily large chunks for narrative text (degrading retrieval precision). Option C (natural language table conversion) loses the structured data format that Claude can reason over precisely — converting 'Adverse event: Nausea, Incidence: 23%, Severity: Grade 2' to natural language introduces approximation and loses queryability. Option D (filtering tables) eliminates the adverse events data entirely, directly causing the retrieval failures rather than fixing them.