Skip to content
All posts

PII detection for financial services AI: PCI-DSS, GLBA, and audit trail mapping

Updated May 11, 2026

TL;DR: If your financial AI system routes PII detection through a vendor-hosted gateway, your audit logs live on a vendor's server, not yours. That structural gap surfaces when PCI-DSS QSAs or GLBA examiners ask for evidence you can't produce independently. Prediction Guard is a self-hosted control plane that enforces deterministic PII policies (block, mask, redact) at the API level, generates NIST AI Risk Management Framework (AI RMF)-aligned logs inside your own infrastructure, and produces an AIBOM your compliance team can hand directly to an examiner. PCI-DSS Requirement 3.4.1 requires institutions to mask PANs when displayed, Requirement 3.5.1 requires them to render cardholder data unreadable wherever they store it, and GLBA's Safeguards Rule covers SSNs, account numbers, and transaction histories. All three demand that you control where enforcement happens and where evidence lives.

The biggest compliance risk in your financial AI pipeline isn't the model. It's the vendor-hosted gateway filtering its inputs, because when that gateway detects a Social Security number or a primary account number (PAN), the log proving that detection happened sits on a vendor's server, not yours. During a PCI-DSS Qualified Security Assessor examination or GLBA review, you can't produce records you don't control.

Financial institutions are deploying LLMs for customer service, risk assessment, and document processing at a pace that outstrips governance. The engineering teams moving fastest are often the ones routing regulated data through third-party endpoints without a structured paper trail.

We'll evaluate what PCI-DSS and GLBA actually require from your AI stack, how to enforce those requirements deterministically, and how to generate audit evidence that survives a regulatory examination.

Why PII detection matters for financial services AI deployments

AI systems are probabilistic. Regulations governing financial data are not. PCI-DSS and GLBA both assume deterministic data handling: cardholder data is either masked or it isn't, nonpublic personal information is either protected or it isn't. Bridging that gap requires enforcing PII policies at the system level, not relying on model behavior to self-govern.

The OWASP LLM Top Ten documents ten categories of risk specific to LLM deployments, and several map directly to financial PII exposure. Prompt engineering and perimeter filters won't solve this structurally. You need system-level enforcement that intercepts every AI input and output, regardless of which model, framework, or engineer produced the request.

Prediction Guard's EP04 on OWASP guidance walks through how the OWASP LLM Top Ten risk categories map to system-level enforcement controls in practice, covering how prompt injection risks, sensitive information disclosure, and supply chain vulnerabilities translate from framework guidance to operational configuration.

Three structural PII risks define the compliance gap in financial AI deployments:

  • Audit gaps: Engineering teams deploy AI faster than governance processes capture it. When a QSA or GLBA examiner asks for your AI asset inventory, you're responding with a manually updated spreadsheet, not a machine-readable AIBOM. That's not governance, it's optimism.
  • Probabilistic outputs, deterministic regulations: AI models produce variable outputs from the same input. PCI-DSS and GLBA require deterministic data handling. You can't satisfy compliance requirements by asking the model to follow guidelines. You need system-level enforcement.
  • Fragmented detection: Different tools apply different PII definitions across customer service, underwriting, and document processing. When detection events live in separate vendor dashboards, you're manually assembling your audit trail under examination pressure instead of producing it on demand.

Securing financial PII in AI agents

Retrieval-augmented AI applications, including RAG, where the system pulls documents from an external knowledge base at query time to ground responses in current or proprietary data, introduce a second exposure vector that prompt filtering alone misses. The same pattern applies to non-RAG agents that retrieve from internal tools, MCP servers, or document stores at runtime.

When the AI application pulls documents from a knowledge base, those documents may contain PII that was never subject to access controls because no one anticipated they would be fed directly to a model. Worse, attackers can poison document repositories to manipulate retrieval results, causing the application to surface PII to unauthorized users or bypass redaction policies entirely.

PCI-DSS compliance requirements for payment card data in AI applications

The PCI Security Standards Council defines cardholder data as the PAN, cardholder name, expiration date, and service code when stored alongside the full PAN. Sensitive Authentication Data (SAD), which includes CVV (Card Verification Value) and CVC (Card Verification Code) codes, full magnetic stripe data, and PIN values, is a separate category that must not be stored after authorization under any circumstance, even if encrypted.

However, per the PCI Security Standards Council document library, PCI-DSS 4.0.1 clarifies that Requirements 3.3.1 and 3.3.2 do not apply to issuers and companies that support issuing services with a legitimate and documented business need to store SAD. Any AI application that accepts, processes, or returns unstructured text in a payment-adjacent workflow is in scope because PANs appear in natural language as readily as they appear in database fields.

PCI-DSS mandates for cardholder data

The following table maps PCI-DSS v4.0.1 to AI workflows through the key applicable requirements:

  • Requirement 3.4.1: PANs must be masked when displayed, with the first six and last four digits as the maximum visible range.
  • Requirement 3.5.1: PANs must be rendered unreadable wherever stored, using strong cryptography with associated key management processes and procedures, truncation, tokenization, or one-way hashes based on strong cryptography of the entire PAN.
  • Requirement 3.3.1: SAD (including CVV/CVC and PIN values) must not be stored after authorization, even if encrypted, and all SAD must be made unrecoverable after authorization is complete.
  • Requirement 10 (specifically 10.5.1): Tamper-proof, timestamped audit logs retained for at least 12 months, with three months of immediate access, covering every system interaction with cardholder data.

For AI inputs and outputs, these requirements apply to every AI interaction that touches cardholder data, including conversational exchanges, document processing outputs, and RAG-retrieved content.

Detecting payment card numbers in prompts and outputs

For PANs, rule-based detection uses the Luhn checksum, a mathematical property all legitimate payment card numbers satisfy, giving high-precision detection without reliance on model behavior

Detection method Strength Financial PII fit Limitation
Rule-based (regex + Luhn) Structured patterns, high throughput PANs, SSNs, account numbers Fails on conversational formatting
AI-native detection Handles semantic variation and conversational formatting that rule-based patterns miss Mixed-content documents where entity boundaries are ambiguous Produces variable outputs from identical inputs, so it cannot satisfy deterministic enforcement requirements under PCI-DSS or GLBA

The practical answer for financial deployments is a hybrid pipeline: rule-based detection first for throughput and precision, then NER for unstructured residuals, with the entire detection stack enforced at the control plane level rather than delegated to the application code.

PII protection: redaction vs. blocking

When PII is detected in a financial AI workflow, the control plane executes one of five configurable AI governance policy actions:

  1. Block: Prevents the request from reaching the model entirely. Use when inputs contain full PANs or CVVs, since no legitimate use case requires the model to process raw cardholder data.
  2. Redact: Replaces detected PII with a labeled placeholder (for example, [REDACTED_PAN]). Preserves conversational context while eliminating the raw sensitive value.
  3. Mask: Partially obscures PII while preserving format (for example, ****-****-****-1234). Useful for audit log readability and downstream display contexts.
  4. Replace with synthetic values: Substitutes real PII with structurally valid but fictitious data. Relevant for testing and development environments.
  5. Log only: Records the detection event without modifying input. Not permitted for PCI-DSS cardholder data workflows where retention of full PAN or CVV after authorization violates Requirement 3.3.1. Appropriate only for monitoring contexts outside the payment card scope.
    GRC teams configure these actions in the Prediction Guard Admin console without requiring code changes from engineering.

Protecting GLBA PII in financial AI

While PCI-DSS focuses on payment card data, the FTC GLBA Safeguards Rule covers a broader category: nonpublic personal information (NPI), defined as any information a consumer provides to obtain a financial product, any information from financial transactions, and any information obtained in connection with providing a financial product. That scope encompasses virtually everything a financial AI deployment might process.

Identifying GLBA-protected PII

Under the FTC's NPI definition, the following financial identifiers require detection and control in AI workflows:

  • Bank account numbers and routing numbers
  • Transaction histories, purchase records, and loan balances
  • Social Security numbers and tax identification numbers
  • Credit histories and credit scores
  • Loan application data, including income and employment information

The challenge for AI application workflows is that this data rarely appears in isolation. A risk assessment model processing underwriting documents encounters SSNs embedded in paragraphs alongside account balances and credit history summaries. Detection must handle multi-entity documents, not just single-field lookups. Prediction Guard's data extraction and factuality checks documentation covers how structured extraction patterns identify and classify financial entities before they reach the model.

Preparing GLBA risk audit evidence

An AIBOM serves as the foundational asset register for GLBA audits. The NIST AI RMF's MAP function is built on the principle that context and inventory must precede risk assessment: without a complete inventory of AI systems, the Measure and Manage functions have no defined scope to operate against.

An AIBOM is a machine-readable inventory in CycloneDX format listing every model, tool, dataset, and dependency in your AI system, giving GLBA examiners the structured evidence they need when they ask what AI you're running and where. Prediction Guard generates AIBOMs covering every component, demonstrating:

  • Every model processing NPI is identified and documented
  • Each model in the inventory can be referenced when reviewing applied governance policies
  • Data governance controls are applied consistently across the AI asset inventory

Third-party AI audit trail risks

Hyperscaler AI governance tools create a specific challenge for GLBA compliance: governance configuration is tied to the provider's infrastructure and isn't portable across cloud environments. When governance events are stored outside your own infrastructure, providing evidence of control to a GLBA examiner may depend on vendor contractual terms rather than direct infrastructure ownership. That distinction matters when examiners ask about retention guarantees, integrity controls, and log accessibility.

Prediction Guard's EP06 on harmonizing AI tools covers the structural problem of fragmented AI ecosystems, and Microsoft Copilot security risks post details how data governance gaps emerge when AI governance is tied to a single vendor's proprietary toolchain.

Prepare for regulatory audits with traceability

Audit readiness for financial AI is an evidence generation architecture, not a documentation exercise. The difference between a financial institution that passes an AI-related regulatory examination and one that receives findings often comes down to whether PII detection events produced structured, immutable records at enforcement time or were reconstructed from fragmented logs after the fact.

PII audit trail requirements

When an examiner audits your AI-enabled workflows, they won't ask whether you have a policy. They'll ask for evidence that your AI governance policy was enforced on every interaction and that the enforcement record is tamper-proof, timestamped, and accessible. Each PII detection event log must answer five questions:

  1. When did it happen (timestamp)?
  2. What was detected (PII type)?
  3. Where did it originate (source system, user or session ID)?
  4. What policy governed it (policy ID, version)?
  5. What action was taken (block, mask, redact, or replace with synthetic values)?

PCI-DSS Requirement 10.5.1 adds a retention obligation: logs accessible for at least three months with full 12-month retention. For GLBA, the FTC Safeguards Rule's administrative and technical safeguard requirements extend this across the broader information security program. Institutions that rely on vendor-held audit logs face a practical challenge: demonstrating independent control over retention schedules, integrity guarantees, and accessibility to an examiner who can't inspect infrastructure you don't operate.

Structured logging for PII detection events

You need native Security Information and Event Management (SIEM) integration to move from an auditable system to an actively monitored one. Prediction Guard forwards detection events natively into Splunk and Datadog, and supports generic syslog forwarding for other SIEM and Security Orchestration, Automation and Response (SOAR) platforms.

The distinction matters for financial security operations: audit log retention satisfies the compliance record requirement, but active SIEM forwarding means your security team investigates PII detection events in the same platform where they handle every other security alert, with the same escalation workflows and incident response playbooks already in place.

Prediction Guard's EP12 on self-hosted sovereignty covers how audit log generation and retention within the customer's own infrastructure differ structurally from external governance approaches.

Secure data residency for LLM audits

Self-hosted deployment provides the clearest structural guarantee that your evidence chain is yours to produce, because enforcement logic and audit records stay inside your own infrastructure boundary by design rather than by contract.

PG Managed Cloud is offered as a hosted option for customers who don't deploy self-hosted, but the institutional burden of demonstrating control over records generated outside your own environment is materially higher when examiners ask for evidence.

This architecture requires infrastructure investment. The relevant comparison isn't self-hosted versus zero-cost. It's infrastructure investment against the cost of a GLBA enforcement action, a PCI-DSS finding, or the engineering time to reconstruct a fragmented evidence trail under examination pressure. Prediction Guard's EP02 on air-gapped AI deployments addresses these deployment architecture trade-offs directly.

Implementing PII controls for financial AI

Translating PCI-DSS and GLBA mandates into operational configuration requires architectural, API, and policy design choices that determine whether enforcement is genuinely system-level or dependent on developer adherence.

Control plane architecture for PII detection

The difference between routing AI traffic through an external gateway and enforcing policy via a self-hosted control plane is architectural, not incremental.

External gateway approach: A security guard stationed at the entrance checks traffic as it passes through, logs observations, and sends reports to their own management. When you need those records later, you submit a request to the vendor.

Self-hosted control plane approach: Policy enforcement embedded directly into the infrastructure. Every AI interaction passes through governance logic you own, generating audit records stored under your own retention policies within your own systems.

For PCI-DSS and GLBA compliance, this architectural choice determines whether you produce your evidence trail directly or rely on a vendor to provide it. Prediction Guard's EP10 on composable AI and the golden path for AI post explain how a control plane governing open-source, self-hosted, and third-party models through a unified API provides model flexibility without rebuilding governance every time the underlying model changes.

API governance for financial PII

Integrating with the control plane primarily requires changing the API base URL, with minimal additional configuration based on your existing integration pattern. The control plane implements the OpenAI (/chat/completions) and Anthropic (/messages) API specifications. The standard endpoints applications use to send prompts and receive responses, so existing codebases and SDK integrations require minimal structural modification to gain system-level PII enforcement.

The LangChain integration documentation demonstrates how existing LangChain pipelines connect to the control plane endpoint with minimal configuration adjustments. Prediction Guard's accessing LLMs documentation provides endpoint configuration details. Developers continue shipping features with familiar libraries. GRC teams configure PII policies through the Admin console.

The control plane applies those policies to every request, regardless of which developer, framework, or model generated it. This separation of duties eliminates reliance on developers following documented guidelines, replacing it with system-level enforcement that operates independently of developer awareness or intent.

Portable PII policies for financial AI

A PII detection policy configured in Prediction Guard remains in force across the control plane regardless of which underlying model handles the request. Swapping model versions, adding new AI model endpoints, or migrating workloads between infrastructure environments doesn't disrupt governance. The policy enforces consistently across every model interaction within the governed system. Prediction Guard's decoding the LLM landscape post examines model selection trade-offs in regulated environments where portability and auditability are requirements, not options.

Applying NIST AI RMF to financial AI risk

The NIST AI Risk Management Framework defines four core functions: Govern, Map, Measure, and Manage. For financial AI deployments, each function maps directly to a specific PII detection and governance capability. Here's how Prediction Guard's control plane capabilities map to specific NIST AI RMF functions and OWASP LLM Top Ten items:

Prediction Guard capability NIST AI RMF function OWASP LLM item
System-level PII detection and enforcement Govern, Manage LLM02: Sensitive Information Disclosure
AIBOM generation (CycloneDX) Map, Govern LLM03: Supply Chain Vulnerabilities
SIEM-integrated detection event logging Measure, Manage LLM02: Sensitive Information Disclosure
Prompt injection defense Map, Manage LLM01: Prompt Injection
Factual consistency checking Measure LLM09: Misinformation
AI asset vulnerability scanning Map, Measure LLM03: Supply Chain Vulnerabilities

The NIST AI RMF defines the Map function as establishing the contextual understanding of where AI system risks and impacts originate within a deployment. For PII detection, mapping means identifying every point in an AI workflow where regulated financial data could enter or exit: user inputs, retrieved documents, API calls to external tools, model outputs, and agent handoffs.

The Measure function then tracks detection event rates, false positive and false negative metrics by PII type, and action distribution across blocking, masking, and redaction. The Manage function uses those measurements to adjust controls: when detection rates for account numbers spike unexpectedly, the response workflow is already defined in the control plane's AI governance policy rather than requiring manual intervention.

Advisory guidelines enforced by developer review aren't controls under NIST AI RMF. System-level PII policy enforcement satisfies the Govern function because it operationalizes accountability at the enforcement point. Every blocked or redacted interaction generates a structured record the governance program can reference as evidence of operational oversight.

The Prediction Guard system-level security post explains how governance policies configured in the Admin console generate structured enforcement records supporting this forward-and-backward traceability.

Deploying PII safeguards in banking AI

The following use cases illustrate how PCI-DSS and GLBA enforcement requirements translate to control plane configuration in three common financial AI deployment patterns: customer service, underwriting risk assessment, and unstructured document processing. Each scenario maps a specific regulatory obligation to a deterministic policy action enforced at the system level.

Customer service with PCI-DSS controls

When a customer message contains a full PAN in a disputed-charge inquiry, the PAN reaches the model unless the control plane intercepts it. No audit record is generated for that exposure unless governance is enforced before the request reaches the model.

With Prediction Guard's control plane:

  • Intercepts the input before it reaches the model
  • Detects and redacts the PAN to [REDACTED_PAN] via Luhn-validated pattern matching
  • Processes the modified input through the model
  • Logs the detection event with timestamp, policy ID, and action taken

See Prediction Guard's data chat with LLMs documentation for conversational AI integration patterns, and prompt injection detection documentation for concurrent instruction override protections.

GLBA-compliant AI risk assessment

Underwriting workflows that use AI to synthesize credit applications represent a common scenario where SSNs, income histories, account balances, and employment records may be present in model inputs, all of which fall within GLBA NPI classification.

Control plane configuration for this use case:

  • Masks SSNs (preserving format for model context while obscuring the value)
  • Blocks raw account numbers from appearing in model outputs
  • Logs every detection event against the specific GLBA policy governing each NPI category

Prediction Guard's EP09 on AI document processing covers how document processing pipelines handle multi-entity, multi-format financial documents, including the extraction and governance patterns relevant to underwriting workflows.

Auditable PII in financial documents

Processing scanned PDFs and unstructured document repositories adds detection complexity that structured input filtering alone doesn't address. OCR output from scanned financial statements contains PII in positions and formats that vary by document type and scan quality. A hybrid pattern-matching and contextual detection approach handles this variability, but enforcement must apply those detections before extracted text enters the AI model's context window. Prediction Guard's vision documentation covers how governance enforcement applies to extracted document content as well as raw inputs.

Book a deployment scoping call to assess whether self-hosted deployment fits your infrastructure and compliance requirements.

FAQs

Does a self-hosted control plane keep all PII detection logic within my infrastructure?

Yes, for self-hosted deployments within the customer's own infrastructure. The control plane enforces PII detection policies, generates audit logs, and stores all detection records within the customer's own environment, with no data transiting Prediction Guard's infrastructure.

What does an audit-ready PII detection log contain for a regulatory exam?

Each PII detection event log captures a timestamp, source identifier, PII type detected, policy ID triggered, action taken (block, mask, redact, or replace with synthetic values), and the model endpoint involved, retained for at least 12 months per PCI-DSS Requirement 10.5.1. These logs forward natively into Splunk, Datadog, or generic SIEM platforms, keeping the evidence trail within the security team's existing investigation workflows.

Can Prediction Guard govern third-party AI APIs?

Yes. Control plane governs both self-hosted and external endpoints (including hyperscaler models) under unified policies. Your existing OpenAI-compatible or Anthropic-compatible codebases route through the control plane without rebuilding their toolchain.

What actions can the control plane take when PII is detected in an AI input?

The control plane supports five configurable deterministic actions: block, mask, redact, replace with synthetic values, or log only. For PCI-DSS in-scope workflows handling PANs and SAD, block or redact are the appropriate policy actions. Log-only is not a compliant action for cardholder data in payment-adjacent workflows.

If you're ready to assess whether a self-hosted control plane fits your infrastructure and compliance requirements, visit predictionguard.com to schedule a deployment scoping call or request the NIST AI RMF capability mapping whitepaper to review which framework functions Prediction Guard addresses at the system level.

Key terms glossary

AIBOM (AI Bill of Materials): A structured, machine-readable inventory of every model, tool, dataset, and dependency in an AI system, exportable in CycloneDX format, an open OWASP standard for software and AI bill of materials that produces a vendor-neutral, schema-validated file examiners and automated tooling can parse without proprietary software. For GLBA audits, an AIBOM serves as the foundational asset register demonstrating complete visibility over AI systems handling nonpublic personal information.

Control plane: The governance infrastructure that intercepts every AI input and output, applies configured AI governance policies (including PII detection and redaction), and generates structured audit logs. A self-hosted control plane runs inside the customer's own infrastructure, keeping enforcement logic and evidence records within the organization's perimeter.

Deterministic enforcement: Policy execution that produces a consistent, predictable outcome for every interaction meeting the trigger condition, regardless of model behavior or developer intent. In PII detection, deterministic enforcement means a detected PAN is always blocked or redacted, not sometimes filtered depending on model output.

NPI (Nonpublic Personal Information): The category of customer data protected under GLBA, including information a consumer provides to obtain financial products, transaction information, and information obtained while providing financial services. NPI covers SSNs, account numbers, transaction histories, credit histories, and loan details.

PAN (Primary Account Number): The payment card number that is the core identifier under PCI-DSS cardholder data protection requirements. PCI-DSS Requirement 3.4.1 requires institutions to mask PANs when displayed and Requirement 3.5.1 requires them to render PANs unreadable wherever they store them.

SAD (Sensitive Authentication Data): A separate PCI-DSS data category covering CVV/CVC codes, full magnetic stripe or chip data, and PIN values. SAD must not be stored after authorization, even if encrypted, and must be made unrecoverable after authorization is complete, including in environments where no PAN is present. Per the PCI Security Standards Council document library, PCI-DSS 4.0.1 provides a narrow exception: issuers and companies supporting issuing services with a legitimate and documented business need to store SAD are exempt from Requirements 3.3.1 and 3.3.2.

Separation of duties: An access control principle implemented in the control plane architecture where GRC and compliance teams configure AI governance policies through the Admin console. Engineering teams connect to the governed API endpoint using existing SDKs. This prevents any single role from both setting and bypassing security controls.