Lesson 1 of 3 Multimodal Understanding with Models and Content Understanding

Analyzing Images and Answering Visual Questions with Multimodal Models

This lesson explains how to send images to multimodal models, how to control captions and how to keep answers grounded in visual evidence.

Learning outcomes

After completing this lesson, you will be able to:

  • Send images as content parts in a Responses API request.
  • Control the length and focus of captions.
  • Ground visual answers in what the image actually shows.

Sending images

A multimodal model accepts images as part of its input and reasons about them together with the text of the request. It can describe a scene, read text and labels, compare two photos, interpret a chart or answer a specific question such as "Is the safety valve in the open position?". Because the instruction is written in natural language, one model can perform many different visual tasks without training, which makes it the natural first choice for open-ended or varied questions about images.

The same flexibility brings the limits that the rest of this lesson addresses. The output depends on how the question is phrased, the model may describe details that are not actually visible, and each image adds input tokens to the cost of the request. Tasks that need the same fields from thousands of images, or exact coordinates, are better served by Content Understanding or Azure Vision, as the comparison at the end of this lesson shows.

In the Responses API, a user message contains content parts: input_text for the instruction and input_image for each image, given as a URL (which the service must be able to reach) or a base64 data URI. The detail setting controls processing resolution: low is cheaper and suits overall impressions, high is needed for small text and fine detail, and auto lets the service decide.

import base64
img = base64.b64encode(open("meter.jpg", "rb").read()).decode()
r = openai.responses.create(model="vision", input=[{
    "role": "user",
    "content": [
        {"type": "input_text", "text": "Read the meter. Return the reading and the unit. If unreadable, say so."},
        {"type": "input_image", "image_url": f"data:image/jpeg;base64,{img}", "detail": "high"},
    ],
}])

Concise and detailed captions

Caption length and focus are set by instructions and limits. A concise caption ("One sentence of at most 15 words") suits galleries and notifications; a detailed caption ("Describe the objects, setting, actions, visible text and colours") suits search indexing and cataloguing. For multiple images, each image is labelled in the prompt, and the instruction says whether to caption each one, compare them or describe them as a sequence. Structured outputs return one caption per image ID, which is easy to store.

Sort into groups

Concise or detailed caption?

Exam skills 3.2.2

Choose the caption style for each use.

Log in to try this activity Interactive activities are free with an account.

Grounding answers in visual evidence

Multimodal models can state details that an image does not show, especially when the question presupposes them. Grounded visual question answering reduces this by instructing the model to answer only from what is visible, to describe where the evidence is, and to answer "not visible" when it cannot tell, and by returning a structured result with answer, evidence and confidence. Sufficient resolution (detail high, cropping to the relevant area) and specific questions improve reliability, and decisions with consequences are reviewed by people when confidence is low.

Leading questions show why these measures matter. Asked "What is the serial number on the label?", a model may produce a plausible serial number even when the label is blurred or outside the frame, because the question assumes that one is visible. Asked instead "Is a serial number legible on the label? If so, transcribe it exactly; if not, answer not visible", and required to return the region where it found the number, the model has a sanctioned way to decline, and its answer can be checked against the image.

The choice of tool depends on the shape of the task. A multimodal model suits open-ended questions. A Content Understanding analyzer suits repeated extraction of the same fields at scale, with a fixed schema and confidence scores. Azure Vision suits precise positions, and captions needed only for search are best generated once during indexing. The following table compares the main options for analyzing visual content.

NeedBest optionReason
Open-ended questions about an imageMultimodal modelFlexible reasoning in natural language
Same fields from thousands of imagesContent Understanding analyzerFixed schema, confidence, scale
Exact object bounding boxes or OCR coordinatesAzure Vision image analysis or Content UnderstandingPrecise positions
Captions for search indexingIndexing skill or analyzerGenerated once during ingestion
Scenario questions

Answer from the image

Exam skills 3.2.3 · 3.2.1

Practise grounding visual answers in what the image shows.

Log in to try this activity Interactive activities are free with an account.
Worked example

Grounded damage assessment

An insurer lets customers upload photos of car damage and asks a model "Is the rear bumper cracked?" Reviewers found answers that described cracks on bumpers that were outside the frame.

Change the instruction to answer only from visible evidence and to return not_visible when the part is not shown, request high detail, return a structured answer with evidence and confidence, and send low-confidence or not-visible cases to an adjuster. Raising the temperature or using a larger model alone would not stop answers about unseen parts.

Check yourself

When should an image be sent with detail set to high?

Show answer

When the model must read small text or see fine detail. Higher detail uses more tokens.

Exam Tips

Remember for the exam

  • input_image parts with detail high for small text and fine detail.
  • Instruct the model to cite visual evidence and to answer not visible when appropriate.
  • Label images in multi-image prompts; use structured output per image.