Regulated enterprises are adopting language models faster than they are governing them. The prompt is where the risk lives: it is the surface on which sensitive customer records, protected health information, and controlled government data are assembled and sent to a model that the enterprise does not own. This paper sets out the control requirements that financial services, healthcare, and government share, maps each to a gateway control that addresses it, and describes a deployment posture where regulated data never leaves the customer tenant. It covers data classification and class-based egress, redaction before any external call, and the hash-stamped audit record an examiner expects. It describes control intent rather than legal requirements, and it is not legal advice.
- 1.In regulated settings the governed object is the prompt, because the prompt is where sensitive data crosses the boundary to an external model.
- 2.Financial services, healthcare, and government share a common control core: residency, least privilege, redaction, auditability, retention, and human oversight.
- 3.Sector specifics differ, but they resolve to the same gateway controls applied with different parameters and retention periods.
- 4.Classification must precede egress: data is labeled, then class-based rules decide what may leave and what must be redacted first.
- 5.The record an examiner wants is a hash-stamped account of what was sent, by whom, and under which policy version, produced per request.
- 6.Customer-owned, in-tenant deployment keeps regulated data inside the enterprise boundary so context never leaves the tenant to be governed.
- 7.This paper describes control intent and is not legal advice; map every control to your own counsel and your own regulators.
Executive summary
In a regulated enterprise the model is not the asset that needs governing. The context is. Every prompt is a small act of data egress: an assembled package of system instructions, retrieved records, conversation history, and tool output that crosses from a controlled environment into a model the enterprise does not own and cannot fully see. When that package contains a customer's account history, a patient's record, or controlled government data, the prompt becomes the most sensitive and least governed data flow in the organization.
Examiners and auditors are already asking the question that follows: show me what you sent. Most enterprises cannot answer it. They can produce the application code and the model contract, but not a per-request record of which data fields reached which model, under which policy, authorized by whom. That gap is not a model problem. It is a control problem, and it sits at the boundary where context leaves the building.
This paper argues that the same gateway that controls and compresses context is the natural place to govern it. A boundary that already sees every request can classify the data in it, redact what must not leave, enforce class-based egress rules, record a tamper-evident account of what was sent, and keep that record for as long as the sector requires. It describes the control intent behind these mechanisms and maps them to the expectations of financial, healthcare, and government oversight. It is a description of control design, not a statement of legal obligation, and it is not legal advice.
I. Why regulated industries are different
Most enterprises treat an AI feature as a product decision. In a regulated industry it is also a data-handling decision, a record-keeping decision, and a supervisory decision, and those three frames change everything about how the feature must be built. The model is the same. The obligations around what reaches it are not.
The data is sensitive by default
A general enterprise can reason about which of its data is sensitive. A bank, a hospital, or a government agency starts from the opposite assumption: most of what flows through its systems is regulated until proven otherwise. Account numbers, balances, and transaction histories; diagnoses, medications, and clinical notes; case files and controlled program data. When an AI feature retrieves context, it is retrieving from stores that are sensitive by construction, and any of it can land in a prompt.
Someone will ask to see your work
Regulated firms operate under examination. A supervisor, an auditor, or an inspector can arrive and ask for evidence of how a control operated on a specific day for a specific record. An answer of 'the model decided' is not acceptable, and neither is an architecture that cannot reconstruct what happened. The cost of an unexplained model action in a regulated setting is not embarrassment. It is a finding, a remediation order, and sometimes a penalty.
Records must survive the request
In an ordinary application a request can be processed and forgotten. In regulated sectors the act of communicating, deciding, or advising frequently must be retained as a record for years. When a model participates in that act, the context it received is part of the record, and the enterprise needs to have kept it, not reconstructed it later from logs that were never designed to be evidence.
These three differences compound. Sensitive data, plus supervision, plus retention, means the prompt cannot be a transient detail of an application. It has to be a governed, recorded, defensible artifact. That is a higher bar than most AI features are built to clear, and it is the bar this paper is about.
III. Financial services
Financial firms bring three concerns to AI context: where regulated data is allowed to be, how models that influence decisions are governed, and what must be kept as a record. None of these are new. AI changes only the surface they apply to, moving it onto the prompt.
Residency and record-keeping expectations
Financial firms operate under data-residency commitments and under books-and-records expectations that require certain communications and decisions to be retained, complete and unaltered, for defined periods. When a model takes part in producing a communication or informing a decision, the context it received is part of that record. The control intent is to keep that context within an approved boundary and to retain a faithful copy of it, not to discover after an examination that it was sent to an external endpoint and never preserved.
Model risk discipline in the spirit of SR 11-7
Supervisory guidance on model risk management, in the spirit of the Federal Reserve and OCC SR 11-7 guidance, asks firms to understand, document, validate, and monitor the models that affect their decisions. Applied to language models, the discipline extends to the context pipeline: a model's behavior is a function of what it is shown, so governing the inputs is part of governing the model. A firm that cannot describe and reproduce the context its model received cannot claim to understand the model's behavior. The gateway's per-request record of inputs is, in this framing, model-risk evidence as much as it is a privacy control.
Books-and-records retention
Where a regulated communication or decision is produced with model assistance, retention obligations can attach to the surrounding record. The control intent is to retain the relevant context for the period the firm's record-keeping policy requires, under controls that prevent silent alteration, and to dispose of it on schedule rather than keeping everything forever or nothing at all.
A common gap is to validate the model and ignore the prompt. In a retrieval or agent system the prompt changes on every request, so the thing actually driving outputs is the context pipeline, not a frozen model artifact. Model risk discipline that does not cover inputs governs the least variable part of the system and misses the most variable.
IV. Healthcare and healthcare-adjacent
Healthcare adds a specific and well-known sensitivity: protected health information. The relevant control intents are familiar to anyone who has handled clinical data, and they translate directly onto the prompt. The following describes control intent for handling such data and is not legal advice; covered entities and their partners should map these intents to their own counsel and obligations.
Protected health information in the prompt
When an AI feature retrieves from clinical systems, the context it assembles can contain protected health information: identifiers, diagnoses, medications, and notes. The boundary question is whether that information needs to reach the model at all to accomplish the task, and if so, in what reduced form. The prompt is the place to ask and answer that question, because it is the last point the enterprise controls before the data leaves.
The minimum-necessary principle
A long-standing principle in handling protected health information is to use or disclose only the minimum necessary for the purpose at hand. This maps almost exactly onto context discipline. A task that needs a medication list does not need the full chart; a summarization that needs clinical facts may not need direct identifiers. The control intent is to shape the context down to what the task requires before it leaves the boundary, which is the same discipline that controls cost, applied for a different reason.
De-identification and masking
Where the task allows, removing or masking direct identifiers before context leaves the boundary reduces exposure. The control intent is class-based: identifier fields are recognized, then redacted or tokenized, so the model receives the clinical signal the task needs without the identity it does not. The gateway is a natural place to enforce this because it sees the assembled context before egress and can apply the rule consistently across every feature.
Business-associate considerations
When a third party processes protected health information on behalf of a covered entity, contractual and control expectations attach to that processor. An external model endpoint can fall into this frame depending on the arrangement. The control intent is to keep regulated data inside the customer boundary wherever possible, and where an external call is genuinely required, to minimize, redact, and record it so the disclosure is deliberate and accounted for rather than incidental. The specifics are a matter for counsel and contract, not for this paper.
V. Government and defense-adjacent
Government and defense-adjacent work raises the bar on where data may physically reside, who may operate the system, and how the supply chain behind it is assured. The AI-context controls are the same in shape, but the tolerance for data leaving an approved boundary is lower, sometimes zero.
Data sovereignty
Public-sector data is frequently bound to a jurisdiction and to an approved environment. The control intent is that context never crosses a sovereignty boundary it is not permitted to cross. That is an argument against any architecture where prompts are sent to a shared, externally operated endpoint outside the approved environment, and an argument for keeping the governing boundary inside the tenant.
In-tenant deployment
The strongest way to honor sovereignty and residency is for the governing layer to run inside the customer's own environment, so regulated context is classified, redacted, and recorded without ever leaving the tenant to be governed. A gateway that runs as customer-owned infrastructure inside an approved cloud environment keeps the control point and the data on the same side of the boundary.
Supply-chain assurance
Public-sector buyers ask not only what a system does but what it is built from and who can touch it. The control intent is transparency over the components, dependencies, and operators in the path that context travels. A governing layer that is deployed as inspectable, customer-operated infrastructure is easier to assure than an opaque external service.
An authorization-to-operate mindset
Public-sector deployment often runs through an authorization process in which controls are documented, assessed, and continuously monitored, in the spirit of frameworks such as FedRAMP and the control families behind it. A gateway designed for this setting treats its controls as evidence to be presented: documented behavior, recorded enforcement, and monitorable operation, so it can take its place inside an authorization package rather than sitting outside the assessed boundary.
VI. A control mapping
The sectors differ in parameters, but their AI-context requirements resolve to a small set of gateway controls. The table below maps each shared regulated requirement to the control that addresses it. It is a design mapping, not a compliance certification, and each row should be validated against the enterprise's own obligations.
| Regulated requirement | Gateway control that addresses it |
|---|---|
| Data residency / sovereignty | In-tenant deployment so context is governed inside the customer boundary and never egresses to be processed |
| Redaction of sensitive fields | Class-based redaction and tokenization applied to the assembled context before any external call |
| Least-privilege model access | Per-workflow policy scoping which data classes, tools, and model endpoints a request may reach |
| Audit trail | Hash-stamped per-request record of what was sent, by whom, when, and under which policy version |
| Retention | Configurable retention and disposal of context records aligned to the sector record-keeping period |
| Human approval | Policy-triggered hold that routes qualifying requests to a person for review before egress or action |
Reading the table top to bottom describes a single boundary doing one job: deciding, on every request, what may leave, in what form, with what record, and under whose authority. The sector-specific work is parameterizing each control, not building six different systems.
VII. Data classification and redaction
Governance of context begins with knowing what the context contains. A boundary that cannot tell an account number from a product name cannot make a defensible egress decision. Classification is therefore the first control, and redaction is what classification enables.
Classify first
Before any egress decision, the assembled context is examined and its elements labeled by class: public, internal, confidential, and regulated categories such as personal, financial, or health data. Classification can draw on the source system the data came from, on pattern recognition for structured identifiers, and on policy labels already attached upstream. The output is a context in which every span carries a class, so the rules that follow have something to act on.
Enforce class-based egress rules
With classes assigned, egress becomes a policy decision rather than a guess. A rule states what each class may do at the boundary: pass unchanged, pass only after redaction or tokenization, stay inside the tenant entirely, or trigger a human hold. The same context can be treated differently depending on the destination, so an internal model in the tenant may receive what an external endpoint may not.
| Data class | Internal model (in tenant) | External model endpoint |
|---|---|---|
| Public / internal | Allow | Allow |
| Confidential business | Allow | Allow after review policy |
| Personal identifiers | Allow | Redact or tokenize before send |
| Financial account data | Allow with scope | Redact, or block per policy |
| Health information | Allow with scope | Minimize and redact, or block per policy |
Redact before any external call
Where a class is permitted to leave only in reduced form, redaction happens at the boundary, before the request is sent, not after the fact in a log. Direct identifiers are masked or replaced with reversible tokens held inside the tenant, so the model receives the signal the task needs without the sensitive value. Because this happens in one place, it is consistent across every feature and provable on every request, which is exactly what an after-the-fact log cannot offer.
VIII. Auditability for examiners
The defining test of a regulated AI system is not how well it performs on a good day. It is whether it can be explained on a bad one. When an examiner asks what happened, the enterprise needs a record that was designed to answer, not application logs that were designed for debugging.
What an examiner asks for
The questions an examiner brings are concrete and specific to a record and a date:
- On this date, for this customer or patient, what context did the model receive?
- Which data fields left the boundary, and which were redacted before they did?
- Under which policy version was that decision made, and who authorized it?
- Can you show the record has not been altered since it was created?
- How long is this record kept, and how is it disposed of when that period ends?
Producing a hash-stamped record
The control intent is to write, for every request, a record that captures the egress decision in evidentiary form: the policy version applied, the classification result, the fields redacted, the destination model, the authorizing identity, and a cryptographic hash of the exact context sent. Storing the hash rather than re-deriving it later means the enterprise can demonstrate that the record corresponds to what was actually sent and has not changed since. The record is produced as the request is processed, not reconstructed afterward, because a reconstruction is an argument and a contemporaneous hash-stamped record is evidence.
Application logs are written for the team that operates the system and are routinely rotated, sampled, and reformatted. A regulated record is written for someone outside the team who will read it under adversarial conditions years later. The two have different requirements for completeness, integrity, and retention, and conflating them is how enterprises end up unable to answer the one question that matters.
IX. Deployment posture
Every control in this paper depends on one architectural choice: where the governing boundary runs. If the boundary that classifies, redacts, and records sits outside the enterprise, then regulated context has already left the building before it is governed, and the controls are applied too late to matter.
Customer-owned, in-tenant deployment
The posture that satisfies residency, sovereignty, and business-associate concerns at once is to run the gateway as customer-owned infrastructure inside the enterprise's own cloud tenant. Context is classified, redacted, and recorded inside the boundary, and only what policy permits, in the form policy permits, is sent onward. Regulated data does not leave the tenant in order to be governed; the governance comes to the data.
Azure-native controls
Running inside the customer's Azure environment means the gateway inherits the controls the enterprise already operates and has already had assessed: identity and access management, network isolation and private connectivity, key management for the tokenization secrets, encryption at rest and in transit, and the tenant's own logging and monitoring. The audit records the gateway produces live in the customer's own storage under the customer's own retention policy. Nothing about the governing layer asks the enterprise to trust a new external party with its most sensitive flow.
Why posture beats promises
An external service can promise not to retain or misuse what it receives, and an enterprise can paper that promise with a contract. In-tenant deployment removes the need to rely on the promise for the most sensitive step, because the data does not leave the boundary to reach the control. For sovereignty-bound and high-assurance work, that difference is frequently the deciding factor between a posture that can be authorized and one that cannot.
X. An adoption checklist
Adopting context governance in a regulated setting is a sequence, and each step makes the next defensible. The path below moves from visibility to enforcement to evidence without requiring a rewrite of the applications it governs.
- 1Place the boundary inside the tenant. Deploy the gateway as customer-owned infrastructure in your own cloud environment so context is governed without leaving it.
- 2Observe before enforcing. Route traffic through the gateway in a recording-only mode to learn what data classes actually appear in prompts, by workflow, before changing any behavior.
- 3Classify the context. Turn on classification and confirm that regulated fields are recognized, so egress rules have accurate labels to act on.
- 4Define class-based egress policy. State, per data class and per destination, what may pass, what must be redacted or tokenized, what stays in tenant, and what triggers a human hold.
- 5Enable redaction at the boundary. Apply masking and tokenization before any external call, with tokenization secrets held inside the tenant.
- 6Turn on hash-stamped records. Write a per-request evidentiary record capturing policy version, classification, redactions, destination, authorizer, and a hash of the sent context.
- 7Set retention to the sector requirement. Configure how long records are kept and how they are disposed of, aligned to your record-keeping obligations and confirmed with counsel.
- 8Add human oversight where decisions carry weight. Route qualifying requests to a reviewer before egress or action, and record the approval as part of the record.
- 9Rehearse the examination. Pull a record for a specific date and request and confirm you can answer every question in Section VIII end to end before anyone asks you to.
The order matters. Visibility precedes classification, classification precedes egress rules, egress rules precede redaction, and all of it precedes the record that proves it happened. An enterprise that follows the sequence ends with controls it can demonstrate, not just describe.
XI. Conclusion
In a regulated industry the hardest question about AI is not whether the model is accurate. It is whether the enterprise can control what the model sees, prevent what should not leave from leaving, and prove, long after the fact, exactly what happened on a given request. Those are control questions, and they all land on the same surface: the prompt, the moment context crosses the boundary to an external model.
A gateway placed at that boundary, inside the customer's own tenant, turns the prompt from the least governed flow in the enterprise into the best governed one. It classifies what the context contains, redacts what must not leave, enforces who may reach what, records what was sent in tamper-evident form, keeps that record for as long as the sector requires, and holds for a human where a person must decide. The same boundary that controls and compresses context is the natural place to govern it, because it is the one place every request already passes.
The enterprises that place that boundary early will not only deploy AI faster in regulated settings. They will be the ones able to sit across from an examiner and answer the only question that ultimately matters: show me what you sent.
This paper describes control intent and design patterns for governing AI context in regulated settings. It is not legal advice and does not state the legal requirements of any regulation. References to frameworks and guidance describe the spirit of widely cited public sources, not the specific obligations of any enterprise. Map every control to your own regulators, counsel, and contractual commitments before relying on it.
References
- [1]NIST, Artificial Intelligence Risk Management Framework (AI RMF 1.0), NIST AI 100-1, 2023.
- [2]NIST, Privacy Framework: A Tool for Improving Privacy through Enterprise Risk Management, Version 1.0, 2020.
- [3]U.S. Department of Health and Human Services, HIPAA Security Rule, 45 CFR Part 160 and Subparts A and C of Part 164.
- [4]Board of Governors of the Federal Reserve System and Office of the Comptroller of the Currency, Supervisory Guidance on Model Risk Management, SR 11-7 / OCC 2011-12, 2011.
- [5]FedRAMP, Federal Risk and Authorization Management Program, security assessment and authorization documentation, fedramp.gov.
- [6]ISO/IEC 27001, Information security, cybersecurity and privacy protection: Information security management systems: Requirements.

