Implementation Guide | Financial Services

Preventing NPI Leakage in Bank LLM Prompts

To prevent NPI leakage in LLM prompts, treat it as an execution-path problem. Map every point where nonpublic personal information enters or leaves the prompt path: user input, retrieved context, tool and MCP calls, prompt assembly, and model output. Enforce detection and policy at runtime at each point, choosing allow, redact, block or escalate by data type and destination. Record each decision as evidence, so you can show that the control operated before data left the boundary.

Map where NPI enters and leaves the prompt path

  1. 1

    User input

    Employees and applications paste or generate text containing account numbers, identifiers or customer narratives. Screen before submission to the model, and redact or block according to policy.

  2. 2

    Retrieved context

    RAG documents, email bodies and fetched web pages are added to the prompt without the user typing them. Screen this content as well, and enforce per-user entitlements at retrieval time.

  3. 3

    Tool and MCP calls

    Agents build tool arguments and receive tool output. Screen both directions, and require human approval for privileged operations.

  4. 4

    Prompt assembly and shared state

    Inference caches and shared model state can leak across users or tenants. Test isolation at assembly time and review shared components.

  5. 5

    Model response

    A response can repeat sensitive context or disclose it after an injection. Screen output before it reaches users or downstream tools.

  6. 6

    Provider boundary

    Know which destination each request is going to. Interagency third-party guidance says effective contracts typically restrict a third party and its subcontractors to using or disclosing customer information only as necessary for the contracted activities or legal compliance.

Specify the evidence before an examiner asks

  • Requester identity, application or agent, and timestamp for every request
  • Destination model or tool, and the deployment boundary it sits in
  • Data classes detected and the location of each detection in the prompt, context, tool call or response
  • Policy rule and version applied, and the action taken: allow, redact, block or escalate
  • For escalations, the approver, the decision and the time taken
  • Retention period and data residency settings, plus periodic test results with false positive and miss rates

Why review after the fact does not stop a leak

Policy documents, employee training and log review all operate on a different timeline from a prompt. Once a prompt containing customer account details has reached a third-party model provider, no later review can recall it. Those measures shape behavior in general, but none of them acts on a specific request at the moment it is made.

The practical response is to move the decision into the execution path. The check happens before the prompt reaches the model, before a tool call executes, and before a response reaches a user or a downstream system. This also fits the security posture OWASP recommends: treat the model as an untrusted component and place controls at the trust boundaries around it, not inside the prompt. Prompt injection is a documented route to sensitive-data disclosure, and it is unclear whether fool-proof prevention exists. A system prompt that tells the model not to reveal customer data is not a control.

Define detection rules and accept their limits

Detection works differently for structured and unstructured data. Structured identifiers such as account numbers or tax identifiers can be matched by pattern, with validation to cut false positives. Unstructured text is harder. A customer name next to a balance in a call note, or a loan narrative pasted into a chat window, may not match any pattern, and classifiers can both miss it and flag harmless text.

OWASP describes classifier screening of user prompts and retrieved or tool-returned content as an illustrative layer, not a complete defense. Design for that. Scope rules by context, since the same text may be acceptable for an internal model approved for that data class and unacceptable for an external one. Build labeled test sets from your own prompt traffic. Track false positives and misses as operating metrics. Run regular penetration testing and breach simulation that treats the model as an untrusted user, including tests for cross-user leakage at retrieval and prompt assembly.

Choose allow, redact, block or escalate

The action should depend on both the data type and the context. Which NPI types map to which actions is a design decision that needs legal, privacy and risk input. Regulation P limits the disclosure of NPI to nonaffiliated third parties and limits redisclosure and reuse, so counsel should decide how those limits apply to prompts sent to external providers. The pattern below is a starting point.

  • Allow: Content with no NPI, or NPI going to an approved internal model for a data class and role the policy permits. Record the decision as evidence even when nothing is changed.
  • Redact: NPI that is incidental to the task, such as a name or account number in a document being summarized. Replace it with consistent placeholders so the output stays useful.
  • Block: High-sensitivity identifiers headed to a destination with no approved terms, unknown destinations, or output that would expose NPI to an unauthorized recipient. Default to block for destinations not on the approved list.
  • Escalate: Privileged tool calls and ambiguous detections where automated rules are not sufficient. Route to a human approver and record who decided and why.

Where Trussed fits

Trussed enforces policy in the execution path across models, agents, tools and MCP servers, with allow, redact, block, rate limit and escalate actions applied to individual interactions and tool calls. Enforcement is at runtime, not reviewed after the fact. Each enforcement decision produces audit-ready evidence, mapped to frameworks including NYDFS and NIST. Trussed can be deployed self-managed in the customer cloud, with configurable retention and data residency, so evidence can stay within the institution's boundary.

In production, Trussed has run 100+ models under one policy plane and has 18+ months of continuous production in a regulated enterprise. Its customer base is deepest in insurance. The approach in this guide does not depend on any one product. The inventory, rules, action matrix and evidence schema are the same whichever tooling enforces them.

Where NPI can enter or leave the prompt path

User input

Pasted account details and customer identifiers

Retrieved context

RAG documents, emails and web content added to the prompt

Tool and MCP calls

Arguments sent to tools and output returned to the model

Model response

Output delivered to users or passed to downstream tools

Review your prompt path with an expert

Walk through your entry points, action rules and evidence requirements, and see how enforcement in the execution path produces audit-ready evidence.

Talk to an Expert