Put the image immediately before the text that asks about it; co-locating image and question removes reference ambiguity in multi-image prompts and aligns with the recency the model uses for both vision and text tokens.
Imagine showing a friend a photo and asking 'what do you see?' If you show the photo, then ask, the connection is obvious. If you ask first and pull out the photo later, your friend has to remember the question while looking at the picture. Now imagine showing three different photos and asking three different questions in a jumbled order, your friend will get confused about which question goes with which photo. The trick is to pair each photo with its question right next to each other. Models work the same way.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Image placement is one of those small context-engineering decisions that has measurable quality consequences and that engineers often get wrong by defaulting to the visually clean pattern of stacking images at the top and questions at the bottom. The right rule is the opposite: each image goes immediately before the text that asks about it, and the pair stays adjacent. The rule is universal across 2026 multimodal providers and has two distinct rationales, positional attention bias and reference resolution, that compound when prompts have multiple images. This deep dive walks through the two rationales, the failure mode of clustered layouts, the cross-provider tokenization notes, and the extension to video and audio.
Positional attention bias for vision tokens
The lost-in-the-middle finding (Liu et al. 2023) showed that text content positioned in the middle of a long context is recalled less reliably than the same content at the ends. The U-shaped recall curve has been re-validated repeatedly in subsequent work, and 2024-2025 multimodal studies have confirmed that the effect extends to vision tokens.
An image placed at the start of a long mixed-modal prompt with the question at the end forces the model to attend back across a wall of text to ground its answer. Frontier models in 2026 are better at this than 2023 vision-language models, but the bias has not vanished. The dip is shallower; the principle is the same.
The practical consequence is that the recency of the image at the moment the question is read affects answer quality. Placing the image immediately before the question puts the vision tokens at maximum salience for the attention pattern that will produce the answer. Placing the image far away forces the model to do more work to maintain that grounding.
This is the first-order reason for the placement rule. It applies even to single-image prompts, although the effect is small when prompts are short and the question is unambiguous about which image it refers to.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- Anthropic's Claude SDK pattern interleaves image and text content blocks for multi-image prompts in production
- OpenAI's GPT-5.5 documentation recommends image then question pairing for multi-image visual QA
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you arrange a prompt that has 20 images and one summarizing question across all of them?
Co-locate each image with a brief per-image question or label that grounds it: 'image_1: what is shown? image_2: what is shown?' and so on. Then place the cross-image summarizing question after all the pairs. This forces the model to ground each image individually before reasoning across them. A pure stack of 20 images followed by 'summarize' typically conflates content from images that look similar.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Putting all images at the top of the prompt and then asking multiple questions about them in a later block, leaving the model to guess which question maps to which image.
60 second bullets to scan on the way to the call.
State the rule: image immediately before the question that references it
Explain the recency rationale (positional attention bias applies to vision tokens too)
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.