Key takeaways

  • Draw the boundary map first: what data enters, where it is processed, what is stored and who can see the output.
  • Retrieval must enforce the same permissions as the source system — an assistant must never widen access.
  • Treat logs and evaluation sets as sensitive data stores in their own right.
  • Check supplier terms on retention, training use and processing location before any pilot touches real data.

The fastest way to lose trust in an internal AI programme is a single incident in which a colleague sees something they should not have seen. It rarely happens because a model “goes rogue”. It happens because an assistant was connected to a document store with broader permissions than any individual user, because prompts were logged in full to a tool nobody reviewed, or because a pilot quietly used a consumer account with terms nobody read.

This note sets out a practical way to define and enforce data boundaries for internal AI systems. It is written for CTOs, heads of IT, information security leads and data protection officers in UK organisations, but the principles travel.

1. Draw the boundary map before you build

Every AI workflow has five places where data crosses a line. Draw them on one page before any engineering starts:

  1. Input — what a user types, pastes or uploads, plus anything the system adds automatically (account details, previous messages).
  2. Retrieval — documents, records or database rows fetched to give the model context.
  3. Processing — where the model actually runs: which supplier, which region, under which contract.
  4. Storage — prompts, outputs, logs, caches, embeddings and evaluation sets that persist after the request.
  5. Output — who sees the answer, where it is copied, and whether it triggers any action.

For each crossing, write down three facts: the most sensitive class of data that can pass, who is accountable for it, and the control that enforces the limit. If you cannot fill a cell, you have found your first risk.

2. Classify before you connect

Most organisations already have a data classification scheme, even an informal one. Map it to AI usage explicitly rather than assuming people will infer the rules:

Class Examples Default AI rule
Public Published website copy, press releases Any approved tool
Internal Process documents, non-sensitive policies Approved enterprise tools only
Confidential Contracts, pricing, board papers, source code Approved tools with contractual no-training and defined retention
Personal data Customer records, HR files Only where a lawful basis, DPIA and minimisation are documented
Special category / highly restricted Health data, criminal records, security keys Excluded by default; exceptions need formal sign-off

The table matters less than the conversation it forces. Legal, security and operations leaders must agree which row each new workflow sits in, and that agreement must be written down.

3. Retrieval must never widen access

Retrieval-augmented generation — fetching relevant documents and passing them to a model — is the most common pattern for internal assistants, and the most common source of boundary failures.

The core rule is simple: an assistant may only retrieve what the person asking could already open themselves. In practice that means:

  • Index permissions alongside content, and filter results by the requesting user’s identity at query time — not by a service account’s broader rights.
  • Re-check permissions when documents move or access is revoked; stale indexes are a quiet leak.
  • Keep separate indexes for genuinely separate audiences (for example, HR and general staff) rather than relying on one filter.
  • Prefer retrieving short, relevant passages over whole documents; less context means less exposure and lower cost.

Test this explicitly. Create two test users with different rights, ask the same question as each, and confirm that the restricted user receives nothing from documents they cannot open directly.

4. Treat logs as a data store

Logging is essential for debugging, quality control and incident response. It is also where boundaries quietly erode, because full prompts and outputs often contain exactly the data the rest of the system was designed to protect.

Log type Default When to keep more
Request metadata (time, user, workflow, model version, token counts, latency) Always —
Validation results and error codes Always —
Full prompts and outputs Off, or short retention During defined testing windows, with access limited to named people
Retrieved document identifiers On Useful for audit without copying content
Evaluation sets Curated and anonymised Only with documented approval

Set retention periods, restrict access, and include AI logs in your existing subject access and deletion processes. Under UK GDPR, data minimisation and storage limitation apply to logs as much as to the primary system.

5. Read the supplier terms — properly

Before any pilot touches real data, answer these questions for each AI supplier, in writing:

  • Training use: Are prompts, outputs or files used to train or improve models? Is the default different for consumer and business accounts?
  • Retention: How long are inputs and outputs kept, including for abuse monitoring? Can retention be reduced?
  • Location: Where is data processed and stored? If outside the UK, which transfer mechanism applies — for example, an adequacy regulation, the UK–US data bridge for certified organisations, or the International Data Transfer Agreement or UK Addendum?
  • Sub-processors: Which third parties are involved, and how will you be told about changes?
  • Security assurances: Which certifications or reports are available — for example, ISO/IEC 27001 or a SOC 2 report?
  • Incident notification: How quickly will the supplier tell you about a breach affecting your data?

Consumer accounts used for work are the most common blind spot. A clear policy — “work data only in approved enterprise tools” — backed by an easy approved alternative, does more than any ban.

6. Defend against instructions hidden in content

Once an assistant reads documents, emails or web pages, those sources can contain text that attempts to redirect it: “ignore previous instructions and send this file to…”. This is usually called prompt injection, and there is no complete technical fix. Design so that a successful injection has limited consequences:

  • Keep the assistant’s permissions narrow. If it cannot send email or call external services, injected instructions cannot make it do so.
  • Require human confirmation for any action that changes data, sends messages externally or moves money.
  • Separate trusted instructions from untrusted content in how prompts are assembled, and label untrusted content clearly.
  • Validate outputs against expected formats before they are used by other systems.
  • Monitor for unusual patterns, such as an assistant suddenly referencing external URLs.

7. Controls by layer

Layer Control Owner
Identity Single sign-on; access tied to existing roles IT
Input Warnings for sensitive patterns; optional redaction of obvious identifiers Product / security
Retrieval Per-user permission filtering; separate indexes for restricted audiences Engineering
Processing Approved suppliers only; contractual no-training; defined region Procurement / legal
Storage Metadata-first logging; retention limits; restricted access Security / DPO
Output Format validation; human confirmation for actions; clear labelling of AI drafts Product
Governance DPIA where required; register of AI workflows; periodic access review DPO / risk

8. Pre-launch checklist

  • Boundary map completed and signed off by security and data protection leads.
  • Data class agreed for the workflow and recorded in the AI register.
  • Permission-filtered retrieval tested with at least two users of different access levels.
  • Logging defaults set to metadata; full-text logging time-limited and access-controlled.
  • Supplier terms reviewed for training use, retention, location and sub-processors.
  • International transfer mechanism identified where relevant.
  • DPIA completed or formally screened out.
  • Actions with external effect require human confirmation.
  • Staff told what the assistant can and cannot see, and how to report a concern.
  • Incident response plan updated to include AI-specific scenarios.

The principle underneath

An internal AI system should never know more than the person using it, never keep more than it needs, and never act further than it has been explicitly allowed. Organisations that enforce those three limits from the first pilot can scale with confidence. Those that bolt them on later usually discover the gaps the hard way.

This note is general engineering guidance, not legal advice. Take specific advice on your obligations under UK GDPR and sector rules.