Multimodal Image Understanding: Captions, Alt Text and Visual Q&A
30-second answer
A multimodal chat model such as gpt-4.1-mini reads images sent with your prompt, and the prompt decides the result: a concise or detailed caption, an answer to a visual question grounded in what's visible, or alt text that follows accessibility rules. One request can carry up to 10 images, and the detail setting (low, high, auto) trades cost and speed against small text.
Simulate it » No Azure account neededExam objective: 3.2.1 Build a solution that analyzes visual context by using multimodal models. 3.2.2 Configure apps to produce concise or detailed captions for single or multiple images. 3.2.3 Implement question answering grounded in visual evidence. 3.2.4 Configure generation of alt text and extended image descriptions aligned to accessibility guidelines. (Skills measured as of April 16, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Pick a deployment whose model accepts <strong>image input</strong>. <strong>gpt-4.1-mini</strong> does. A text-only model returns an error when you attach a picture.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Pick a deployment whose model accepts image input. gpt-4.1-mini does. A text-only model returns an error when you attach a picture.
- In the Chat playground attach one or more images. The instructions decide the caption style: a concise caption here, a detailed one when you ask for layout, colours and text.
- For visual question answering, tell the model to answer from visible evidence only. Then it says "I can't tell" instead of guessing.
- For alt text, put the accessibility rules in the instructions: purpose first, short, readable text included. A separate prompt can write a longer extended description.
- In code, the image goes in an image_url content part, as a URL or a base64 data URL. detail trades cost and speed against small print.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Ask a model about a picture
A multimodal chat model such as gpt-4.1-mini reads images you send with the prompt. The prompt decides the result: a concise caption, a detailed one, alt text for accessibility, or an answer to a question that points to what is visible. Up to 10 images can go in one request, and detail (low, high, auto) trades cost for small text.
🤔 What happens if…
Read this tour as text
- Generate and edit an image. A gpt-image deployment turns a prompt into pixels. Choose a size (1024x1024, 1024x1536 or 1536x1024), a quality (low, medium, high) and a format (PNG or JPEG). To change only part of a picture, send the image plus a mask: a PNG of the same size where the transparent area is what the model may repaint.
- Generate and remix a video. Sora 2 makes video as an asynchronous job: create, poll until it's done, then download. Pick 720x1280 or 1280x720 and 4, 8 or 12 seconds. An input reference image must match the video size, and faces in it are rejected. Remix changes a finished video with a short prompt, ideally one change at a time.
- Ask a model about a picture. A multimodal chat model such as gpt-4.1-mini reads images you send with the prompt. The prompt decides the result: a concise caption, a detailed one, alt text for accessibility, or an answer to a question that points to what is visible. Up to 10 images can go in one request, and detail (low, high, auto) trades cost for small text.
- Content Understanding turns media into fields. Azure Content Understanding in Foundry Tools runs an analyzer on an image or video and returns the same structured record every time. Start from prebuilt-imageSearch or prebuilt-videoSearch, or create a custom analyzer with fields that classify or generate. For video, segmentation splits the file into scenes with their own fields, key frames and transcript.
- Keep visual content safe. Images and video need gates too. A guardrail with image controls classifies hate, sexual, violence and self-harm content, and a custom analyzer can enforce your own visual policy (a competitor's logo, a missing watermark). Text inside a picture can be an indirect prompt injection: read it as data, scan it with Prompt Shields, and never let it grant a tool or an approval.
A claims team and a web team both have piles of photos. Use one multimodal model for short captions, detailed captions, a grounded question, accessible alt text and object locations.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
A claims team reads 2,000 car photos a day, and the website images have no alt text.
😊 THE SOLUTION
Send the photos to a multimodal model with a prompt per job: caption, grounded question or alt text.
- Gallery needs short captions✓ A concise caption prompt
- Which door is damaged?✓ A question grounded in visible evidence
- Screen readers hear nothing✓ Alt text with purpose, short and readable text
Start with a question
You send a friend a photo of a dented car door and ask, 'Which door is it?' Why does your friend answer so quickly?
They look at the photo, find the dent and tell you. If you ask, “How old is the car?” they’ll say, “I can’t tell from this picture.”
That’s the behaviour you want from a multimodal model. It reads the image and your question together, answers from what it sees, and says so when the photo doesn’t show the answer.
Explain it like I’m 10
The technical explanation
Pick a deployment whose model takes image input, such as gpt-4.1-mini. A text-only deployment returns an error when you attach a picture.
Send an image
response = client.chat.completions.create(
model="gpt-4.1-mini", # deployment name
messages=[
{"role": "system", "content": "Answer only from what is visible. If the image does not show it, say you can't tell."},
{"role": "user", "content": [
{"type": "text", "text": "Which door is damaged?"},
{"type": "image_url", "image_url": {"url": data_url, "detail": "high"}},
]},
],
)
print(response.choices[0].message.content)
url can be a web address or a base64 data URL. Add more image_url parts to send several images (up to 10 in one request).
| Detail | What the model sees | Use it for |
|---|---|---|
low | A reduced version | Fast, cheap captions and big objects |
high | More of the full image | Small text, tiny objects |
auto | The service decides | A sensible default |
Four jobs, four prompts
| Job | What the prompt asks for |
|---|---|
| Concise caption | “One sentence, under 20 words, no opinions.” Good for galleries and notifications. |
| Detailed caption | “Describe layout, colours, objects, readable text and anything unusual.” Good for reports and search. |
| Grounded Q&A | “Answer only from what is visible. If it isn’t shown, say you can’t tell.” |
| Alt text | Purpose first, short, read out meaningful text, no “image of”, empty for decoration. |
With several images in one request, the model can also compare them: “Which of these photos shows damage?”
Alt text and extended descriptions
Alt text is for people who can’t see the image. Keep it to the point, around a sentence. A chart or a floor plan often needs more. Put the short version in alt and offer an extended description in the page text or a linked page. The guidance comes from accessibility standards such as WCAG, and your prompt is where you apply it.
Locating things
You can ask the model to return JSON with a label and a box for each object, as fractions of the image width and height. Treat the boxes as approximate. Draw them for a person to confirm, or use Content Understanding when you need repeatable fields.
Architect level What if the photo contains text that gives orders?
The model reads that text like any other part of the picture, and it might obey it. That’s an indirect prompt injection, and it gets its own lesson in this module. For now remember one rule: text inside an image is data, not a command.
Real-world business scenario
Fabrikam Insurance
- The problem
- Adjusters opened 2,000 car photos a day, and the claims site had no alt text for the images it showed.
- What they used
- A gpt-4.1-mini deployment in Foundry. One prompt writes a concise caption for the claim list, another answers grounded questions such as which door is damaged, and a third writes alt text.
- Why that choice
- The model reads photos in the same request as the question, grounding instructions stop guesses about hidden details, and accessibility rules live in the prompt.
- The result
- Adjusters triaged photos from the caption list, and the claims site passed its accessibility review.
When to use it and when not to
✓ Use it when…
- People need flexible descriptions, summaries or answers about photos.
- You want captions or alt text without training a custom model.
- A question comes with the image and the answer changes each time.
✕ Think twice when…
- A database needs the same typed fields for every photo.
- You need exact coordinates or measurements.
- The image text might carry hidden instructions and the model has powerful tools.
↔ Alternatives to consider
- Content Understanding analyzers for repeatable fields.
- A custom vision model when you must detect one narrow class very accurately.
Test yourself with exercises
5 original practice questions in the AI-103 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What changes between a short caption and a detailed one?
Model answer
Only the prompt. The same model and the same photo give one sentence or a full description depending on what I ask for, so I put the length and the style in the instructions.
Intermediate How do you stop a model from guessing about a photo?
Model answer
I tell it to answer only from what's visible and to say it can't tell otherwise. I also keep the temperature low and test with questions the photo can't answer.
Experienced developer What goes into good alt text instructions?
Model answer
Purpose first, short, meaningful text in the picture read out, no "image of", and empty alt for decorative images. For charts and diagrams I produce a separate extended description.
Scenario Small printed text on parcel labels keeps being misread. What do you try?
Model answer
I switch detail from low or auto to high so the model sees more of the image. If it still fails, I'd crop to the label first or use Content Understanding with a field for the label text.
Quick revision
Key points
- Use a deployment whose model accepts image input, such as gpt-4.1-mini.
- Images go in an image_url content part as a URL or base64 data URL.
- Up to 10 images per request. Detail is low, high or auto.
- Prompts set concise vs detailed captions, grounded Q&A and alt text rules.
- Boxes or locations from a language model are approximate.
Important terminology
- Multimodal model
- A model that accepts more than one kind of input, such as text and images, in the same request.
- Visual question answering
- Answering a question about an image, ideally using only what the image shows.
- Alt text
- A short text alternative for an image that a screen reader can read aloud.
- Extended description
- A longer description of a complex image, shown on the page or linked, when alt text is too short to carry the meaning.
- Detail parameter
- An image input setting (low, high or auto) that controls the resolution the model uses, and so the cost and the ability to read small text.
Common mistakes
- Sending an image to a text-only deployment.
- Letting the model answer from imagination instead of visible evidence.
- Writing alt text that starts with "image of" or describes decoration.
Exam tips
- "Short description for a thumbnail" = concise caption prompt.
- "Answer only from the image" = grounding instruction in the system message.
- "Screen reader users" = alt text; long complex image = extended description.
Five quick revision questions
-
1.How many images can one request contain?Show
Up to 10.
-
2.Which setting helps read small text?Show
detail set to high.
-
3.What controls concise or detailed output?Show
The prompt.
-
4.What should alt text describe?Show
The purpose of the image, briefly.
-
5.How do you reduce guessing?Show
Tell the model to answer only from what's visible and to say when it can't tell.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Content Understanding for Images and Video
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.