Multimodal Models·Question 7 of 67Basic

What does "grounding" mean for a VLM, and how does a model actually output a bounding box?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Grounding is tying a piece of language to a specific region of the image. Mechanically there is no detection head: the model emits coordinates as ordinary text tokens, autoregressively, the same way it emits any other answer.

Full worked answer with diagram

Grounding is tying a piece of language to a specific region of the image. Mechanically there is no detection head: the model emits coordinates as ordinary text tokens, autoregressively, the same way it emits any other answer.

A few conventions are in play. Most models normalise coordinates into a fixed range and emit them as ordinary number text: the original Qwen-VL uses integers 0 to 1000, Shikra uses decimals in 0 to 1. Some instead reserve dedicated location tokens in the vocabulary, one per coordinate bin, as in Kosmos-2 and PaliGemma. Others emit absolute pixel coordinates against the preprocessed image, which is what Qwen2.5-VL does. Conventions can change between versions of the same model family, so read the model card for the exact release you deploy rather than assuming. Either way you get four numbers per box, typically top-left and bottom-right.

The consequences follow directly from "it is just text":

  • Boxes are sampled, so identical calls can return jittery coordinates. On a self-hosted VLM such as the Qwen-VL family, run grounding at temperature 0. Many hosted frontier APIs no longer accept a custom temperature, so stabilise boxes there by sampling several times and taking a median or an IoU-based vote, or by using a deterministic detector or OCR word boxes for the final coordinates.
  • Precision is bounded by the coordinate grid and the encoder's patch size. You will not get pixel-perfect edges out of a 14 px patch encoder, and you should not promise them.
  • If the model emits absolute pixels, they refer to the image after the preprocessor resized and padded it. Mapping them back to the original requires the exact transform. This is the single most common bug, followed by mixing up (x1, y1, x2, y2) with (y1, x1, y2, x2). Always sanity-check against an image where you know the answer.

Why anyone cares: document AI needs boxes for auditability and redlining, GUI agents need click targets, and citation highlighting in RAG needs a region to draw.

Honest limits: a VLM grounds more coarsely than a dedicated detector does on the classes that detector was trained for, but it is open-vocabulary and instruction-driven, so you can ask for "the signature line under the second table". The pragmatic production pattern is to let the VLM locate roughly, then snap the box to OCR word boxes or to a detector's region proposals.

Worth sketching. The round-trip through the preprocessor is where nearly every grounding bug lives, and the sketch makes the missing inverse transform obvious.

flowchart LR
    A["Original image, W x H"] --> B["Preprocessor:<br/>resize, pad, maybe tile"]
    B --> C["Model sees the<br/>preprocessed image"]
    C --> D["Emits four numbers<br/>as plain text tokens"]
    D --> E["Invert the exact<br/>resize and pad transform"]
    E --> F["Box in original pixel space"]

What a good answer covers

  • Grounding is tying a piece of language to a specific region of the image
  • Mechanically there is no detection head
  • Most models normalise coordinates into a fixed range and emit them as ordinary number text
  • Others emit absolute pixel coordinates against the preprocessed image, which is what Qwen2.5-VL does
  • Conventions can change between versions of the same model family, so read the model card for the exact…

Interviewer follow-ups to expect

  1. How would you evaluate grounding quality, and why is IoU a poor fit for a document-redaction use case?

  2. If a model gives you a box that is close but consistently shifted down and right, what would you check first?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep