【Editorial Discussion】

A document assistant can extract the correct sentence yet highlight an unrelated region when a reviewer opens the source. OCR may have run on a rotated, cropped, or resized page image, while the viewer expects coordinates in the original page frame. Applying the returned box directly gives a precise-looking but geometrically incorrect citation.

The failure is not necessarily hallucinated text or unsupported evidence. The words and source page may both be correct; the transform connecting the extraction image to the displayed document is wrong. Testing only text accuracy or page-level citation correctness will miss that distinction.

**Build a geometric fixture, not another language benchmark**

Create a synthetic page with uniquely labeled landmarks near several corners and in the interior. Place a target sentence in a known region. Render controlled variants with cropping, resizing, and supported rotations, then run the extraction pipeline. Independently verify where the landmarks and target belong in the viewer's page frame.

Start by supplying known boxes without OCR so recognition mistakes cannot explain a displaced highlight. Once the transform is validated, reintroduce OCR and test the whole path. This separates a wrong extracted box from a correct box interpreted in the wrong frame.

**Trace the frame at every boundary**

- Record whether coordinates are pixels, page units, or normalized values; which corner is the origin; and which direction each axis increases. A number between zero and one is not self-describing. Include the page dimensions and crop region used by the operation that generated the coordinates.

- Compose cropping, rotation, and scaling in the actual processing order. These operations generally do not commute. Transform every corner of a box, not just its origin, and use polygons where the display geometry requires them. A width and height that were valid before rotation may no longer describe the intended region afterward.

- Test pages with nondefault crop boxes and different rendering resolutions. A transform that works only when the visible page and the underlying page bounds coincide is not enough. Define the viewer's expected page frame explicitly rather than assuming every PDF library uses the same one.

Round-trip tests are useful but insufficient if forward and inverse transforms share the same mistaken convention. Use independently placed landmarks and inspect the resulting overlays. Include multiple pages so an otherwise correct transform cannot hide a page-index error.

There are limits. Deskewing or dewarping can require a spatial mapping more complex than one affine transform, and text may span several disjoint regions. An axis-aligned rectangle may inevitably include unrelated material. Geometric correctness also does not prove that the highlighted text supports the answer's claim.

What minimal document fixture do you keep to validate evidence overlays across rendering and OCR stages? How do you distinguish recognition error, page selection error, and coordinate-frame error before asking the language model to try again?