PL-900 Step by step · Lab 12

4 Guards That Stop a Copilot Studio Agent Making Things Up

Build the Procurement Assistant: instructions, a policy PDF as knowledge, four guards against hallucination, and a topic that guides the chat.

· 6 min read

The agent answers that the procurement policy does not cover the GST rate, instead of guessing
Watch the lesson: Lab 12: Copilot Studio: the Procurement Assistant | PL-900 Power Platform Step by Step

Procurement at Pragati Industries answers the same questions all day: who approves this request, how many quotations do I need, when is the supplier paid? The answers are in a twenty-page policy. In Lab 12 of the PL-900 course we build an agent that answers from that policy, and refuses to guess when the policy is silent.

Step 1: Create the agent

Agents run on Copilot credits, so the course uses a sandbox environment with a pay-as-you-go billing plan metered for Copilot Studio only, deleted when the labs are done.

In Copilot Studio, create an agent named Procurement Assistant. Add a description, and instructions: who the agent is, what it helps with, its tone, and one rule: name the policy section it used.

Procurement Assistant overview with description and instructions
Instructions in plain words, including the rule to cite the policy section.

Step 2: Add the policy as knowledge, and test

Knowledge → Add knowledge: upload the procurement policy PDF. It is stored in Dataverse and indexed; a minute later its status is Ready.

Test pane: the agent answers who approves a 2.5 lakh request, from the policy
Who approves ₹2,50,000? The manager, then the finance controller, because it falls between one and five lakh.
Answer: three written quotations for a 3 lakh purchase, policy section 3
Three quotations for a ₹3,00,000 purchase, citing section 3 of the policy.

Step 3: Stop the agent from guessing

Look at what the agent searched: the policy, but also public websites about procurement in India. An answer from the web can sound right and still not be Pragati’s rule. That is a hallucination risk. Four guards:

  1. Moderation: a content moderation level; flagged answers are replaced by a safe message.
  2. Allow ungrounded responses: Off: answers only from knowledge sources or a tool.
  3. Use information from the web: Off.
  4. An instruction: answer only from the procurement policy, and when it does not say, say so.
Settings: Allow ungrounded responses Off, Use information from the web Off
Knowledge settings: no ungrounded answers, no web.

How you know it worked

Ask a question the policy cannot answer: What is the GST rate on centrifugal pumps? It does not guess a tax rate. It says the policy does not cover it, and points to procurement.

The agent says it cannot find the GST rate in the procurement policy
Always test with questions your knowledge cannot answer.

Step 4: A topic for a guided conversation

Knowledge answers questions; a topic guides a conversation. Topics → Add from description with Copilot: Report a supplier problem, asking which supplier, the kind of problem as a choice, and the request number, with a special answer for quality problems.

Test pane: the agent picks the Report a supplier problem topic and asks which supplier
The agent picks the topic and asks its questions, then gives the quality answer: quarantine the material and raise a quality note.

What a tech lead should take away

  • Ground every business agent on trusted knowledge, with ungrounded answers and web search off.
  • Test the “I don’t know” path, not only the happy path.
  • Budget for credits and keep agent experiments in a sandbox with a capped billing plan.

Do it yourself

Lab guides, practice and full mock exams come with a subscription. See the plans