Designing Audit Trails for Models and Data
This lesson explains the sources and design of audit trails for AI solutions.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish change questions from activity questions.
- Identify sources of audit records.
- Describe how to design a connected audit trail.
What an audit trail must answer
An audit trail for an AI solution answers two families of questions. Change questions ask what changed in the solution: who modified an agent's instructions, added a knowledge source, changed a connector, deployed a model version or altered a training data set, and when. Activity questions ask what the AI did: which prompts it received, which resources it referenced, which actions it took, and with what result. Regulators, auditors and incident investigators need both, and they need records that cannot be altered by the people whose actions they record.
Sources of audit records
Microsoft platforms provide audit records that a design brings together. The following table summarizes the main sources.
| Source | What it records |
|---|---|
| Microsoft Purview unified audit log | Copilot and agent interactions (CopilotInteraction records with the app, referenced files and sensitivity labels) and admin operations such as creating or deleting plugins and changing tenant settings |
| Purview retention and eDiscovery | Prompts and responses kept or deleted by retention policies and searchable as Copilot activity |
| Dataverse auditing | Changes to records and to agent and configuration data in Dataverse |
| Power Platform admin activity | Administrative changes to environments and settings |
| Azure activity log | Changes to Foundry resources, deployments and networking |
| Foundry agent versions and tracing | Each agent definition version, and traces of agent runs |
| Source control and pipelines | Who changed code and configuration, who approved, what was deployed |
| Data set and model versioning | Lineage from data sets to model versions and evaluation results |
Copilot Studio agent interactions are recorded in Purview Audit (Standard). Copilot Studio agents published to channels outside Microsoft 365 may require pay-as-you-go Purview billing for some capabilities, which the cost analysis should include.
Designing the audit trail
A design connects these sources so that an auditor can follow a decision from the AI's action back to the configuration and data behind it.
- Enable auditing on every relevant source, including Dataverse auditing on the tables and agent components that matter.
- Make changes only through pipelines and source control, so every production change has an author, a reviewer and a record.
- Version knowledge content, data sets and models, and record which versions were live when.
- Retain audit records for the period that regulations require, using retention policies, and protect them from deletion by solution owners.
- Centralize analysis, for example by exporting logs to a security information and event management system such as Microsoft Sentinel.
Proving what an agent did
A customer of an insurer complains that an agent gave them wrong information about their coverage three months ago, and the regulator asks the insurer to show what the agent said, which sources it used, and whether its configuration had changed around that date. What audit design would let the insurer answer?
The Purview unified audit log records the interaction with the referenced resources, and Purview retention keeps the prompt and response, so the conversation can be retrieved with eDiscovery. Because the agent is deployed only through a pipeline from source control, the insurer can show the solution version live on that date and the change history around it. Versioned knowledge content shows which document versions were available. Retention policies must keep these records for at least the regulator's required period, and Dataverse auditing covers any configuration stored as data.
Which Purview audit record type captures Copilot and agent interactions?
Show answer
CopilotInteraction, which includes the app, referenced files and sensitivity labels.
Exam Tips
Remember for the exam
- Audit trails answer change questions and activity questions.
- Purview records CopilotInteraction events, admin operations and retained prompts and responses.
- Combine Purview, Dataverse auditing, Azure activity logs, Foundry versions, source control and data lineage.
- Make production changes only through pipelines and retain records for the required period.