Figures, captions, and the text that refers to them

A chunk comes back reading “The distribution is shown in Figure 3.” That is the entire retrieved content. The figure is not in the chunk, the caption is three chunks away, and the sentence explaining what the distribution means was on the other side of a boundary.

Figures are the one element in a document that carries meaning your pipeline cannot read at all. What you can index is everything around them, and the default behaviour is to scatter those parts into different chunks.

Four parts, usually separated

An illustrated document has, for each figure, four textual artefacts that belong together and are typically not adjacent in the extracted stream.

The reference. “See Figure 3,” “as shown below,” “the diagram opposite.” Sits in the body prose, often a page away from the figure itself.

The caption. Figure 3: Request latency by region, Q2. Usually the most information-dense sentence in the region and almost always a separate text node.

Alt text or a title attribute, where the source format has one. Often absent, sometimes excellent, and worth using when present because it was written to describe the image in words.

Surrounding discussion. The paragraph that interprets the figure — what it shows, why it matters, what the exception is.

Extraction places these wherever layout put them. In a paginated document the figure and caption may float to the top of the following page while the reference stays behind, so the split falls between them by default.

The split, shown

=== AS EXTRACTED AND SIZE-SPLIT ===
--- chunk 8 ---
...regional capacity was increased in April. The resulting
change in tail latency is shown in Figure 3.
--- chunk 9 ---
[image: fig3-latency.png]

Figure 3: p99 request latency by region, April–June 2026.
--- chunk 10 ---
The improvement is concentrated in the two regions that
received additional capacity. Latency in the remaining
regions is unchanged, which is expected.

Chunk 8 is a sentence pointing at something absent. Chunk 9 is an image placeholder and a caption, with no indication of what document or section it belongs to. Chunk 10 interprets a figure it never names — “the improvement” in what, measured how.

A query about tail latency by region matches chunk 9 weakly, on the caption alone. The interpretation in chunk 10 is unreachable from any query phrased in the caption’s vocabulary.

=== FIGURE UNIT, KEPT TOGETHER ===
--- chunk 8  {figure_id: fig3, content_type: figure,
              section: "Capacity changes"} ---
[Q2 Platform Review → Capacity changes → Figure 3]

Figure 3: p99 request latency by region, April–June 2026.
[image: fig3-latency.png — alt: "line chart, p99 latency
falling in two of five regions after April"]

Referring text: regional capacity was increased in April. The
resulting change in tail latency is shown in Figure 3.

Discussion: The improvement is concentrated in the two
regions that received additional capacity. Latency in the
remaining regions is unchanged, which is expected.

One chunk containing every indexable thing about that figure, labelled so a citation can point at it and a reader knows an image belongs here. It is retrievable for latency, for regions, for capacity, and for the interpretation — none of which the caption alone provides.

The handling

1. Treat the figure block as an atomic unit. Image, caption, and number stay together always. This is the minimum and it is cheap: captions are usually detectable by their prefix pattern (Figure, Fig., Table, Exhibit, Chart, followed by a number).

2. Include the referring sentence and the adjacent discussion. Find the sentence containing the figure’s number and pull it in, along with the paragraph immediately following the figure. In a paginated document these are the parts most likely to have been separated by layout.

3. Give the figure an identifier and use it on both chunks. If the discussion is too long to include, keep it as its own chunk and tag both with figure_id. The connection then exists as data even where it does not exist as adjacency — the same approach as recording a contract’s cross-references rather than resolving them.

4. Use alt text as body text, not as an attribute. Where a document has real alt text it is a human-written description of the image and it is the only textual representation of the image’s content. Put it in the text you embed.

5. Never index an image placeholder alone. A chunk whose entire content is [image: chart.png] or a file path is pure noise. Drop it, or merge it forward. Filename-only chunks are a common contributor to the bottom of the length distribution.

6. Keep the image path or URL as a field so a retrieved chunk can display the figure to a human even though the retriever could not read it. The reader gets the picture; the index gets the words.

7. Consider a generated description for figures that matter. A model that can see the image can write a caption where none exists. Real technique, real cost per figure, and it produces text that is confidently wrong sometimes — so keep it in a clearly labelled field rather than mixing it with the document’s own words.

8. Tables are not figures. A table numbered as an exhibit is still a table and wants table handling — header retention, row serialisation. Route on what the content is, not on how it was numbered.

What still breaks

Figures with no caption. An unlabelled diagram dropped into a document contributes nothing textual at all. There is no chunking strategy for this; the only options are a generated description or accepting that the content is absent from your index.

Figures whose meaning is the whole point. An architecture diagram, a floor plan, a circuit. A caption describes what the figure is, never what it shows. Corpora that are substantially diagrams have a hard ceiling on retrieval quality that ingestion cannot raise.

References far from the figure. A document that discusses Figure 3 in four separate places. You can attach the nearest reference; the others stay separate, and tagging them all with figure_id is the best available answer.

Numbering collisions across documents. Every report has a Figure 1. Without the document identifier on the chunk, “Figure 1” is ambiguous across the corpus and a citation is unresolvable.

Charts whose data is not in the text. The numbers exist only as pixels. If the underlying data is available anywhere else, indexing that instead is worth more than any amount of caption engineering.

How to tell if it worked

Query your index for Figure and read what comes back. You are looking for two specific defects: chunks that are a caption with no context, and chunks that reference a figure number without containing it. Both are direct queries and both should return few results.

Then take ten figures you know are important and check, for each, whether one chunk contains the caption and the interpretation together. If they are consistently in different chunks, step 2 is not firing — usually because the discussion paragraph sits after a page break and the pipeline never joined the pages into one stream.