Implement AI solutions by using Microsoft Foundry
This is the larger of the two AI-901 domains at approximately 57% of the scored content (the published range is 55–60%; the other domain, planning and managing AI solutions, is 40–45%). It is the hands-on domain: you are expected to know what you click in the Microsoft Foundry portal (formerly Azure AI Foundry), which SDK package and client class to use, which model or service to pick for a modality, and what the object model of a chat call or an agent run looks like. Questions are scenario-based ("You need to… What should you do?") and heavily use confusable-service distractors: Content Understanding vs Document Intelligence, Azure AI Speech vs an audio-capable model, an agent vs a plain chat completion, Azure AI Vision vs a multimodal model. Memorize names, roles, and decision rules — not code syntax.
Diagram: routing a requirement to the right Foundry capability.
Writing effective system and user prompts
A chat request is an ordered array of messages, each with a role and content. The exam tests role semantics and which knob changes which behavior.
| Role | Purpose | Notes |
|---|---|---|
| system | Persona, rules, tone, output format, safety guardrails, grounding data | Sent once at the top of the conversation; highest-priority instructions |
| developer | Replaces system on reasoning models (o-series, reasoning-tier GPT-5) | Same job as system; also use max_completion_tokens, reasoning_effort |
| user | The end user's request / question / image / audio | Can contain multi-part content arrays (text + image_url + input_audio) |
| assistant | Prior model replies; also used to seed few-shot examples | Required to give the model conversation history — models are stateless |
| tool / function | Output returned to the model after a tool call | Must reference the tool call ID |
Effective prompt techniques the exam names explicitly:
- Persona + instruction + context + output format in the system message ("You are a support triage assistant. Answer only from the provided knowledge. Reply as JSON with fields category and urgency.").
- Few-shot / examples: alternate user/assistant pairs to demonstrate the desired pattern. Best fix for format or style inconsistency.
- Chain of thought / "break the problem into steps": best fix for reasoning errors on non-reasoning models.
- Grounding (RAG): inject retrieved documents into the prompt and instruct "if the answer is not in the context, say you don't know." Best fix for hallucination and stale knowledge.
- Structured outputs:
response_formatwith a JSON schema (strict) guarantees parseable output; JSON mode ({"type":"json_object"}) only guarantees valid JSON, not a shape. - Safety system message plus Prompt Shields for jailbreak/indirect prompt-injection defence — a system message alone is not a security control.
| Parameter | Range / default | Effect |
|---|---|---|
| temperature | 0–2, default 1 | Randomness; set 0 for deterministic/repeatable extraction |
| top_p | 0–1, default 1 | Nucleus sampling; change temperature or top_p, not both |
| max_tokens / max_completion_tokens | model-dependent | Caps the response length only, not the prompt |
| stop | up to 4 sequences | Truncates generation at a marker |
| frequency_penalty / presence_penalty | −2.0 to 2.0, default 0 | Reduce repetition / encourage new topics |
| Past messages included (playground) | default 10 | How many prior turns are resent as context |
Common traps
- Choosing "increase max_tokens" to make answers more accurate — it only allows longer output.
- Choosing "raise temperature" for factual consistency (it does the opposite).
- Putting the persona in the user message when the question says "applies to every turn" → that is the system message.
- Forgetting that the model has no memory: the client must resend history, so "the bot forgot the previous question" = history not included.
- Using
systemwith a reasoning model where the answer isdeveloper. - Believing few-shot examples add knowledge — they shape format, not facts.
Worked scenario. A summarizer returns prose sometimes and bullets other times, and occasionally invents product names. Correct combination: add few-shot examples or a JSON schema for format, ground the prompt with the product catalog, and set temperature 0. Increasing top_p or max_tokens is wrong.
Unlock with a paid plan
17 more sections (about 4,635 words) continue below. Every paid plan unlocks all AI-901 study guides, the full question bank and mock exams, from $4.97/month.