Hackathon Exercise: Setting Up a Safe Learning Environment

Welcome to your first practical exercise. Before you build an AI agent using Microsoft Copilot Studio, you must establish a highly secure and governed foundation. In the heavily regulated UK financial services sector, innovation must never compromise customer safety, data privacy, or operational resilience (The regulatory obligation for firms to identify important business services and remain within impact tolerances during severe but plausible operational disruptions.). This lesson guides you through setting up a safe sandbox environment for our hackathon. You will apply core principles of enterprise governance. These principles include establishing clear accountability, using strictly synthetic data, enforcing least-privilege access, configuring data policies (formerly data loss prevention or DLP policies), and ensuring all activities are logged for audit purposes.

Refresher Core Mental Model: Hackathon Exercise: Setting Up a Safe Learning Environment 1 min

In Copilot Studio and AI Agents for Non-Developers: Building Safe Agents in Regulated Financial Services, Hackathon Exercise: Setting Up a Safe Learning Environment focuses on turning The Business Scenario into a repeatable, governed practice. Rather than treating tools as black-box oracles, anchor every step to three questions: What approved data goes in? What structured draft comes out? And who verifies the result against primary evidence before action is taken?

The Business Scenario

For this hackathon exercise, imagine you are part of a digital transformation team at a UK retail bank. You want to design an internal AI agent to help branch staff quickly retrieve accurate information about the bank’s publicly available savings accounts. By providing fast and reliable answers to your staff, you aim to improve the quality of support delivered to retail customers. This directly supports the FCA Consumer Duty (The UK Financial Conduct Authority (FCA) regulatory standard requiring firms to act to deliver demonstrably good outcomes for retail customers across products and support.) requirements, specifically the Consumer Support and Consumer Understanding outcomes, by ensuring staff provide accurate, helpful, and timely information to avoid causing foreseeable harm.

Hackathon Exercise: Setting Up a Safe Learning Environment

However, because this is an early experimental build, the agent must be constructed in a restricted test environment. It must never be exposed to real customers, it must never connect to live production databases, and it must never process real customer data.

Step 1: Documenting Named Human Ownership

The UK Senior Managers and Certification Regime (The UK financial regulatory framework establishing personal, non-delegable accountability for senior managers over the operational processes and automations in their area.) requires clear accountability for all business activities, and AI agents are no exception. Every workspace, environment, and AI agent must have a named human owner who is responsible for its compliance, security, and lifecycle. Experimental projects that are abandoned without decommissioning can lead to silent failure, where automated processes break in the background, posing significant operational resilience risks.

Your first task in this hackathon is to document ownership for your project workspace. In your project charter or internal IT service management tool, you must record the designated business owner, the technical owner, and the exact date the experimental environment should be reviewed or destroyed. This strict record-keeping ensures that if an issue arises, or if the agent begins to hallucinate (Fluent, authoritative-sounding claims or metrics generated by an AI system that are ungrounded in the source evidence or factually false.) by generating confident but false information, your risk management and IT security teams know exactly who to contact to disable the agent.

Step 2: Preparing Synthetic Data Only

The UK GDPR (Data protection legislation requiring lawful processing, data minimization, purpose limitation, and strict security controls over personal data.) strictly governs the processing of personal data. When building, testing, and evaluating AI agents, you must never use real customer records, live transaction histories, or actual employee communications. Feeding real data into untested AI models risks accidental data leakage, especially if the agent is incorrectly configured to expose sensitive documents during a chat session.

For this exercise, you must create a synthetic dataset. Synthetic data is artificial data that mimics the format and characteristics of real data but contains no actual personal or confidential information. You will use publicly available product brochures, published interest rates, and entirely fabricated customer profiles for testing.

Comparison of Acceptable Synthetic Data and Unacceptable Real Data for AI Testing
Data CategoryUnacceptable Real Data (Do Not Use)Acceptable Synthetic Data (Use This)
Customer IdentifiersExports of actual customer names or email addresses from your live customer relationship management system.Entirely fabricated names, such as John Doe, paired with dummy email addresses ending in generic test domains.
Financial InformationReal sort codes, live account numbers, or genuine transaction histories showing actual customer spending behaviour.Fake numerical sequences such as 00-00-00 for sort codes and randomly generated balances used purely to test calculation logic.
Knowledge SourcesInternal compliance manuals, unredacted staff emails, or genuine customer complaint logs.Publicly available website frequently asked questions, published marketing brochures, and mock complaint scenarios drafted by the project team.
Plain-text version
Data Category | Unacceptable Real Data (Do Not Use) | Acceptable Synthetic Data (Use This)
Customer Identifiers | Exports of actual customer names or email addresses from your live customer relationship management system. | Entirely fabricated names, such as John Doe, paired with dummy email addresses ending in generic test domains.
Financial Information | Real sort codes, live account numbers, or genuine transaction histories showing actual customer spending behaviour. | Fake numerical sequences such as 00-00-00 for sort codes and randomly generated balances used purely to test calculation logic.
Knowledge Sources | Internal compliance manuals, unredacted staff emails, or genuine customer complaint logs. | Publicly available website frequently asked questions, published marketing brochures, and mock complaint scenarios drafted by the project team.

Step 3: Creating a Dedicated Test Environment

Microsoft Power Platform, which underpins Microsoft Copilot Studio, uses environments to separate different stages of development. You must never build a new, untested AI agent in your default environment or your live production environment. Building directly in production violates the fundamental principle of testing before release and introduces severe operational risks.

For this hackathon, you must request a dedicated Sandbox environment from your system administrator. Sandbox environments are isolated spaces specifically designed for development and testing. They allow you to experiment safely without affecting live business operations. Once the administrator creates the environment, switch to it using the environment selector in Copilot Studio. You must verify that you are actively working in this isolated sandbox before you begin creating your new agent.

Step 4: Applying Data Policies

Data policies (formerly called data loss prevention or DLP policies) are crucial technical controls configured in the Power Platform admin center. These policies dictate which data connectors your AI agent is allowed to use and prevent the agent from moving data between approved internal systems and unapproved external services. Data leakage through over-permissioned connectors is a primary risk when building AI agents.

For example, you might configure your agent to read product brochures from a secure Microsoft SharePoint site. However, you absolutely do not want the agent to possess the technical ability to post that information to an external social media connector or a public file-sharing service.

In your hackathon sandbox, your administrator must apply a strict data policy. This policy should categorise all third-party and custom connectors into the Blocked group by default. Only the standard Microsoft 365 connectors strictly required for the exercise, such as SharePoint or OneDrive for Business, should be placed in the Business data group. With this configuration, the platform enforces the data boundary even if a team member makes a configuration mistake: Copilot Studio applies data policies to agents in real time, and Microsoft no longer allows individual agents to be exempted from enforcement. Data policies reduce the risk of data exfiltration rather than removing it, so the other controls in this lesson still apply.

Step 5: Enforcing Least-Privilege Permissions

The principle of least privilege dictates that individuals should only possess the minimum access rights necessary to perform their specific job functions. Providing excessive permissions increases the risk of accidental misconfiguration, insider threats, and unintended data exposure.

In your sandbox environment, access must be tightly controlled. You will apply this principle in two ways:

  • Environment Access: Only the designated hackathon participants should be granted the Environment Maker security role, which allows them to build agents in Copilot Studio. You must not grant System Administrator access to the broader project team.
  • Agent Sharing Controls: When configuring the agent itself, you will set the publishing and sharing controls so that only the specific project team can chat with the agent during the testing phase. You must never share an experimental agent with the entire organisation.

Restricting access ensures that if the agent suffers from hallucinations, or if it experiences silent failure where it stops functioning without presenting an error message, the impact is contained entirely within the project team. It also limits the risk of broader staff relying on an unverified tool.

Step 6: Enabling Baseline Logging and Audit

Regulated financial firms are subject to strict record-keeping requirements. You must be able to prove how an AI agent arrived at a specific answer, what data sources it accessed, and exactly who interacted with it. Without comprehensive logging, it is impossible to investigate incidents, audit system performance, or demonstrate compliance to regulatory bodies.

Microsoft Copilot Studio automatically saves conversation transcripts to Microsoft Dataverse, including the conversations you hold with your agent in the test chat, unless an administrator has turned transcript saving off for the environment. These settings live in the Power Platform admin center, not in the agent itself, so for this exercise ask your administrator to confirm that transcripts are being saved in your sandbox and who can view them (viewing transcripts in Power Apps requires the Bot Transcript Viewer security role). Note that transcripts are deleted after 30 days by default, and that the analytics on the Monitor page do not include test chat activity.

You will use these transcripts during the testing and evaluation phase of the hackathon. By reviewing the exact conversations, you can identify instances of prompt injection attempts. Prompt injection is a critical security risk where a malicious user types manipulative instructions to bypass the agent’s safety rules or access hidden instructions. Auditing the logs is a form of human oversight: a named reviewer checks the agent’s logic, reviews the transcripts and updates the agent’s safety instructions to prevent future manipulation before the agent is ever considered for release.

Summary of Your Safe Environment

Before you write a single instruction or upload a knowledge source to your agent, you must verify that all safety controls are active. You have documented the named human owner to satisfy accountability rules. You have prepared a folder containing only synthetic data and public brochures, ensuring no real customer data is at risk.

You have confirmed that you are working in an isolated sandbox environment, not the live production system. You have verified that data policies are active, blocking unauthorised external connectors. You have checked the sharing settings to enforce least-privilege permissions, meaning only your small team can view or edit the agent. Finally, you understand how to access the conversation logs for essential audit and review purposes.

By establishing this highly controlled foundation, you are demonstrating exemplary good practice for building AI solutions in regulated financial environments. You are now ready to proceed to the next phase of the hackathon, where you will define the agent’s instructions and safely connect it to your synthetic knowledge sources.

Hackathon Exercise: Setting Up a Safe Learning Environment in practice
Go deeper Architectural & Governance Trade-Offs in Hackathon Exercise: Setting Up a Safe Learning Environment 1 min · optional

When scaling Step 1: Documenting Named Human Ownership across a team or regulated workflow, the primary bottleneck is rarely generation speed—it is verification overhead and drift. High-performing teams track two operational metrics alongside throughput: Edit-to-Approval Time (how many minutes a human reviewer spends correcting outputs) and Source-Traceability Rate (whether 100% of material numbers and claims link back to an audited record). If edit time exceeds manual drafting baseline across two cycles, tighten your input schema and negative constraints before expanding scope.

Executive Advisory • Tesseract Consulting

Enterprise AI Strategy & Implementation Discovery Call

Scope practical AI workflows, human-in-the-loop governance, and measurable delivery milestones with Tesseract Consulting.