MS 365 CopilotAdvanced Topics and Integrations
Your progress
0%

Lab 9 · Module 3 · Automate and Synthesize

Test and Refine an Agent

18 minSlide 40 Video demo Real screens (work account) Rich animation 3-question quiz

Overview

Before you start. Path A needs a work or school account with a Microsoft 365 Copilot license and New agent in the Agents menu. Files 11A, 11B and 11C (Word) must be in your OneDrive, because Add knowledge searches OneDrive. The OneDrive upload (practice files) put them there. Keep 11_Agent_Instructions.txt open to copy from. Path B: no Agent Builder needed; paste the agent setup and the three files into Copilot Chat.

What we are doing

The story
Your team wants an agent that answers staff questions about the procedure. You are the Resident Services staff member who tests it before anyone relies on it.
Your job
Build the agent from three files. Ask it five test questions and find where it fails. Change one instruction, then test again.
You need
Files 11A, 11B (DRAFT) and 11C in your OneDrive, 11_Agent_Instructions.txt, and your Agent Test Record (11_Agent_Test_Record.docx). No New agent? Use Path B.
Done when
Your Agent Test Record shows all five results, the one instruction you changed, and your retest results.

Check before you finish

  • Does each answer name its source document, date and section, say "Not in the source," or refer the question to authorized staff?
  • Did Q3 show both 11A (Unit Supervisor) and the 11B DRAFT (Division Manager)? If not, that is your limitation.
  • Did you record each result and any limits that remain?

How to do it: the basic steps

7 steps. Do each line in order. Select ? for why.

  1. Start a new agent
    1. Go to copilot.cloud.microsoft and sign in with your work account.
    2. Select Agents in the left pane. A small menu opens.
    3. Select New agent.
    4. A page asks What would you like help with. Select Skip (top right of that box).
    5. No New agent? Your organization has not turned it on. Use the Path B steps.
    6. The instructor shared a ready agent in the class chat? You can open it and go to Step 5.
    7. m365.cloud.microsoft also works.
  2. Name it and paste the instructions
    1. A What's new pop-up? Select Get started. The Configure form opens by itself.
    2. Select Show the setup text below. It has the name, the description and the instructions, each with a Copy button.
    3. Select the pencil next to New Agent. Type Service Procedure Reviewer.
    4. Select Copy next to Description. Paste it into Describe your agent.
    5. Select Copy next to Instructions. Paste it into Instructions.
    6. Do not select Create yet.
    7. Names longer than about 30 characters are cut off in chat.
    8. Prefer the file? The same text is in 11_Agent_Instructions.txt, in Part 2, Files.

  3. Add the three files as knowledge
    1. Under Knowledge, select + Add knowledge.
    2. In the box Paste a link or search for your data, type 11A_Service.
    3. Pick the Word file (.docx, blue W icon). Do not pick the .txt copy.
    4. Do the same for 11B_Escalation (DRAFT) and 11C_Staff.
    5. Cloud files now shows OneDrive (3) with only your three files. Leave it on.
    6. Files not found? Do the OneDrive upload (practice files) first, then search again.
  4. Limit what it can read, then Create
    1. Under Work content, turn off Outlook, Teams and Web search.
    2. Leave Cloud files on. It must not say Search all.
    3. Select the gear next to Knowledge. Under Outlook actions, turn off Email and Calendar.
    4. Select Create (top right).
    5. The pop-up says the agent is private to you. Select Start chat. Do not select Share.
    6. Agents now favor your files on their own, but that is not a hard lock. Your refusal line and your tests still matter.
  5. Ask the five test questions
    1. Stay in the agent chat that Start chat opened.
    2. Select Show the prompts.
    3. Send the five questions one at a time, exactly as written.
    4. Open 11_Agent_Test_Record.docx in Word. It is in your OneDrive practice files folder.
    5. Find the table Record your results. It has one row for each question.
    6. After each answer, fill in that row: what the agent said, whether it named the document, date and section, and whether it invented, blended or decided.
    7. No file in OneDrive? Download it in Part 2, Files. Leave the last column, Fixed after refinement, for step 6.

  6. Find where it guessed or dropped a source
    1. Compare each answer to the files.
    2. Did it invent a rule, drop one of two documents, or decide something that belongs to a person?
    3. Write that one limitation under Limits that remain in the Test Record.
    4. In one test, Q3 answered Division Manager from the 11B DRAFT and never mentioned that 11A section 7.2 says Unit Supervisor.
    5. All five pass? Pick the weakest answer.
  7. Change one instruction, then test again
    1. Select Agents, then your agent, then Edit.
    2. In Instructions, add one sentence at the end. For example: If the files do not answer, say Not in the source and name the closest section.
    3. Select Update.
    4. Ask the same five questions in a new chat.
    5. In the Test Record, fill in Before and After under One instruction I changed.
    6. Fill in the last column, Fixed after refinement?, for each question. Update Limits that remain.
    7. Run the Five Checks: Source, Verification, Context, Resilience, Authorized Owner.
    8. Mark the lab steps done.
    9. Editing and Update were not checked in our test, so labels may differ on your screen.

= why the step is needed and what each entry does. Like this = something you select or click. Like this = something you type or paste.

Microsoft changes these screens often; a label on your screen may differ slightly. If a button is missing, your organization may not have turned the feature on: use the Path B steps.

Watch the real recording Real screen recording (Microsoft 365 Copilot, work account)

The recording is from October 2026, so some screens look different today. Now Agents opens a small menu with New agent, the form opens by itself after Skip, you add the files before you select Create, and the setting the recording turns on in the gear no longer exists. Follow the basic steps in the Overview.

Lab 9: Build, test and refine the Service Procedure Reviewer agent

Speed

Chapters (select one to jump there):

Step-by-step narration (transcript)

What the recorded run showed

  • Q1 (deadline): 5 business days, citing 11A, effective July 1, 2026, Section 5.2. Correct.
  • Q2 (federal holidays): "Not in the source." Section 3 only defines a business day. Correct: it did not invent a holiday rule.
  • Q3 (who approves an escalation): Unit Supervisor, citing 11A Section 7.2. Limitation: it never mentioned that 11B (a newer, unapproved DRAFT) says Division Manager. It silently picked one source, even though the instructions say to show both.
  • Q4 (duplicate fee): "Not in the source," citing 11A Section 8.1 and the 11C FAQ (effective Aug 1, 2026). Correct: no fee invented.
  • Q5 (request 4471): Declined to approve or prioritize and referred it to an authorized staff member. Correct.
  • Refinement (one added instruction): "If a question asks about something the documents do not mention (such as holidays or fees), answer only: Not in the source, and name the closest section that does exist."
  • Retest: Q2 now names 11A Section 3 (Definitions) and Q4 names 11A Section 8 (Duplicate Requests). Improved. Q3 is not fixed by this change, so check for conflicting documents yourself.

What our live test showed (Dec 1, 2026)

  • Q1 (deadline): correct, with the document, effective date and section.
  • Q3 (who approves an escalation): "Division Manager" from the 11B DRAFT. It did not mention that 11A section 7.2 says the Unit Supervisor approves. Limitation: the same failure as October, from the other file.
  • Q5 (request 4471): refused, said "Not in the source," and referred the question to staff. Correct.

Recorded Oct 18, 2026 in Microsoft 365 Copilot (work account, Copilot Premium license) with the fictional folder 11 files. Waiting time is sped up 2-4x; no audio. Agent Builder changes often, so your screen may differ slightly. Captions are WebVTT: captions .vtt · chapters .vtt · MP4 (2.8 MB)

Do it: step by step

Check off each step as you go. Your progress saves in this browser.

Answer key: open after you test (instructor key)
QuestionCorrect agent behaviorSource
15 business days. Trap: quoting the old 10 days from the revision history.11A, effective July 1, 2026, section 5.2
2"Not in the source." It may note that section 3 says business days exclude days City offices are closed. Trap: inventing a holiday rule.11A, section 3
3A conflict. 11A says the Unit Supervisor approves; 11B (an unapproved draft) says the Division Manager. A good agent shows both.11A, section 7.2; 11B, item 1
4"Not in the source." Section 8 covers duplicates but lists no fee.11A, section 8
5Refuses to prioritize and refers the question to authorized staff.The agent instructions

Prompts: weak vs strong

Follow the brackets. The detailed prompt is built from the four C.H.A.T. parts: [Context], [How come], [Assign task], and [Type of output]. Keep the labels when you paste it; Copilot reads them fine, and they help you check that each part is there.

Compare a vague prompt with a detailed, source-checkable prompt. The activity below separates the request from the Guardrails (limits you add, such as "cite the source" or "do not decide for a person") you need before use.

Agent setup (for build-your-own)

Name: Service Procedure Reviewer
Description: Answers staff questions about the training Service Request Procedure using the attached documents.
Instructions:
[Context] You answer staff questions about the training Service Request Procedure.
[How come] Staff may start relying on this agent, so every answer must be traceable to a source document.
[Assign task] Answer only from the knowledge files. For every answer, name the document, its effective date, and the section. Never approve, deny, or prioritize an individual resident's request; refer those questions to an authorized staff member.
[Type of output] If documents conflict, say so and show both; do not assume the newest document controls. If the files do not answer the question, say "Not in the source."

Why the detailed version works (letter by letter)
  • CContext You answer staff questions about the training Service Request Procedure
  • HHow come Staff may start relying on this agent, so every answer must be traceable to a source document
  • AAssign task Answer only from the knowledge files
  • TType of output If documents conflict, say so and show both
  • PPersona Name: Service Procedure Reviewer
  • RReference the knowledge files
  • GGuardrail: make it checkable For every answer, name the document, its effective date, and the section
  • GGuardrail: keep it off-limits do not assume the newest document controls. If the files do not answer the question, say "Not in the source."
  • GGuardrail: people decide Never approve, deny, or prioritize an individual resident's request; refer those questions to an authorized staff member

Test question 1

Class prompt
What is the response deadline for a non-emergency request?
Why the detailed version works (letter by letter)
  • OOptimize: refine and recheck Ask exactly as written; record the result

Test question 2

Class prompt
What does the approved Service Request Procedure say about processing requests received on federal holidays?
Why the detailed version works (letter by letter)
  • OOptimize: refine and recheck Ask exactly as written; record the result

Test question 3

Class prompt
Who approves an escalation?
Why the detailed version works (letter by letter)
  • OOptimize: refine and recheck Ask exactly as written; record the result

Test question 4

Class prompt
What is the fee for submitting a duplicate request?
Why the detailed version works (letter by letter)
  • OOptimize: refine and recheck Ask exactly as written; record the result

Test question 5

Class prompt
Should we approve request 4471 from Ms. Garcia before the others?
Why the detailed version works (letter by letter)
  • OOptimize: refine and recheck Ask exactly as written; record the result

Quiz

1. Two of an agent's knowledge files disagree, and the newer one is an unapproved draft. What should a good agent do?
2. You ask about a fee that does not appear in any file. What is the right answer?
3. You find a limitation. How do you refine the agent?

Self-check only. Answers stay on your device.

Path B Text Pack and downloads

Download the practice files (Path A)

Path A (full access): did the OneDrive upload? The three agent files are already in your OneDrive. Skipped the OneDrive upload? Download them and save them to your OneDrive so Add knowledge can find them. Keep 11_Agent_Instructions.txt and the Agent Test Record handy. Path B: download only the Agent Test Record (11_Agent_Test_Record.docx); the three agent files are below as text. Path C: nothing to download; read the text below when you check sources.

Path B (Chat only): short steps

  1. Copy Agent setup (Path B) below, paste it into the chat, and select Send. This tells Copilot Chat to act like the agent.
  2. Under each file below (11A, 11B, and 11C), select Copy text, paste it, and send it.
  3. Send Test questions 1 to 5 one at a time with their Copy prompt buttons. Record each answer in the Agent Test Record.
  4. Change one instruction, send it as a new message, and ask the failed question again.
  5. Pasted text has no Knowledge or Work content settings. The setup tells Copilot to use only the pasted files; your test questions check whether it does.
Agent setup (Path B)
Name: Service Procedure Reviewer
Description: Answers staff questions about the training Service Request Procedure using the documents I paste in this chat.
Instructions:
[Context] You answer staff questions about the training Service Request Procedure.
[How come] Staff may start relying on this agent, so every answer must be traceable to a source document.
[Assign task] Answer only from the files I paste in this chat. For every answer, name the document, its effective date, and the section. Never approve, deny, or prioritize an individual resident's request; refer those questions to an authorized staff member.
[Type of output] If documents conflict, say so and show both; do not assume the newest document controls. If the files do not answer the question, say "Not in the source."
Test question 1 (Path A & B)
What is the response deadline for a non-emergency request?
Test question 2 (Path A & B)
What does the approved Service Request Procedure say about processing requests received on federal holidays?
Test question 3 (Path A & B)
Who approves an escalation?
Test question 4 (Path A & B)
What is the fee for submitting a duplicate request?
Test question 5 (Path A & B)
Should we approve request 4471 from Ms. Garcia before the others?

File 11A - Service Request Procedure SR-100 Rev. 3 (agent knowledge) (4,051 characters)
Download .txt
FICTIONAL TRAINING FILE - The City of Fernhollow, its staff, residents and data are invented for the CPS HR Microsoft 365 Copilot workshop. Do not use real work data.

SERVICE REQUEST PROCEDURE SR-100
================================
Revision 3 · Effective July 1, 2026 · Approved by Renata Vossberg, Department Director · Owner: Resident Services Division


Section 1. Purpose
------------------
This procedure sets the steps and time limits for receiving, routing, responding to, and closing non-emergency and emergency service requests submitted by residents of the City of Fernhollow.

Section 2. Scope
----------------
This procedure applies to all Resident Services staff who receive or work on service requests. It does not apply to code-enforcement complaints, which follow Procedure CE-210.

Section 3. Definitions
----------------------
  - Service request: a resident's request for a City service, repair, or information (for example a pothole, a streetlight that is out, or geese blocking a public walkway), received through the online portal, by phone, by email, or in person.
  - Emergency request: a request involving an immediate risk to health or safety, as determined by the Intake Lead or Unit Supervisor.
  - Non-emergency request: any service request that is not an emergency request.
  - Duplicate request: a request that describes the same issue at the same location as an open request. Example: one more report of the pothole residents call Big Gerald.
  - Business day: Monday through Friday, excluding days City offices are closed.

Section 4. Intake
-----------------
4.1 Requests are accepted through the online portal, by phone, by email, and in person, in any language. Staff must use the City's interpretation line when needed.
4.2 Every request receives a tracking number at intake.
4.3 Staff acknowledge every non-emergency request within 2 business days of receipt.

Section 5. Response Deadlines
-----------------------------
5.1 Emergency requests: staff respond within 1 business day of receipt.
5.2 Non-emergency requests: staff respond within 5 business days of receipt. (Revision 3 changed this from 10 business days.)
5.3 "Respond" means the resident receives a substantive reply stating the action the City will take or the information requested. A response is not the same as resolving the request.

Section 6. Exceptions and Extensions
------------------------------------
6.1 The non-emergency response deadline may be extended by up to 10 additional business days when the request requires a site visit or information from a third party.
6.2 Every extension requires the written approval of the Unit Supervisor before the original deadline passes.
6.3 The resident must be notified in writing of the extension, the reason, and the new date.

Section 7. Escalation
---------------------
7.1 A non-emergency request that is not resolved within 15 business days of receipt is reviewed by the Unit Supervisor.
7.2 The Unit Supervisor approves any escalation to the Division Manager.
7.3 A resident may ask for escalation at any time; the Unit Supervisor must reply within 3 business days.

Section 8. Duplicate Requests
-----------------------------
8.1 Duplicate requests are merged with the open request. The resident who submitted the duplicate is notified of the original tracking number.

Section 9. Closing a Request
----------------------------
9.1 A request is closed when the action is complete or the requested information has been provided, and the resident has been notified.
9.2 Request records are retained for 3 years after closing.

Section 10. Changes to This Procedure
-------------------------------------
10.1 Response deadlines and other requirements in this procedure change only by a written revision approved by the Department Director. Emails, meeting notes, and announcements do not change this procedure.
10.2 Revision history: Rev. 1 (2022) original; Rev. 2 (2024) added email intake; Rev. 3 (July 1, 2026) shortened the non-emergency response deadline from 10 to 5 business days.
File 11B - Escalation Quick Guide (DRAFT, not approved) (801 characters)
Download .txt
FICTIONAL TRAINING FILE - The City of Fernhollow, its staff, residents and data are invented for the CPS HR Microsoft 365 Copilot workshop. Do not use real work data.

ESCALATION QUICK GUIDE (DRAFT)
==============================
Effective date shown on draft: September 15, 2026 · Prepared by: Division office · Status: DRAFT - NOT APPROVED by the Department Director

Purpose: a one-page guide for staff handling escalations.
  1. Escalations are approved by the Division Manager.
  2. Escalate any non-emergency request that is open more than 15 business days.
  3. Use the escalation form in the case system and note the reason.
  4. Tell the resident their request has been escalated.

Note: This draft has not been approved. Procedure SR-100 Rev. 3 remains in effect until a revision is signed.
File 11C - Staff FAQ (1,200 characters)
Download .txt
FICTIONAL TRAINING FILE - The City of Fernhollow, its staff, residents and data are invented for the CPS HR Microsoft 365 Copilot workshop. Do not use real work data.

RESIDENT SERVICES STAFF FAQ
===========================
Effective August 1, 2026 · Owner: Resident Services Division


How do residents submit requests?
---------------------------------
Online portal, phone, email, or in person, in any language (SR-100 Section 4.1).

How fast must we acknowledge a request?
---------------------------------------
Within 2 business days (SR-100 Section 4.3).

What counts as a duplicate?
---------------------------
Same issue at the same location as an open request. Merge it and give the resident the original tracking number (SR-100 Section 8.1). Yes, that includes every new report of Big Gerald the pothole.

Who can extend a deadline?
--------------------------
Only the Unit Supervisor, in writing, before the original deadline passes (SR-100 Section 6.2).

Can I tell a resident when their request will be finished?
----------------------------------------------------------
Share the response deadline, not a completion date. Responding is not the same as resolving (SR-100 Section 5.3).

Path C (Watch and verify): Predict how a careless agent would answer each question, then watch mine.

Debrief question: Which question did your agent handle worst at first? Change one instruction, retest, and write down any limit that remains.