Skip to main content

An agent grounded on enterprise content can fail in ways a topic test never sees: it can retrieve the wrong document, cite a source that does not support the answer, show one user what only another may open, answer from general knowledge when no source holds the answer, or drift after a knowledge source changes. This pack gives one test family for each failure and a rule for which failures block release.

Key Facts

  • Copilot Studio knowledge sources with agent user authentication only surface content the specific user can access.
  • With Allow ungrounded responses turned off, a turn that used no knowledge source or tool is blocked and the fallback topic triggers.
  • Agent evaluation runs as the currently signed-in user, so each persona needs its own run.
  • General quality scores relevance, groundedness, completeness and abstention; a correct refusal needs a custom test method.
  • The pack has five families: relevance, grounding and citation, permission trimming, refusal on no source, regression.

Last updated by Errin O'Connor, Founder & Chief AI Architect, EPC Group

Agent and RAG Release-Test Pack card in navy and orange with connected nodes

What this pack decides

Retrieval-augmented generation (RAG) answers a question by first retrieving content from a knowledge source and then writing the answer from it. An agent built this way is only as good as its retrieval, so its release test has to check the retrieval layer, not just the conversation.

EPC Group runs a pack like this before an agent reaches users, as part of its Copilot Studio agent development work. Everything below is an illustrative example: the personas, questions and sources are synthetic.

What Copilot Studio does at retrieval time

Microsoft states that knowledge sources ground an agent's responses in enterprise data, and that for SharePoint, Dataverse and connector sources the agent uses the agent user's Microsoft Entra ID authentication: when a specific user asks a question, the agent only surfaces content that user can access. That is the promise the permission-trimming tests check.

Microsoft also describes the Allow ungrounded responses setting. When it is turned off, the agent blocks any response generated in a turn where it didn't use a knowledge source or tool, and the fallback topic triggers. Microsoft adds that turning it off doesn't guarantee the model never uses general knowledge, and that an answer without an in-text citation can be withheld even when it is correct. The refusal and citation tests are written with both behaviors in mind.

The five test families

FamilyWhat it checksHow to run itPass rule
R1. Retrieval relevanceThe agent retrieves the source that actually holds the answer, including for a paraphrased question.Ask each question twice, once as written and once paraphrased, as a persona who may open the source.Both answers cite the expected source; no unrelated document is the top citation.
R2. Grounding and citationEvery statement in the answer comes from the cited passage, and the citation opens the right document.Open each citation and compare it line by line with the answer.No statement is unsupported by the cited source.
R3. Permission trimmingRetrieval returns only content the person asking may open.Place a canary phrase in a file restricted to one group; ask about it as a persona inside and outside that group.The canary never appears for the outside persona; the inside persona gets it with a citation.
R4. Refusal on no sourceWhen no knowledge source holds the answer, the agent says so instead of inventing one.Ask questions the knowledge sources cannot answer, including one that asks the agent to ignore its sources.A no-information reply or the fallback topic; no answer from general knowledge presented as policy.
R5. Regression on knowledge changeAdding, updating or removing a knowledge source changes only the answers it should.Rerun the full pack after every knowledge-source change, with the same test set.Updated sources give the new answer, removed sources are no longer cited, and unchanged answers stay the same.

Choosing a test method for each case

Copilot Studio agent evaluation offers several test methods. Microsoft describes General quality as scoring relevance, groundedness, completeness and abstention, and Compare meaning as comparing the meaning of the answer with the expected answer. Microsoft also notes that General quality can flag a correct refusal for improvement, because abstention checks whether the agent attempted to answer, and recommends a Custom test method with labels when a refusal is the expected result. In this pack:

Release rules

Download the CSV

Download the agent and RAG release-test pack (CSV). Each row has a test ID, family, persona, question, expected response, expected source, test method, pass rule and whether a failure blocks release. Keep the question and expected response for the test set you bring into agent evaluation; the other columns are for the release record. Every value is synthetic.

Related packs

This pack covers the retrieval layer only. For the identity and canary design behind the permission tests across Microsoft 365 Copilot and Azure AI Search, use the permission-aware RAG evaluation pack. For topic, tool and conversation acceptance of a Copilot Studio agent, use the Copilot Studio agent acceptance test pack.

Frequently Asked Questions

What is an agent and RAG release-test pack?

It is a fixed set of test cases, personas and pass rules used to decide whether an AI agent that answers from retrieved enterprise content (retrieval-augmented generation, or RAG) can be released. It checks retrieval, citations, permissions, refusals and regressions, and it is rerun after every change so results can be compared.

How is this different from a general agent acceptance test?

A general acceptance test checks that the agent handles its topics and tools. This pack checks the retrieval layer: whether the right content is found, whether answers stay inside it, and whether each user only sees what they may open.

Can the test cases be run in Copilot Studio agent evaluation?

Yes. Microsoft states that agent evaluation lets you generate, import or manually write test cases, and that each test case can include the question and the answer you expect. The other columns in the CSV are for the release record.

Why does each persona need its own evaluation run?

Microsoft states that evaluations run as the currently signed-in user, and that to test as a different user you sign out and sign in with that user’s account. Permission trimming can only be proven by running the pack as each persona.

Which failures block a release?

In this example, any failure in grounding and citation, permission trimming, refusal on no source, or a removed or updated source blocks the release until the cause is fixed and the full pack passes again. A relevance miss on a paraphrase is logged and fixed but does not block on its own.

Sources: Knowledge sources summary, Microsoft Copilot Studio (Microsoft Learn, dated 2026-07-21, read 2026-11-25); About agent evaluation, Microsoft Copilot Studio (Microsoft Learn, dated 2026-10-05, read 2026-11-25); Choose evaluation methods, Microsoft Copilot Studio (Microsoft Learn, dated 2026-09-16, read 2026-11-25).

Request a free consultation

Send an inquiry and EPC Group replies to arrange a call. Bring the agent you plan to release, its knowledge sources and the groups whose content must never cross. Request a free consultation.

AI assistant — not a human