When two PDF columns turn into one bad return policy
A one-page PDF shows how extracting by line can detach a rule from the order it covers. Compare the actual text with a region-based extraction before indexing it for RAG.

Does the seven-day return window cover custom orders? In our sample PDF, the answer is no: the rule sits in the other column. A text extractor can preserve every word on the page while making that distinction very hard to recover. Check what was indexed before changing the answer prompt.
What does a line-based reader actually see?
The sample policy fits on a single page. A reader looking down the left column sees “Standard orders” followed by “Return within 7 days.” The entire right column reads “Custom orders / Manual review only.” These are fictional terms for testing extraction.

In pdfplumber 0.11.11, calling extract_text() on the full page yielded Standard orders Custom orders on one line and Return within 7 days. Manual review only. on the next. Split there and one passage names two categories without a policy, while the other gives two policies without a category. A vocabulary check would still pass.
Can the file tell you its reading order?
Some PDFs can: W3C's reading-order example uses tags to represent a logical sequence. Check both the tags and whether your parser follows them. In ordinary positioned text, a wide gutter is a visual cue, not an instruction to finish the first column. The pypdf extraction guide explains the distinction.
Test the exception, not just the easy lookup
Read the shared heading once and extract each body column separately. For this particular file, the following rectangles use pdfplumber's left, top, right, bottom convention:
import pdfplumber
with pdfplumber.open("columns.pdf") as doc:
page = doc.pages[0]
for box in [(20, 60, 220, 136), (250, 60, 470, 136)]:
print(page.crop(box).extract_text())
The second crop produced Custom orders followed only by Manual review only. Attach the shared title and a source location to each passage. Ask both “How long do standard customers have?” and “Can custom orders use that same window?” Only the second question tests whether the first answer has leaked across the gutter.
The coordinates are a fixture, not a general column detector. Full-width headings, sidebars and right-to-left pages need their own reading order. For rows rather than columns, check the header on each table page. Once the passages are faithful, follow the PDF citation chain; if chunking separates a clause from its condition, look at parent and child context.


