Your profile

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

Lesson 10 of 30
❮Prev Next❯

Generative AI and AI Agents

Module 1: AI Concepts ⏱ 8 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    30-second answer

    Generative AI creates new content (text, code, images, audio) in response to a prompt. An AI agent goes further: it's a model plus instructions plus tools that works towards a goal by planning, calling tools (search, code, APIs), observing the results and repeating until it can answer or finish the task. A copilot is an agent-style assistant built into an app to help a person, and multi-agent systems split a big job across several specialist agents.

    Simulate it » No Azure account needed

    Exam objective: 1.3.1 Identify scenarios for common AI workloads, including generative and agentic AI, text analysis, speech, computer vision, and information extraction. 1.2.1 Describe how generative AI models work. (Skills measured as of April 15, 2026)

    Simulations

    Feel it before you read it. No account needed, nothing leaves this page.

    Azure portal: Create and test an agent Give a model instructions and tools, and it becomes an agent.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    Go to <strong>Build ➜ Agents</strong> and create a new agent.

    👆 Click the glowing item in the portal to continue

    Read the steps as text
    1. Go to Build ➜ Agents and create a new agent.
    2. Name it, pick the model deployment and write clear instructions: role, rules and limits.
    3. Add knowledge (file search over your policy) and tools (code interpreter, a function that checks orders). Saving creates version 2.
    4. Test it in the agent playground with a question that needs two tools.
    5. Open the trace: the agent planned, called each tool, read the results and wrote one answer. That loop is what makes it agentic.

    🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.

    😟 THE PROBLEM

    Your chatbot explains the refund policy but can’t actually process a refund.

    😊 THE SOLUTION

    Give the model tools and it becomes an agent that acts.

    • Can’t see your documents✓ File search tool
    • Gets maths wrong✓ Code interpreter tool
    • Can’t touch your systems✓ Function tools
    🛠️ Solved with: AI agents

    Start with a question

    What's the difference between a friend who gives travel tips and a travel agent?

    Ask a well-travelled friend about a Goa trip and you’ll get great advice: which beach, which month, what to eat. But you still have to book everything yourself.

    A travel agent hears the same question and does things. Checks flight prices, finds a hotel with rooms, books both, and sends you the tickets.

    Generative AI is the friend: it writes great answers. An AI agent is the travel agent: it uses tools to get the job done.

    Explain it like I’m 10

    Visual: an agent in motion

    Same customer question, two answers: a model on its own, then an agent with tools working through the loop.

    ▶ Explainer video See it in motion 7 steps · 1 min 27 sec

    An animation comparing a plain generative AI reply that cannot check an order with an AI agent built from a model, instructions and tools. The agent plans, calls an order lookup tool, sees the delivery is late, checks the policy, rebooks the delivery and answers, then the idea extends to multi-agent systems and copilots.
    Read the video script
    1. Generative AI aloneA customer asks where their order is, and to move the delivery if it's late. A model on its own only knows its training data and the prompt, so it can't check, and it can't change anything.
    2. An agent = model + instructions + toolsAn agent wraps the model with two more things. Instructions set its role and rules, and tools let it fetch data and take actions in real systems.
    3. Plan the next stepNow the loop starts. First it plans. To answer, it needs the order status, so the first step is to look it up.
    4. Act, then observeThen it acts. It calls the order lookup tool, and observes the result. The parcel is two days late.
    5. Loop again until it’s doneIt's late, so the agent loops again. It checks the delivery policy, then calls the reschedule tool for Saturday. Each result feeds the next decision.
    6. Then it answersNow the goal is met, so it answers, telling the customer what it actually did, not just what it knows.
    7. Bigger jobs, more agentsFor bigger jobs, an orchestrator can hand work to specialist agents for billing, shipping and returns. And a copilot is an agent built into an app to help a person. Exam tip: if it needs tools to finish a task, it is an agent.

    The technical explanation

    Generative AI models (such as GPT-4.1 or Phi) take a prompt and produce new content one token at a time, each token predicted from everything before it. On their own they only know what they learned in training plus what you put in the prompt. They can’t check today’s stock level or send an email.

    An AI agent wraps a model with two more things:

    PartWhat it doesExample
    ModelReads the request, reasons, decides what to do nextA gpt-4.1-mini deployment
    InstructionsSets the role, rules, tone and limits“You’re Contoso’s support agent. Only discuss Contoso orders. Never promise a refund over the policy limit.”
    ToolsLet it fetch data or actFile search over policy PDFs, code interpreter, web search, function calling, OpenAPI tools, MCP servers, Azure AI Search

    The agent loop

    1. 1 Plan

      Read the goal and decide the next step.

    2. 2 Act

      Call a tool: search, run code, call an API.

    3. 3 Observe

      Read what the tool returned.

    4. 4 Repeat or answer

      Take another step, or reply to the user.

    An agent repeats this loop until the goal is met

    The conversation keeps the history, so the agent remembers earlier turns. In Microsoft Foundry you build agents in Foundry Agent Service: Build, then Agents, then Create agent, pick a model, write instructions, add tools and test in the agent playground. Every save creates a new, immutable version, so you can roll back.

    Generative AI

    • Prompt in, content out
    • Knows only its training data and the prompt
    • One call, fast and cheap
    • Great for drafting, summarising, rewriting

    AI agent

    • Goal in, actions and an answer out
    • Uses tools for fresh data and actions
    • Several model and tool calls
    • Great for tasks with steps and real systems
    Same request, two approaches

    Single agent, multi-agent and copilots

    • Single agent: one agent with a focused job and a handful of tools. Start here.
    • Multi-agent: several specialist agents (say, billing, shipping and returns), with an orchestrator agent or a workflow that routes each request and combines the results. Useful when one agent’s instructions or tool list gets too big.
    • Copilot: an AI assistant built into an app to help a person, like Microsoft 365 Copilot drafting a document or GitHub Copilot suggesting code. The person stays in charge and approves the result.
    Architect level Keeping agents safe

    Give each agent only the tools and permissions it needs, and keep a human approval step for anything costly or hard to undo, like refunds or deleting records. Tool results are untrusted input: a web page or document can contain hidden instructions (indirect prompt injection), which is why Foundry guardrails include Prompt Shields. Use tracing and evaluations to see which tools an agent called and why.

    Real-world business scenario

    Telecom

    Tailspin Telecom, a mobile operator in Bengaluru

    The problem
    Its generative chatbot could explain plans but couldn't check a customer's usage or change their plan, so most chats still ended with 'please call us'.
    What they used
    Built a Foundry agent with instructions for tone and limits, a function tool to read usage, an OpenAPI tool to change plans, and file search over the plan brochure. Plan changes above a set value go to a human for approval.
    Why that choice
    The task needed live account data and an action, which is exactly what tools give an agent. The approval step keeps high-impact changes under human control.
    The result
    Most plan-change requests were finished inside the chat, and call-centre staff handled fewer routine calls.

    When to use it and when not to

    ✓ Use it when…

    • Use **generative AI** for drafting, summarising, rewriting and creative content.
    • Use an **agent** when the task needs fresh data, calculations or actions in other systems.
    • Use **multi-agent** designs when one agent has too many tools or conflicting instructions.
    • Use a **copilot** pattern when a person should stay in charge and approve the output.

    ✕ Think twice when…

    • Don't build an agent for a job a single prompt can do. It adds cost and latency.
    • Don't give an agent tools that can make high-impact changes without a human approval step.
    • Don't split into many agents before one agent has proved too limited.

    ↔ Alternatives to consider

    • **Retrieval-augmented generation (RAG)** with a single model when the only need is answers grounded in your documents.
    • **A fixed workflow** (for example Azure Logic Apps) when the steps never change and need no judgement.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    Test yourself with exercises

    5 original practice questions in the AI-901 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.

    Question 1

    Question 1 of 5 · Select 3

    You are creating an AI agent in Microsoft Foundry Agent Service. Which THREE components make up the agent definition?

    Question 2

    Question 2 of 5

    A marketing team needs an AI solution that writes three alternative product descriptions from a short list of product features. The solution does not need to access any other systems. Which approach is the most appropriate?

    Question 3

    Question 3 of 5

    Which statement describes how an AI agent completes a task that requires information from an external system?

    Question 4

    Question 4 of 5

    A company has a single support agent that handles billing, shipping and returns. Its instructions have grown long and it often selects the wrong tool.

    Which design change addresses this problem?

    Question 5

    Question 5 of 5

    Generative AI language models produce text by repeatedly performing which operation?

    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'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.

    Quick revision

    Key points

    • Generative AI creates new content from a prompt by predicting the next token.
    • An agent = model + instructions + tools, working towards a goal.
    • Agents loop through plan, act (call a tool), observe, until the task is done.
    • Multi-agent systems split work across specialist agents with an orchestrator or workflow.
    • A copilot is an AI assistant built into an app to help a person.

    Important terminology

    Generative AI
    AI that produces new content such as text, code, images or audio from a prompt, usually by predicting the next token.
    AI agent
    A model combined with instructions and tools that plans and takes actions to complete a goal.
    Tool
    Something an agent can call to get information or act, such as file search, code interpreter, web search, a function or an API.
    Plan-act-observe loop
    The cycle an agent repeats. Decide the next step, call a tool, read the result, then decide again.
    Multi-agent system
    Several specialised agents that each handle part of a task, coordinated by an orchestrator agent or a workflow.
    Copilot
    An AI assistant built into an app that helps a person do their work, such as Microsoft 365 Copilot or GitHub Copilot.
    Foundry Agent Service
    The Microsoft Foundry service for building, testing, versioning and running agents.

    Common mistakes

    • Calling any chatbot an agent. Without tools and actions it's generative AI.
    • Thinking agents remove the need for human review. High-impact actions still need a person in the loop.
    • Assuming more agents is always better. Each extra agent adds cost, latency and things to test.

    Exam tips

    • "Uses tools to complete tasks on the user's behalf" = AI agent.
    • "Creates a new product description from a prompt" = generative AI.
    • The three parts of an agent = model, instructions, tools.

    Five quick revision questions

    1. 1.What three things make up an AI agent?Show

      A model, instructions and tools.

    2. 2.Name two tools a Foundry agent can use.Show

      Any two of file search, code interpreter, web search, function calling, OpenAPI, MCP servers, Azure AI Search.

    3. 3.What does an agent do after calling a tool?Show

      It observes the result and decides the next step.

    4. 4.What is a copilot?Show

      An AI assistant built into an app that helps a person with their work.

    5. 5.What coordinates the agents in a multi-agent system?Show

      An orchestrator agent or a workflow.

    Official references

    Finished this lesson? Tick it off. Your progress is saved in this browser.

    Next up: Text Analysis: Key Phrases, Entities, Sentiment and Summaries

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    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.