Domain 2 of 2 · Chapter 1 of 4

Implement generative AI apps and agents by using Foundry

Unlock the complete study guide + 1,040 practice questions across 16 full exams.

Bundled into the existing Microsoft Azure AI Fundamentals premium course — no separate purchase.

14-day money-back guarantee — no questions asked.

Included in this chapter:

  • From a deployed model to a working application
  • What belongs in the system prompt
  • Sharpening a prompt: specifics, examples, and an out
  • Deploy a model and test it in the Foundry portal
  • A lightweight chat client with the Foundry SDK
  • What a prompt agent is made of
  • Testing an agent in the agents playground
  • Controlling whether a tool gets called
  • Calling an agent from application code
  • How AI-901 phrases questions about this objective

Where the configuration lives for the same request

Comparison pointFoundry playgroundModel client (Foundry SDK)Agent client (Foundry SDK)
Instructions and tools are setIn the portal, for the session you are testingIn each request your code sendsIn the stored agent definition
The request identifiesThe deployment whose playground is openThe deployment nameThe agent name, through an agent reference
Code you writeNonePython client codePython client code
Conversation history comes fromThe playground conversationA conversation you create, or a transcript your code resendsA conversation you create, or the previous response
Changing the behavior meansEditing the form and retestingEditing and redeploying your applicationCreating a new version of the agent definition
Reach for it whenIterating on prompts and first checksOne application needs a generation callSeveral applications share one configured behavior

Decision tree

Still iterating on prompt wording?YesFoundry playgroundtest in the portalNoMust it call tools or take actions?YesNoMust one change reach several apps?NoModel client(Foundry SDK)names the deploymentYesAgent client(Foundry SDK)names the agentAlways: enduring rules in the system promptnever send a catalog model ID

Cheat sheet

  • System prompts set high-priority model behavior
  • User prompts supply the current task and content
  • Specific instructions constrain model output
  • Few-shot examples demonstrate the desired output pattern
  • Fallback instructions limit unsupported answers
  • A model must be deployed before ordinary playground inference
  • The playground Code tab exposes client access details
  • The Foundry portal unifies model discovery, deployment, and testing
  • The model parameter uses the deployment name
  • The Foundry SDK project client opens the model client
  • responses.create sends text input and exposes output_text
  • An agent reasons with a model, instructions, and tools
  • Prompt agents are managed as named, versioned definitions
  • The Agents playground tests conversation and tool behavior
  • Agent clients invoke a server-side definition by agent reference
  • Required tool choice forces an available tool call

Unlock with Premium — includes all practice exams and the complete study guide.

Also tested in

References

  1. Microsoft Foundry playgrounds
  2. Safety system messages - Microsoft Foundry
  3. Prompt engineering techniques - Microsoft Foundry
  4. Get started with Microsoft Foundry SDKs and endpoints
  5. How to generate text responses with Microsoft Foundry Models
  6. Tool best practices for Microsoft Foundry Agent Service
  7. What is Microsoft Foundry Agent Service?
  8. Build with agents, conversations, and responses in Foundry Agent Service
  9. Quickstart: Create a prompt agent - Microsoft Foundry
  10. Study guide for Exam AI-901: Microsoft Azure AI Fundamentals