Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Interview preparation

AI-901 and Azure fundamentals interview questions

121 questions from 30 topics, each with a model answer. Many include the follow-up an interviewer is likely to ask next. Use the mock interview to practise thinking on your feet.

Mock interview

Nimbus plays the interviewer. Answer out loud, then compare with the model answer.

What is AI? Machine Learning, Generative AI and Agents

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What's the difference between AI and machine learning?

Model answer

AI is the goal: software that behaves intelligently. Machine learning is the most common way to get there. Instead of writing every rule by hand, you show the model lots of examples and it learns the pattern. So all machine learning is AI, but a simple rules engine can be called AI without any learning at all.

Interviewer follows up

Where does deep learning fit?

You

Deep learning is a kind of machine learning that uses neural networks with many layers. It's what made speech recognition, image recognition and large language models work as well as they do today.

Intermediate How is generative AI different from the AI that came before it?

Model answer

Older AI mostly predicted or classified: is this email spam, what's the price of this house, which object is in this photo. Generative AI produces new content: it writes the email, drafts the code or creates the image. Under the hood it's still a deep learning model, but one trained on huge amounts of data to predict the next piece of content.

Experienced developer When would you call something an agent rather than a chatbot?

Model answer

A chatbot answers what you type. An agent is given a goal, instructions and tools such as file search, a code interpreter or an API, and it decides which tool to call, looks at the result and keeps going until the task is done. In Microsoft Foundry I'd build it in Foundry Agent Service: model plus instructions plus tools.

Scenario A retailer wants to read thousands of handwritten delivery notes and pull out the order number and date. Which AI workload is that?

Model answer

Information extraction. The input is a document image and the output is structured fields. In Foundry I'd look at Azure Content Understanding in Foundry Tools rather than a plain chat model.

The Six Principles of Responsible AI

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner Name Microsoft's six responsible AI principles.

Model answer

Fairness, reliability and safety, privacy and security, inclusiveness, transparency and accountability. I remember them as two groups: four about how the system behaves toward people, and transparency plus accountability about being open and having a human answerable.

Interviewer follows up

Are these laws?

You

No, they're Microsoft's principles, backed internally by its Responsible AI Standard. Laws like the EU AI Act are separate, though the ideas overlap a lot.

Intermediate How do the principles show up inside Microsoft Foundry?

Model answer

Guardrails and content filters block harmful prompts and outputs, Prompt Shields catch jailbreak attempts, evaluations measure quality and safety before you ship, tracing shows what an agent did step by step, and transparency notes and model cards explain what a model is good and bad at. Human review is something I design into the app myself.

Scenario A bank's loan model approves fewer applications from one postcode with the same income and credit history. Which principle is at risk?

Model answer

Fairness. Similar applicants are getting different outcomes because of something that stands in for a group. I'd measure outcomes across groups, look at the training data and features, and put a human review step on declines.

Experienced developer Who's accountable when an AI system gets something wrong?

Model answer

The organisation that built and deployed it, and named people inside it. You can't hand responsibility to the model. That's why you need an owner for each AI system, a review process before launch, logs you can audit and a way for affected people to appeal.

Fairness and Inclusiveness

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What's the difference between fairness and inclusiveness?

Model answer

Fairness is about outcomes: two similar people should get the same result. Inclusiveness is about who can use the system at all: a voice app that only understands American accents, or a form a screen reader can't read, leaves people out even if its decisions are fair.

Intermediate How does bias get into an AI model if nobody programs it in?

Model answer

Mostly through data. If past hiring data mostly shows men being hired, a model learns that pattern. It can also come from proxy features like postcode or college name, from labels people wrote with their own bias, or from testing on a group that doesn't match the real users.

Interviewer follows up

Doesn't removing the gender column fix it?

You

Not on its own. Other fields can still carry the same signal, like first name or hobbies. You have to measure outcomes by group to know whether the model is fair.

Scenario A speech-to-text app works well in testing but customers in Tamil Nadu say it misses half their words. What went wrong and what would you do?

Model answer

It wasn't tested with representative speakers, so it fails an inclusiveness check. I'd collect test audio from the real user base, measure word error rate by accent, and consider a custom speech model trained on those accents. Until then, I'd offer a typing option.

Experienced developer How would you check fairness for a generative AI app, where there's no single yes or no output?

Model answer

I'd build test prompts that are identical except for a name, gender or region, run them through evaluations in Foundry and compare tone, quality and refusals across the variants. I'd add risk and safety evaluators for hateful or unfair content and have a diverse group review samples.

Reliability, Safety, Privacy and Security

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What does reliability and safety mean for an AI system?

Model answer

It should give consistent, correct results in the situations it was built for, handle odd input without breaking, and when it can't help, fail safely: say it doesn't know, refuse, or hand over to a person rather than guess.

Intermediate What's the difference between a jailbreak and an indirect prompt injection?

Model answer

A jailbreak comes from the user typing something like "ignore your rules and…". Indirect prompt injection is hidden inside content the model reads, say an email or web page with instructions buried in it. Prompt Shields in Foundry are built to catch both.

Interviewer follows up

Why is indirect injection a bigger worry for agents?

You

Because agents read documents, search the web and call tools on their own. If they follow instructions hidden in that content, they could leak data or take actions the user never asked for.

Scenario A customer asks whether their chat messages with your Foundry-based assistant will be used to train the model. What do you say?

Model answer

No. Prompts and completions sent to models in Foundry aren't used to train the foundation models. I'd also explain what we store ourselves, for how long and with what masking, because that part is our responsibility.

Experienced developer How would you secure a Foundry project in production?

Model answer

Microsoft Entra ID with least-privilege roles such as Foundry User instead of shared keys, managed identities for apps, private endpoints so traffic stays off the public internet, customer-managed keys if policy needs them, guardrails and Prompt Shields on every deployment, PII masked in logs, and evaluations plus monitoring after launch.

Transparency and Accountability

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner Give a simple example of transparency in an AI app.

Model answer

A chatbot that says "You're chatting with an AI assistant" at the start, shows the documents it used for an answer, and tells you it can make mistakes. You know it's AI, you can check its sources, and you know its limits.

Intermediate What's a transparency note and who is it for?

Model answer

It's a document Microsoft publishes for its AI services, like the Azure OpenAI models, explaining the intended uses, how the system works, its limitations and good practice. It's for the people building with the service, so they can make good design choices and explain the system to their own users.

Scenario An insurance company lets an AI decide which claims to reject automatically. Customers complain nobody can explain the rejections. Which principles are failing?

Model answer

Transparency, because customers can't see why they were rejected, and accountability, because no person is reviewing or owning those decisions. I'd show the main reasons for each decision, put a claims officer in the loop for every rejection, and add an appeal route.

Interviewer follows up

Wouldn't human review slow everything down?

You

For approvals you can often let the AI move fast. For rejections that affect people's money, a short review is the price of being accountable, and it catches errors before they become complaints.

Experienced developer How does tracing in Foundry help with accountability for agents?

Model answer

Tracing records every model call, tool call, input and output an agent made. When something goes wrong, you can see exactly which step caused it, who owns that part, and fix it. Combined with agent versions, you know which configuration was running at the time.

How Generative AI Models Work

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner In simple words, how does a chatbot like ChatGPT or Copilot write an answer?

Model answer

It predicts the next word, or more exactly the next token, based on everything before it. Then it adds that token and predicts the next one, over and over. It learned which tokens tend to follow which by training on a huge amount of text.

Interviewer follows up

So does it understand what it's saying?

You

It captures meaning in a statistical way through embeddings and attention, which is why it's so useful. But it doesn't check facts unless you give it facts, which is why it can hallucinate.

Intermediate What is an embedding and why does it matter?

Model answer

An embedding is a vector of numbers that represents meaning. Texts about similar things end up with similar vectors, so "refund policy" and "how do I get my money back" land close together. That's what powers semantic search and RAG: you find the closest document chunks and hand them to the model.

Intermediate What does temperature do?

Model answer

It changes how the model picks among likely next tokens. At low temperature it nearly always takes the most likely one, so answers are focused and repeatable, good for facts and code. At higher temperature it takes more chances, good for brainstorming or creative writing. I'd change temperature or top_p, not both.

Scenario Your HR chatbot confidently tells staff they get 30 days of leave. The real policy says 24. How do you fix it?

Model answer

That's a hallucination. I'd ground the bot in the actual HR policy, using retrieval so the relevant section goes into the prompt, tell it in the system message to answer only from the provided documents and say when it doesn't know, lower the temperature, and show citations so staff can check.

Experienced developer What happens when a conversation goes past the model's context window?

Model answer

The model can't see what doesn't fit. Either the request fails or the app has to drop or summarise older messages, so the model forgets early details. Remember the window covers prompt plus output, so a huge prompt also leaves less room for the answer.

Choosing the Right AI Model

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What's the difference between a large language model and a small language model?

Model answer

An LLM is bigger, has more general knowledge and is better at open-ended or complex tasks, but it costs more per token and responds more slowly. An SLM like Phi is smaller, cheaper and faster. For a narrow job such as classifying support tickets, an SLM is often good enough.

Interviewer follows up

Can a small model run on a laptop or phone?

You

Yes, that's one of the reasons people pick them. Some SLMs are small enough to run on a device without a cloud call, which helps with offline use and privacy.

Intermediate How would you compare two models in Microsoft Foundry before deploying one?

Model answer

I'd open the model catalog, filter by task and deployment type, then read each model card for inputs, outputs, context window and license. Next I'd look at the benchmarks for quality, cost and throughput. Finally I'd deploy both and test them with my own prompts, because benchmarks don't know my data.

Experienced developer When is a reasoning model the wrong choice?

Model answer

When the task is simple or needs a fast reply. Reasoning models spend extra tokens thinking, so they're slower and cost more. A chatbot that answers store opening hours doesn't need that. I'd save reasoning models for maths, planning, code and multi-step analysis.

Scenario A team wants semantic search over 50,000 policy documents. Which model type do they need?

Model answer

An embedding model to turn every document chunk and every user question into vectors, so the search can find chunks with similar meaning. Then, if they want a written answer rather than a list of results, they add a chat model that reads the retrieved chunks. That's retrieval-augmented generation.

Model Deployment Options and Parameters

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What does temperature do?

Model answer

It controls how random the model's word choices are. At a low temperature like 0.2 you get focused, consistent answers, which is what you want for facts or extracting data. At a higher temperature like 1.0 you get more variety, which suits brainstorming or creative writing.

Interviewer follows up

Should I change temperature and top_p together?

You

Microsoft's advice is to change one or the other, not both. They both control randomness, so changing both makes the effect hard to predict.

Intermediate Which deployment type would you start with, and why?

Model answer

Global Standard. It's pay per token, needs no capacity planning, gets new models first and has high default quota. I'd only move off it if I had a data residency rule, which points to Data Zone Standard or Standard, or steady high traffic that justifies Provisioned.

Experienced developer A bank needs prompts processed only within the EU. What are your options?

Model answer

Data Zone Standard or Data Zone Provisioned with an EU resource keeps processing inside the EU data zone. Regional Standard or Regional Provisioned keeps it inside the resource's geography. Global types could process the request in any region, so they don't meet the rule. Data at rest stays in the resource's geography for every type.

Scenario Every night a company needs to summarise 200,000 product reviews. Nobody waits for the result. What would you suggest?

Model answer

A Global Batch or Data Zone Batch deployment. You upload a file of requests, it's processed asynchronously with a 24-hour target, and it costs about half of the standard price. Real-time deployments would be wasted money here.

Common AI Workloads

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner How do you tell text analysis apart from generative AI?

Model answer

Text analysis reads text that already exists and tells you something about it, like "this review is negative" or "these are the product names mentioned". Generative AI writes something new, like a reply to that review. Look at whether the output is a label or fresh content.

Interviewer follows up

Can a generative model do text analysis too?

You

Yes. You can prompt an LLM to return sentiment or key phrases. The exam still expects you to recognise the workload as text analysis, whichever tool you use.

Intermediate What's the difference between computer vision and information extraction?

Model answer

Computer vision is about understanding what's in an image: a caption, objects, tags, the text it contains. Information extraction goes a step further and maps content into the specific fields you want, like InvoiceTotal or VendorName, often with confidence scores. It also works on audio and video, not just images.

Experienced developer When does a chatbot become an agentic AI workload?

Model answer

When it stops only answering and starts acting. If it can look up an order in a database, call a refund API or search files, and decide which of those to do and in what order, it's an agent. The giveaway is tools plus a goal it works towards over several steps.

Scenario A call centre wants to transcribe calls, detect angry customers and store the order number mentioned. Which workloads is that?

Model answer

Three working together. Speech to text for the transcript, text analysis for sentiment on that transcript, and information extraction or entity recognition to pull out the order number. Content Understanding can do the transcript and fields in one analyzer on the audio.

Generative AI and AI Agents

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What's the difference between a chatbot built on generative AI and an AI agent?

Model answer

A generative chatbot answers from what the model knows and what's in the prompt. An agent can also use tools: search your files, run code, call an API to check an order. It decides which tools to use and in what order to reach a goal. So a chatbot talks, an agent talks and does.

Interviewer follows up

Is an agent always more useful?

You

No. If all you need is a draft email or a summary, a single model call is cheaper, faster and easier to test. Agents earn their cost when the task needs fresh data or actions.

Intermediate What are the three building blocks of an agent in Microsoft Foundry?

Model answer

A model deployment to do the reasoning, instructions that set its role, rules and tone, and tools such as file search, code interpreter, web search, function calling, OpenAPI tools, MCP servers or Azure AI Search. Each time I save changes, Foundry creates a new version of the agent.

Experienced developer When would you split one agent into several?

Model answer

When one agent's instructions get long and contradictory, or it has so many tools that it picks the wrong one. I'd give each agent a narrow job, like billing or shipping, and let an orchestrator agent or a workflow route the request. It's easier to test and to give each agent only the permissions it needs.

Scenario A sales manager asks, "Compare last quarter's sales to this quarter and chart it." Would you use plain generative AI or an agent?

Model answer

An agent. The model alone doesn't know the sales figures and can't reliably do the maths in its head. An agent can retrieve the data with a tool, run the numbers and draw the chart with code interpreter, then explain the result.

Text Analysis: Key Phrases, Entities, Sentiment and Summaries

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What's the difference between sentiment analysis and opinion mining?

Model answer

Sentiment analysis tells you the overall feeling: "this review is mixed". Opinion mining tells you what each feeling is about: the food was great, the service was slow. So opinion mining is the more detailed, aspect-level view.

Interviewer follows up

What labels does sentiment analysis return?

You

Positive, negative, neutral or mixed, with confidence scores, for the whole document and for each sentence.

Intermediate How is entity linking different from named entity recognition?

Model answer

NER finds an entity and gives it a category, like "Amazon" is an organisation. Entity linking goes further and decides which Amazon: the company or the river, by matching it to a known reference. NER says what kind, linking says which one.

Experienced developer When would you use Azure Language instead of prompting a language model?

Model answer

When I need fixed, predictable output with confidence scores, such as PII redaction or NER feeding a database, or when per-feature pricing works out cheaper at high volume. I'd prompt an LLM when I need flexibility, like custom categories or several tasks combined in one call. Microsoft has also said some Language features retire in March 2029 in favour of Foundry models, so new designs often use models for sentiment and summaries.

Scenario A bank must remove account numbers and phone numbers from chat transcripts before analysts read them. What would you use?

Model answer

PII detection in Azure Language. It finds those values, categorises them and returns a redacted version of the text, so analysts can work with transcripts without seeing personal data.

Speech Recognition and Speech Synthesis

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What's the difference between speech recognition and speech synthesis?

Model answer

Recognition is listening: audio in, text out. Synthesis is speaking: text in, audio out. A voice assistant uses both. It recognises your question, works out an answer, then synthesises the reply as speech.

Interviewer follows up

What's another name for each?

You

Speech recognition is also called speech to text. Speech synthesis is also called text to speech.

Intermediate What would you use SSML for?

Model answer

To control how a neural voice says something. I can slow down the reading of an account number, add a short pause before a key point, change pitch, spell out characters, or pick a speaking style such as cheerful or empathetic on voices that support styles.

Experienced developer Transcripts keep getting your product names and medical terms wrong. What would you do?

Model answer

First try a phrase list for a quick fix. If accuracy still isn't good enough, use custom speech: upload sample audio with human transcripts or related text so the model learns the vocabulary and accents, then test it against the base model and deploy a custom endpoint.

Scenario A call centre wants transcripts that show what the agent said and what the customer said. Which feature is that?

Model answer

Speaker diarization. It labels each part of the transcript by speaker, so you get "Speaker 1" and "Speaker 2" turns instead of one block of text. Batch transcription of recorded calls supports it, and so does real-time transcription.

Computer Vision and Image Generation

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What's the difference between image classification and object detection?

Model answer

Classification or tagging tells me what's in the picture overall, like "dog, grass, park". Object detection goes further and tells me where each thing is, with a bounding box and a confidence score for every object it finds.

Interviewer follows up

Where does OCR fit?

You

OCR is a separate feature. It finds text in the image and returns the words and their positions, so I can read a receipt or a road sign.

Intermediate When would you use Azure Vision image analysis instead of a multimodal model like GPT-4.1?

Model answer

If I need the same fixed outputs every time, like tags, bounding boxes or OCR lines at high volume and low cost, Azure Vision is a good fit. If I need to ask open questions about a photo, like "is this shelf missing any products?" or "explain this chart", a multimodal model is better because it reasons over the image and replies in natural language.

Experienced developer How do you make generated images safe to publish?

Model answer

Guardrails in Foundry filter harmful prompts and outputs for image models just like they do for text. Generated images carry content credentials so people can see they're AI-made. I'd still keep a human review step for anything public, and write prompts that avoid real people and brand logos we don't own.

Scenario A retailer wants product photos turned into alt text and a list of visible defects. What would you suggest?

Model answer

I'd send each photo to a multimodal model with a system message asking for one line of alt text and a JSON list of defects. If they only need tags and captions at scale, Azure Vision's caption and tag features would be cheaper and more predictable.

Extracting Information from Text, Images, Audio and Video

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What does information extraction mean?

Model answer

It's taking messy content, like a scanned invoice or a recorded phone call, and pulling out the exact facts I need, like the invoice total or the customer's complaint, in a structured form a program can use.

Interviewer follows up

How is that different from summarising?

You

A summary is a shorter version for a person to read. Extraction gives named fields, like InvoiceTotal equals 4,500, that a database or workflow can use straight away.

Intermediate What's an analyzer in Content Understanding?

Model answer

It's the recipe. It says which kind of content goes in, what to extract, the field schema I want back, and which model deployments to use. Microsoft provides prebuilt analyzers like prebuilt-invoice and prebuilt-audioSearch, and I can build a custom one on top of a base analyzer like prebuilt-document.

Experienced developer How would you decide when an extracted value needs human review?

Model answer

Content Understanding returns a confidence score from 0 to 1 for each field, plus grounding back to where it found the value. I'd set a threshold per field, say auto-approve totals above 0.9, and send anything lower to a reviewer who can see the highlighted source.

Scenario A call centre wants a summary, the speakers and the customer's account number from every recorded call. What would you use?

Model answer

Content Understanding with the prebuilt-audioSearch analyzer gives a transcript with speaker labels and a summary. I'd add a custom field for the account number, generated from the transcript, and check its confidence before writing it to the CRM.

What is Microsoft Foundry?

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What is Microsoft Foundry?

Model answer

It's Azure's one place for generative AI. I can browse and deploy models, test them in a playground, build agents, add guardrails, run evaluations and then call it all from my app, at ai.azure.com or through the SDK.

Interviewer follows up

Is it the same as Azure OpenAI?

You

Azure OpenAI models are one family you can deploy in Foundry. Foundry also has Microsoft Phi, Meta Llama, Mistral, DeepSeek and many others, plus agents and the Foundry Tools.

Intermediate What's the difference between a Foundry resource and a project?

Model answer

The resource is the Azure-level container. It holds billing, networking, security settings and the connection to Foundry Tools. Projects live inside it and are where each team actually works, with their own deployments, agents, files and evaluations. One resource can hold several projects.

Experienced developer How would you give a new developer access without making them an owner?

Model answer

I'd assign the Foundry User role on the project. That's enough to use deployments and build agents there, but not to manage the resource or hand out roles. A Foundry Project Manager or Account Owner can do the role assignment, and the developer signs in with Microsoft Entra ID, so there's no shared key to leak.

Scenario Two teams in a bank want separate AI workspaces but one bill and one security setup. How would you set it up?

Model answer

One Foundry resource for the shared billing, networking and policies, and two projects inside it, one per team. Each team gets Foundry User on its own project only.

Writing System and User Prompts

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What's the difference between a system prompt and a user prompt?

Model answer

The system prompt is the standing instruction from the developer, like "You're a polite travel assistant for Contoso Air, answer in under 80 words". The user prompt is what the customer types, like "Can I carry a power bank?". The system prompt shapes every answer; the user prompt changes each turn.

Interviewer follows up

Can a user override the system prompt?

You

They can try, for example with "ignore your instructions". A clear system message helps, but I'd also turn on Prompt Shields in Foundry's guardrails to catch jailbreak attempts.

Intermediate When would you use few-shot examples?

Model answer

When the format or style matters and instructions alone don't get it right. If I need every product description as exactly three bullet points, showing two examples gets more consistent output than describing the format in words.

Experienced developer How do you reduce hallucinations through prompting?

Model answer

I ground the model. I put the relevant facts in the prompt inside clear delimiters and tell it to answer only from that content and say "I don't know" otherwise. For bigger knowledge bases I'd use retrieval so the right passages are added automatically. Then I test with questions the data can't answer and check it refuses.

Scenario A bank's chatbot keeps giving long, chatty answers and sometimes talks about cricket. How would you fix it with prompts?

Model answer

In the system message I'd set the role and scope ("You answer questions about Contoso Bank savings accounts only"), a length and format rule ("Reply in at most three sentences"), and a refusal rule for anything off-topic. Then I'd test off-topic questions in the playground and tighten the wording until it declines politely.

Deploy a Model and Chat in the Foundry Portal

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner Why do you have to deploy a model before you can use it?

Model answer

The catalog is just a list. Deploying creates an endpoint for that model in my Foundry resource with a name, a deployment type and limits, so my project can actually send it requests and I get billed for what I use.

Interviewer follows up

What do you pass as the model name in code?

You

The deployment name, not the catalog name. If I deployed gpt-4.1-mini as "support-bot", my code uses "support-bot".

Intermediate What would you change in the playground to make answers more consistent?

Model answer

I'd lower the temperature, say to 0.2, and tighten the system message. If answers are being cut off I'd raise max output tokens. I'd change temperature or top_p, not both at once, so I know which one made the difference.

Experienced developer Which deployment type would you start with, and when would you change it?

Model answer

Global Standard is the usual start: pay per token, highest default quota and new models first. If data must be processed inside the EU or US, I'd move to Data Zone Standard. For steady, high-volume traffic where latency must be predictable I'd look at provisioned throughput, and for big offline jobs, Global Batch is about half the price.

Scenario A tester says the playground gives good answers, but the developer's app doesn't. What would you check first?

Model answer

That the app uses the same deployment name, the same system message and the same parameters. Using View code from the playground is the quickest way to make them match.

Build a Chat App with the Foundry SDK

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What do you need before your Python app can chat with a Foundry model?

Model answer

A Foundry project with a deployed model, the project endpoint, the azure-ai-projects and azure-identity packages, and a signed-in identity with the Foundry User role. Locally I run az login so DefaultAzureCredential can pick it up.

Interviewer follows up

Why not just use an API key?

You

The AIProjectClient only supports Microsoft Entra ID. That's a good thing: no secret sits in my code or config, and access can be removed by changing a role.

Intermediate What does the model parameter in responses.create refer to?

Model answer

The deployment name I chose in Foundry, not the catalog model name. If I deployed gpt-4.1-mini as "chat-prod", I pass model="chat-prod".

Experienced developer How do you make the chat remember earlier messages?

Model answer

Models are stateless, so history has to be supplied. With the Responses API I either create a conversation once and pass conversation=conversation.id on every call, or pass previous_response_id=response.id from the last turn. Both let the service send the earlier turns for me, instead of me rebuilding the message list.

Scenario The app works on your laptop but fails with an authorisation error on a colleague's machine. What would you check?

Model answer

That they've run az login with an account that has the Foundry User role on the project, and that FOUNDRY_PROJECT_ENDPOINT is set to the right project. DefaultAzureCredential finds their identity, but the role assignment is what grants access.

Create and Test an Agent in the Foundry Portal

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What's the difference between a chat model and an agent?

Model answer

A chat model takes a prompt and returns text. An agent wraps a model with instructions and tools, so it can decide to search a file, run some Python or call an API before it answers. It also keeps the conversation going across turns.

Interviewer follows up

Does an agent need a deployed model?

You

Yes. When you create the agent you pick a model deployment from your project, for example a gpt-4.1-mini deployment. The agent runs on that model.

Intermediate When would you add file search versus web search to an agent?

Model answer

File search when the answers live in your own documents, like an HR policy PDF, because the agent can quote them. Web search when the agent needs fresh public information, like today's exchange rate. I wouldn't use web search for internal policies, the web doesn't have them.

Experienced developer Why do agent versions matter?

Model answer

Each version is a frozen copy of the model, instructions and tools. That means I can test version 4 while version 3 keeps serving users, and roll back if the new instructions make answers worse. It's the same idea as tagging a release in source control.

Scenario Your agent keeps inventing a return policy. What would you check first?

Model answer

I'd check that the policy document is actually attached through file search, and tighten the instructions to say it must answer only from the attached files and say "I don't know" otherwise. Then I'd retest the same question in the playground and look at whether file search was called.

Build a Client App for an Agent

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner How does a Python app talk to an agent you built in the Foundry portal?

Model answer

It connects to the project endpoint with AIProjectClient and DefaultAzureCredential, then calls get_openai_client with the agent's name. From there it's a normal responses.create call, and the agent answers using its own instructions and tools.

Interviewer follows up

Do you need an API key?

You

No. The project client only supports Microsoft Entra ID. Locally I run az login; in Azure the app uses a managed identity with the Foundry User role.

Intermediate How do you make the agent remember the previous question?

Model answer

I create a conversation once with conversations.create and pass its id to every responses.create call. The service stores the history, so I don't resend earlier messages myself. Passing previous_response_id is another way to chain turns.

Experienced developer Should your app create the agent every time it starts?

Model answer

Usually not in production. The agent is a project resource, so I'd create or update it from a deployment script, and the app just references it by name. Creating a version on every start clutters the version history and makes it harder to know which instructions users actually got.

Scenario The app works on your laptop but fails with an authorization error in Azure. What's wrong?

Model answer

Most likely the app's managed identity hasn't been given a role on the Foundry project. I'd assign it the Foundry User role on the project and make sure FOUNDRY_PROJECT_ENDPOINT is set in the app settings.

Build a Text Analysis App

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner Which Azure service would you use to find the sentiment of customer reviews?

Model answer

Azure Language in Foundry Tools. I'd call analyze_sentiment from the azure-ai-textanalytics package and get back positive, neutral, negative or mixed, with confidence scores for each sentence.

Interviewer follows up

What does the app need to connect?

You

The resource endpoint and a key (or a Microsoft Entra ID credential). I keep both in environment variables, never in the code.

Intermediate How would you remove phone numbers and emails from support tickets before storing them?

Model answer

Call recognize_pii_entities. Each result has the entities it found and a redacted_text property with the personal data masked by asterisks, so I'd store redacted_text instead of the original.

Experienced developer Would you use Azure Language or an LLM prompt for sentiment analysis?

Model answer

Azure Language when I want the same structured output every time, with labels and confidence scores, at high volume. An LLM prompt when I need something the fixed features don't do, like 'list the complaints about delivery only'. Microsoft has also announced that some Language features, including sentiment and key phrases, retire in March 2029 in favour of Foundry models, so new projects should weigh that.

Scenario Your app returns 'neutral' for a review written in Tamil. What do you check?

Model answer

I'd check that I'm passing the right language code, or run detect_language first, and confirm that the feature supports that language. Sending text with the wrong language hint is a common reason for odd results.

Answer Spoken Prompts with a Multimodal Model

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner How can an app answer a question the user speaks out loud?

Model answer

Either send the recording straight to an audio-capable multimodal model, which understands the speech and replies, or transcribe it with speech to text first and send the text to a normal chat model. The first is fewer moving parts; the second gives me a transcript at every step.

Interviewer follows up

Can the model answer with a voice?

You

Yes. Audio-capable models can return audio as well as text, if you ask for both in the request.

Intermediate What does the request look like when you send audio to the model?

Model answer

The user message has a list of content parts. One is a text part with the instruction, and one is an input_audio part with the base64-encoded recording and its format, such as wav. I also set modalities if I want spoken audio back.

Experienced developer When would you still choose the speech-to-text pipeline?

Model answer

When I need features the Speech service gives me, like custom speech for domain words, diarization, a particular neural voice or SSML control, or when I want to log and filter the transcript before it reaches the model. The pipeline costs more latency, but each step is easy to inspect.

Scenario A bank wants a phone assistant that can be interrupted mid-sentence. What do you suggest?

Model answer

A realtime approach, such as a gpt-realtime deployment or the Voice Live API. Sending one recording at a time feels like walkie-talkie; realtime streams audio both ways, so the caller can interrupt naturally.

Build an App with Azure Speech in Foundry Tools

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What are the two main things Azure Speech does?

Model answer

Speech to text, which turns spoken audio into a transcript, and text to speech, which reads text aloud in a natural neural voice. It also does speech translation and a few more advanced features.

Interviewer follows up

Which Python package do you install?

You

azure-cognitiveservices-speech, imported as azure.cognitiveservices.speech, usually aliased to speechsdk.

Intermediate Your recognize_once call only captures the first sentence of a five-minute recording. Why?

Model answer

recognize_once stops at the first pause and handles about 30 seconds at most. For longer audio I'd use continuous recognition with start_continuous_recognition and handle the recognized events, or batch transcription for big files.

Experienced developer When do you use SSML instead of plain text for synthesis?

Model answer

When the defaults don't sound right: slowing down a long account number, adding a pause before a key instruction, changing pitch, using a speaking style like cheerful or customer service, or switching voices mid-paragraph. Plain text is fine for short, simple replies.

Scenario A hospital kiosk must read discharge instructions in English and Hindi. How would you build it?

Model answer

Use the Speech SDK's SpeechSynthesizer with a neural voice for each language, for example an en-IN voice and hi-IN-SwaraNeural, with SSML to slow the rate for medication names. I'd keep the text reviewed by staff, since the voice reads exactly what it's given.

Use Images in Prompts with a Multimodal Model

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner How do you ask a model a question about a photo?

Model answer

Use a deployed multimodal model like gpt-4.1. In the Foundry chat playground I attach the image and type the question. In code I send a user message with a text part and an input_image part holding a URL or base64 image.

Interviewer follows up

Does every model accept images?

You

No. The model card lists the input types. Text-only models and most small models can't take images.

Intermediate When would you send an image as base64 instead of a URL?

Model answer

When the image is on the user's device or in private storage the model can't reach, such as an insurance claim photo. A public https URL is fine for images that are already online. Base64 makes the request bigger, so I resize large photos first.

Experienced developer Would you use a multimodal model or Azure Vision to read meter numbers from thousands of photos?

Model answer

For a fixed job at volume, like reading printed numbers, Azure Vision's OCR or a Content Understanding analyzer gives structured, repeatable output. A multimodal model shines when the question changes, like 'is this meter damaged, and what would you check next?'. I'd often combine them.

Scenario Your model keeps miscounting items on a shelf photo. What do you do?

Model answer

Send a higher-detail or cropped image, ask a narrower question ('count only the red packets on the top shelf'), and tell it to say if it's unsure. If counts must be exact, I'd use a dedicated object detection approach and keep a person checking the results.

Generate Images with Generative Models

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner How do you generate an image with Microsoft Foundry?

Model answer

I deploy an image model like gpt-image-1 in my Foundry project, open the images playground and type a prompt describing the picture. From code I call images.generate on the OpenAI client I get from the project, passing the deployment name, the prompt and a size.

Interviewer follows up

What comes back from the API?

You

A list of images, each as base64 data in b64_json. I decode it and save it as a PNG file.

Intermediate What makes a good image prompt?

Model answer

Be specific about the subject, setting, style, lighting and layout, and say what text should appear if any. "A watercolour poster of a Chennai beach at sunrise, wide shot, soft orange light, the words Marina Run 2026 at the top" works far better than "beach poster". If the first result is close, I tweak one detail at a time.

Experienced developer How do responsible AI controls apply to image generation?

Model answer

Foundry guardrails check the prompt before generation and the image after it, for categories like hate, sexual, violence and self-harm, and the request fails with a content-filter error if something is blocked. Generated images also carry content credentials, so people downstream can see the image was AI-generated. I'd still add human review before anything goes into a public campaign.

Scenario A marketing team wants 20 banner variations for a festival sale but keeps getting images with the wrong layout. What do you suggest?

Model answer

I'd fix the size to the banner shape, like 1536x1024 for landscape, and write a prompt template that spells out layout, colours and text placement, changing only the product and offer per variation. For small fixes on an image they like, I'd use image editing instead of regenerating from scratch.

Build an App with Vision Capabilities

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner How does a Python app send a photo to a model in Foundry?

Model answer

It reads the file, base64-encodes it and builds a data URL. Then it calls responses.create on the OpenAI client from the AIProjectClient, with a user message that has an input_text part for the question and an input_image part for the photo. The answer is in response.output_text.

Interviewer follows up

Can you send an image URL instead?

You

Yes. If the image is reachable over https, I put that URL in image_url instead of a data URL.

Intermediate When would you use Azure Vision image analysis instead of a multimodal model?

Model answer

When I need the same structured output every time, like a caption, a tag list or the printed text from OCR, at high volume. Image analysis gives predictable JSON. A multimodal model is better when the question changes, like "Is this shelf fully stocked?" or "Explain this chart".

Experienced developer How do you keep a vision app secure and cheap?

Model answer

I use DefaultAzureCredential with the Foundry User role instead of keys in code, keep the endpoint in an environment variable, and resize large photos before sending them because big images use more tokens. I also give the model clear instructions and ask for short or JSON answers so the app can parse them.

Scenario A warehouse wants staff to photograph damaged boxes and get a short damage report. How would you build it?

Model answer

A small Python or web app takes the photo, sends it with instructions like "Describe any visible damage in one sentence and rate it minor, moderate or severe" to a multimodal deployment, and saves the reply with the order number. I'd test the prompt in the playground first and use View code to start the app.

Content Understanding for Documents and Forms

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What is Azure Content Understanding used for with documents?

Model answer

It reads documents like invoices, receipts and forms and gives back the fields I care about as JSON, such as vendor name, invoice total and due date, plus a Markdown version of the whole document. I can start with a prebuilt analyzer and no training at all.

Interviewer follows up

Do you need to train a model first?

You

No. Prebuilt analyzers work straight away, and custom fields are defined by describing them in a schema rather than labelling hundreds of samples.

Intermediate What's the difference between extract, classify and generate?

Model answer

Extract copies a value that's printed in the document, like the invoice number. Classify picks one value from a list I give, like Utilities, Travel or Office supplies. Generate writes a new value from the content, like a one-line summary of the contract. Extract only works for documents; classify and generate work for every content type.

Experienced developer How do you decide which extracted values need a human to check them?

Model answer

I use the confidence score on each field. Values above a threshold I've tested, say 0.85, go straight into the system; anything lower goes to a review queue with the grounding so the reviewer sees exactly where on the page the value came from. I tune the threshold on a sample of real documents.

Scenario A finance team gets invoices from 300 suppliers in different layouts and also wants each one tagged with a spend category. What would you set up?

Model answer

Start with prebuilt-invoice for the standard fields since it handles varied layouts. For the category, create a custom analyzer based on prebuilt-invoice or prebuilt-document and add a SpendCategory field with the classify method and a fixed list of categories. Low-confidence values go to a person.

Content Understanding for Images

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner How can Content Understanding help with images?

Model answer

It looks at an image and returns structured information. prebuilt-imageSearch gives me a description I can index for search, and a custom analyzer can return my own fields, like the type of damage in a car photo or whether a shelf is empty.

Interviewer follows up

Can it extract fields from images the same way it does from invoices?

You

Not with the extract method, which is for documents only. For images I use classify or generate fields instead.

Intermediate How would you build a custom analyzer that rates damage in car photos?

Model answer

I'd create an analyzer with baseAnalyzerId prebuilt-image and add fields: DamageType with classify and a list like Scratch, Dent, Broken glass, None; Severity with classify as Minor, Moderate, Severe; and DamageSummary with generate. Then I'd test it on sample photos in the portal and check the confidence scores.

Experienced developer When would you pick Content Understanding over Azure Vision image analysis for images?

Model answer

Azure Vision gives generic outputs like captions, tags, objects and OCR. Content Understanding is better when the business needs its own schema, such as a damage category or a product condition, returned the same way for every image, with confidence scores for routing to a person.

Scenario A retailer wants to search 50,000 product photos by plain-English descriptions like "red kurta with gold border". What would you use?

Model answer

Run prebuilt-imageSearch over the photos to get a description of each one, store the descriptions in a search index such as Azure AI Search, and let shoppers search those descriptions. No custom fields needed.

Content Understanding for Audio and Video

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What can Content Understanding do with a recorded customer call?

Model answer

With prebuilt-audioSearch it gives me a transcript with each speaker labelled and a short summary of the call. With a custom analyzer I can add my own fields, like whether the customer was happy or what product they called about.

Interviewer follows up

Does it need a separate speech-to-text step first?

You

No. Content Understanding transcribes the audio itself as part of content extraction, then fills the fields.

Intermediate What does prebuilt-videoSearch return?

Model answer

It breaks the video into segments with start and end times, picks key frames, transcribes any speech, and writes descriptions of what's happening in each segment. That makes a long video searchable by moment, not just by title.

Experienced developer How would you add call sentiment to a contact-centre pipeline?

Model answer

I'd create a custom analyzer with baseAnalyzerId prebuilt-audio and add a CallSentiment field with classify and the values Positive, Neutral, Negative, plus a generate field for the main complaint. Then I'd run it on every recording, store fields with confidence scores, and flag negative or low-confidence calls for a supervisor.

Scenario An online coaching company has 3,000 hours of recorded lessons and students can't find the part they need. What would you do?

Model answer

Run prebuilt-videoSearch over the library to get segments, key frames, transcripts and descriptions, index them, and let students search by topic and jump straight to the right timestamp.

Build an Information Extraction App

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What are the main steps in a Python app that uses Content Understanding?

Model answer

Install azure-ai-contentunderstanding, create a ContentUnderstandingClient with the endpoint and a credential, call begin_analyze with the analyzer ID and the file, call result() on the poller, then read the fields from result.contents[0].fields.

Interviewer follows up

Why does the method start with begin?

You

Because analysis is a long-running operation. begin_analyze returns a poller straight away, and result() waits until the job finishes.

Intermediate How do you authenticate the ContentUnderstandingClient?

Model answer

Either with an AzureKeyCredential using the resource key, or with DefaultAzureCredential so it uses Microsoft Entra ID. For anything beyond a quick test I prefer Entra ID, so there's no key to leak.

Experienced developer How would you design the review step?

Model answer

I loop over the fields, compare each confidence to a threshold set per field, and if any important field is below it I put the whole document in a review queue with the low fields highlighted. I tune thresholds on a test set and log how often reviewers change values, so I can raise or lower them later.

Scenario Your extraction app works on invoices, and now the business wants it to handle call recordings too. What changes?

Model answer

Very little code. I'd switch the analyzer ID to prebuilt-audioSearch or a custom analyzer based on prebuilt-audio and point the input at the recording. The client, begin_analyze, the poller and the field-reading loop stay the same.

Install MSDEVBUILD Azure

Free · no account · works offline

Save the whole course for offline ›

Hi, I’m your Nimbus

Your study buddy. Pick what we do next.

MSDEVBUILD · Multi-Stack Dev Build

Sign in to MSDEVBUILD

One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.