TAI BUI
Back to curriculum
LearnPython

Compliance — SOC 2, HIPAA, GDPR, PCI-DSS, EU AI Act, ISO 42001

Multi-framework coverage is table stakes for 2026 enterprise deals. **EU AI Act**: in force since August 1, 2024, with most high-risk requirements enforced from August 2, 2026. Fines reach €15M or 3% of global annual turnover for high-risk-system obligations (Art. 99(4)), and €35M or 7% for prohibited AI practices (Art. 99(3)). It applies globally if you serve EU users. **Colorado AI Act**: effective June 30, 2026 (delayed from February 2026 by SB25B-004), with impact assessments for high-risk systems and a right to appeal AI decisions. Virginia has something similar for credit, employment, housing, and education. **SOC 2 Type II** is the de facto B2B AI requirement, and fintech buyers want Type II rather than Type I. **GDPR**: the largest documented AI-specific fine is €30.5M against Clearview AI (Dutch DPA, Sept 2024). Italy's Garante fined OpenAI €15M in Dec 2024, and that was overturned on appeal in March 2026. Real-time PII redaction at inference is the defensible standard, and post-processing cleanup is not enough. **HIPAA**: healthcare is bound, so you cannot send PHI to external AI services without a BAA. **PCI-DSS**: coverage of the AI-interaction layer takes configuration plus contractual agreements, and it is not automatic. **ISO 42001** is an emerging AI governance standard, a growing procurement requirement alongside ISO 27001. Reference profile: OpenAI maintains SOC 2 Type 2, ISO/IEC 27001:2022, ISO/IEC 27701:2019, GDPR/CCPA/HIPAA (BAA)/FERPA, and PCI-DSS for ChatGPT payment components. Cross-framework mapping reduces audit fatigue: access controls map across ISO 27001 A.5.15-5.18, GDPR Art. 32, and HIPAA §164.312(a).

TIME: ~60 minutesPREREQUISITES: Phase 17 · 25 (Security), Phase 17 · 13 (Observability)

Learning Objectives

  • Enumerate the seven 2026 frameworks relevant to LLM products and match each to a customer segment.
  • Cite the EU AI Act enforcement timeline (in force August 2024; high-risk enforcement August 2026) and the two-tier fine ceiling (€15M / 3% for high-risk obligations, €35M / 7% for prohibited practices).
  • Explain why post-processing PII cleanup is not enough for GDPR and name real-time inference-layer redaction as the defensible standard.
  • Describe cross-framework control mapping (e.g., access control maps to ISO 27001 A.5.15-5.18 + GDPR Art. 32 + HIPAA §164.312(a)).

The Problem

An enterprise customer's procurement asks for SOC 2 Type II, GDPR, HIPAA BAA, ISO 27001, and an "EU AI Act compliance statement." Your team has SOC 2 Type I. You're six months from Type II and haven't started GDPR Article 30 records.

Multi-framework coverage is not really an LLM problem. It's an enterprise-SaaS problem with LLM-specific overlays. Procurement teams in 2026 want a matrix with a row per framework and a column per control, not a PDF.

Warm-up0/3
1. Which audit-log fields best answer "who saw what, and when" for an LLM product?Warm-up
A card stating the goal of finding out who touched a system and when, and the need for one record format for every event, with which pieces of information required left as a question mark.
Generic record-keeping setup, typed. No audit-log terminology used.
2. Why should API keys live in a secrets manager rather than in source code?Warm-up
A card stating that a key currently lives typed directly into the source code, a teammate suggests moving it somewhere else, with what the real benefit of moving it is left as a question mark.
Generic setup, typed. No secrets-manager terminology used.
3. What does encrypting traffic in transit between your app and a model provider protect against?Warm-up
A card stating that an app sends requests to a service over a network, the team adds encryption on that connection, with what threat this stops left as a question mark.
Generic setup, typed. No compliance terminology used.
Check: The Problem0/1
1. Why does the lesson say multi-framework coverage is not really an LLM problem?Explain
A card stating that a customer wants SOC 2 Type II, GDPR, a HIPAA BAA, ISO 27001, and an EU AI Act statement, while the team has SOC 2 Type I, with why the lesson calls this not really an LLM problem left as a question mark.
The setup exactly as given in the question's own framing of The Problem section.

The Concept

The seven frameworks

FrameworkScopeLLM-specific requirement
SOC 2 Type IIB2B SaaS baselineProcess controls audited over 6-12 months
HIPAAUS healthcareBAA required; PHI cannot leave infrastructure without signed agreement
GDPREU usersReal-time PII redaction; data subject rights; Article 30 records
PCI-DSSPayment dataConfiguration + contracts for AI touching payment
EU AI ActServing EU usersRisk tier classification; high-risk systems: conformity assessment, documentation, logging
Colorado AI ActServing CO residentsImpact assessments; right to appeal
ISO 42001AI governanceEmerging; pairs with ISO 27001

EU AI Act timeline

  • August 1, 2024: in force.
  • February 2, 2025: prohibited-AI practices enforced.
  • August 2, 2026: high-risk systems enforced (conformity assessment, documentation, logging).
  • August 2027: high-risk systems in products under harmonized legislation.

Risk tiers: Unacceptable (banned), High-risk (conformity + logging), Limited-risk (transparency), Minimal-risk (no constraint). Most B2B LLM SaaS is limited-risk; high-risk kicks in for employment, credit, education, law enforcement, migration, essential services.

Fines (Article 99): up to €15M or 3% global annual turnover for breaches of high-risk-system obligations (Art. 99(4)); up to €35M or 7% for prohibited AI practices (Art. 99(3)); whichever higher applies.

GDPR: real-time redaction is the standard

Post-processing cleanup (redacting PII after the LLM sees it) is not a defensible posture, because the model already saw the data. Real-time inference-layer redaction is the 2026 standard:

  • Entity recognition before the LLM call.
  • Consistent tokenization (Mesh approach) preserves semantics, so the model still gets usable context.
  • Store only redacted prompts + consented opt-in raw.

Recent enforcement: €30.5M against Clearview AI (Dutch DPA, Sept 2024) is the largest documented AI-specific GDPR fine to date; €15M against OpenAI (Italy's Garante, Dec 2024) is the largest LLM-specific fine. It was overturned on appeal in March 2026, and the ruling remains under further review. Post-processing claims have failed at audit.

HIPAA: the BAA is not optional

You cannot send PHI to external AI services without a signed Business Associate Agreement. Bedrock, Azure OpenAI, and Vertex each offer BAAs, and so do the OpenAI and Anthropic direct APIs. Confirm yours is signed before any PHI goes out.

SOC 2 Type II

Type I: controls designed and documented. Type II: controls operate effectively over 6-12 months.

B2B procurement in 2026 defaults to Type II. Type I gets you started. Type II is the gate.

Common audit drivers: access logs (who saw what), change management (how was it deployed), risk assessments (quarterly), incident response (tested?). The audit log from Phase 17 · 25 carries over directly.

Cross-framework mapping

One access control policy satisfies multiple framework controls:

ControlFrameworks
Access loggingISO 27001 A.5.15-5.18, GDPR Art. 32, HIPAA §164.312(a)
Change managementISO 27001 A.8.32, PCI DSS Req. 6, HIPAA breach-notification scope
Encryption in transitISO 27001 A.8.24, GDPR Art. 32, HIPAA §164.312(e)
Secrets managementISO 27001 A.8.19, PCI DSS Req. 8, SOC 2 CC6.1

Compliance tools (Drata, Vanta, Secureframe) automate this mapping. The cost is worth it at scale.

ISO 42001: emerging

Published late 2023. Growing procurement requirement alongside ISO 27001. Framework for AI governance including risk management, data quality, transparency, human oversight.

OpenAI's reference profile

OpenAI maintains SOC 2 Type 2, ISO/IEC 27001:2022, ISO/IEC 27701:2019, GDPR/CCPA/HIPAA (BAA)/FERPA, PCI-DSS for ChatGPT payment components. That is roughly the enterprise table stakes in 2026.

Numbers you should remember

  • EU AI Act fines: up to €15M / 3% (high-risk obligations, Art. 99(4)); up to €35M / 7% (prohibited practices, Art. 99(3)).
  • EU AI Act high-risk enforcement: August 2, 2026.
  • Largest documented AI-specific GDPR fine: €30.5M, Clearview AI (Dutch DPA, Sept 2024).
  • Largest LLM-specific GDPR fine: €15M, OpenAI (Italy's Garante, Dec 2024; overturned on appeal March 2026).
  • SOC 2 Type II window: 6-12 months of operated controls.
  • Colorado AI Act effective date: June 30, 2026 (delayed from February 2026 by SB25B-004).
Check: The Concept0/26
1. What is the practical difference between SOC 2 Type I and Type II?Define
Two name cards, SOC 2 Type I and SOC 2 Type II, with the practical difference between them left as a question mark.
Both names exactly as the lesson gives them. No definition shown.
2. What is the rule for HIPAA with LLM workloads that handle PHI?Define
A card stating that a workload handles PHI and calls an external AI service, with the rule for this case left as a question mark.
The setup exactly as given in the question. No rule is stated.
3. Which description of GDPR fits an LLM product serving EU users?Define
A card naming GDPR, tagged to The Concept section, with which description fits an LLM product serving EU users left as a question mark.
The term as the lesson names it. Which description fits is the question.
4. How does PCI-DSS apply to an AI layer that touches payment data?Define
A card stating that an AI layer touches payment data, with how PCI-DSS applies here left as a question mark.
The setup exactly as given in the question. No rule is stated.
5. What is the EU AI Act's way of sorting AI systems?Define
A card naming the EU AI Act, tagged to The Concept section, with how it sorts AI systems left as a question mark.
The term as the lesson names it. How it sorts systems is the question.
6. What are the key facts about the Colorado AI Act?Define
A card naming the Colorado AI Act, tagged to The Concept section, with key facts about it left as a question mark.
The term as the lesson names it. Its key facts are the question.
7. What is ISO 42001?Define
A card naming ISO 42001, tagged to The Concept section, with what it is left as a question mark.
The term as the lesson names it. What it is is the question.
8. What is ISO 27001?Define
A card naming ISO 27001, tagged to the Key Terms section, with what it is left as a question mark.
The term as the lesson names it. What it is is the question.
9. What is a conformity assessment under the EU AI Act?Define
A card naming conformity assessment, tagged to the Key Terms section, with what it is left as a question mark.
The term as the lesson names it. What it is is the question.
10. What does cross-framework control mapping deliver?Define
A card naming cross-framework mapping, tagged to The Concept section, with what it delivers left as a question mark.
The term as the lesson names it. What it delivers is the question.
11. When does EU AI Act enforcement for high-risk systems begin?Define
A card stating that the EU AI Act has several enforcement milestones over time, with when high-risk enforcement begins left as a question mark.
The setup exactly as given in the question. No date shown.
12. Which two-tier fine ceiling does the EU AI Act define?Define
A card stating that the EU AI Act's Article 99 defines financial penalties in two separate tiers, with what the two tiers are left as a question mark.
The setup exactly as given in the question. No figures shown.
13. Which GDPR fines are cited as recent AI enforcement examples?Define
A card stating that two real GDPR fines against AI companies are cited in the lesson's enforcement examples, with company and amount both left as a question mark.
The setup exactly as given in the question. No company or amount shown.
14. Which pairing of framework and scope is correct?Explain
A card listing four frameworks, HIPAA, GDPR, SOC 2 Type II, and the Colorado AI Act, each with its scope left as a question mark.
All four frameworks named, none paired with a scope yet.
15. What decides whether an LLM product lands in the EU AI Act's high-risk tier?Explain
A card stating that an LLM product needs its EU AI Act risk tier decided, with what decides it left as a question mark.
The setup exactly as given in the question. No deciding factor shown.
16. Why is post-processing PII cleanup not a defensible GDPR posture?Explain
A card stating that a team redacts PII from conversation logs after the LLM already produced its response, with why this is not defensible for GDPR left as a question mark.
The setup exactly as given in the question. No reason shown.
17. Why does the redaction pipeline use consistent tokenization when it replaces entities?Explain
A card stating that a redaction pipeline replaces entities with tokens, using a method where the same entity always gets the same token, with why this method is used left as a question mark.
The setup exactly as given in the question. No reason shown.
18. How does ISO 42001 differ from ISO 27001?Explain
Two name cards, ISO 42001 and ISO 27001, with how they differ left as a question mark.
Both names exactly as the lesson gives them. No definition shown.
19. A company with €1B global annual turnover commits a prohibited AI practice. What is the maximum fine under the Article 99 rule?Apply
A card stating a company's global annual turnover of EUR 1 billion and a prohibited AI practice violation, with the maximum fine under Article 99 left as a question mark.
The setup exactly as given in the question. No fine figure shown.
20. A company with €100M turnover breaches a high-risk-system obligation. Which ceiling applies?Apply
A card stating a company's annual turnover of EUR 100 million and a high-risk-system obligation breach, with which ceiling applies left as a question mark.
The setup exactly as given in the question. No ceiling figure shown.
21. A team redacts PII from stored transcripts after each LLM response and tells an auditor this satisfies GDPR. What is the flaw?Analyze
A card stating that a team redacts PII from stored transcripts after each LLM response, not before, and tells an auditor this satisfies GDPR, with what the flaw is left as a question mark.
The setup exactly as given in the question. No flaw is shown.
22. A startup sent patient notes to an LLM API. The provider holds SOC 2 Type II, so the team believes no more paperwork is needed. What is wrong?Analyze
A card stating that a startup sends patient notes to an LLM API whose provider holds SOC 2 Type II, and the team believes no more paperwork is needed, with what is wrong left as a question mark.
The setup exactly as given in the question. No flaw is shown.
23. A chatbot sits in front of a payment flow. The team assumes PCI-DSS is covered because their card processor is compliant. What did they miss?Analyze
A card stating that a chatbot sits in front of a payment flow and the team assumes the card processor's own PCI-DSS compliance covers it, with what they missed left as a question mark.
The setup exactly as given in the question. No answer is shown.
24. A fintech buyer requires SOC 2 Type II. The vendor passed Type I last month and says only paperwork remains. Why is that wrong?Analyze
A card stating that a fintech buyer requires SOC 2 Type II, the vendor passed SOC 2 Type I last month, and the vendor claims only paperwork remains, with why that claim is wrong left as a question mark.
The setup exactly as given in the question. No answer is shown.
25. One team owns access logs for a product sold to EU hospitals and US payers. They plan three separate logging systems, one per framework. Which design fits the lesson?Design
A card stating that one team owns access logs for a product sold to EU hospitals and US payers, considering either one shared design or three separate logging systems, with which design fits the lesson left as a question mark.
The setup exactly as given in the question. No design is shown.
26. You are shipping an LLM tool that ranks job applicants for EU employers. What should the compliance plan include?Design
A card stating that an LLM tool ranks job applicants for EU employer customers, with what the compliance plan should include left as a question mark.
The setup exactly as given in the question. No plan is shown.

Use It

code/main.py is a compliance-mapping spreadsheet in Python. Given a control, it lists the frameworks that control satisfies.

Check: Use It0/6
1. What does `CONTROL_MAP["secrets management"]` hold in main.py?Apply
A card stating that CONTROL_MAP is a dict defined in main.py, with the key secrets management looked up, and its value left as a question mark.
The setup exactly as given in the question. No value shown.
2. What does `PROFILE_MAP[("US", "fintech")]` return in main.py?Apply
A card stating that PROFILE_MAP is a dict defined in main.py, with the key US, fintech looked up, and its value left as a question mark.
The setup exactly as given in the question. No value shown.
3. How many frameworks does the code list for access logging, compared with the concept table?Apply
A card stating that the concept table's access logging row lists 3 frameworks, with how many the code lists and what is new left as a question mark.
The concept table's own count, as given in the question. No code value shown.
4. Which control in `CONTROL_MAP` lists both the Colorado AI Act SB24-205 and EU AI Act Art. 27?Apply
A card stating that one CONTROL_MAP entry lists both Colorado AI Act SB24-205 and EU AI Act Art. 27, with which control that entry is left as a question mark.
The setup exactly as given in the question. No control name shown.
5. You sell a B2B LLM SaaS to Colorado customers and have one engineer for compliance. Which starting set matches the profile map?Design
A card stating a B2B LLM SaaS sold to customers in Colorado with a compliance team of one engineer, with the starting framework set left as a question mark.
The setup exactly as given in the question. No framework set is shown.
6. A US startup sells an LLM note-taker to a hospital system in Germany. It holds SOC 2 Type I only. Which set is the minimum to plan for?Design
A card stating that a US startup sells an LLM note-taker to a hospital system in Germany and holds only SOC 2 Type I, with the minimum set to plan for left as a question mark.
The setup exactly as given in the question. No framework set is shown.

Ship It

This lesson produces outputs/skill-compliance-matrix.md. Given a customer segment and geography, it specifies the required frameworks and controls.

Author's Note

I'd run main.py first and read the output as two separate tables. CONTROL_MAP goes from a control to the frameworks it satisfies, and PROFILE_MAP goes from a geography and segment to the frameworks a buyer will ask for. It's a hand-written dict with no audit logic behind it, which is the point: the mapping is the hard part, and stdlib Python is enough to hold it.

The entry I'd check against the concept table is access logging. The code lists ISO 27001 A.5.15-5.18, GDPR Art. 32, HIPAA §164.312(a), and also SOC 2 CC6, which the concept table leaves out. That's the cross-framework mapping idea in miniature, and it shows how the same row grows as you add frameworks.

I'd also treat both dicts as a starting point. The profile map covers seven geography and segment pairs, so most real customers will fall outside it, and the citations in it will drift as the frameworks change. Before you rely on a row, check it against the primary sources in Further Reading, and extend PROFILE_MAP with your own customers first.

Exercises

  1. Your first enterprise customer requires SOC 2 Type II, HIPAA BAA, EU AI Act statement. What is the minimum viable compliance posture to win the deal?
  2. Classify three hypothetical LLM products under EU AI Act risk tiers. What changes at high-risk?
  3. You accidentally sent PHI to a provider without BAA. Walk through the incident response.
  4. Argue whether ISO 42001 is "necessary in 2026" for a mid-market AI vendor.
  5. Map your LLM audit log fields (Phase 17 · 25) to at least three framework controls.

Key Terms

TermWhat people sayWhat it actually means
SOC 2 Type II"audited controls"Controls operating over 6-12 months, independently attested
HIPAA BAA"healthcare contract"Business Associate Agreement; required for PHI
GDPR"EU privacy"Real-time PII redaction is the defensible 2026 standard
EU AI Act"EU AI rules"High-risk enforcement August 2026; €15M / 3% (high-risk obligations), €35M / 7% (prohibited practices)
Colorado AI Act"US AI state law"June 30, 2026 effective (delayed by SB25B-004); impact assessments
ISO 42001"AI governance"Emerging framework for AI risk + transparency
ISO 27001"security ISMS"Information Security Management System baseline
Conformity assessment"EU AI doc package"High-risk requirement: docs, testing, logging
Cross-framework mapping"one control, many frames"Single policy satisfies multiple framework controls

Further Reading

Code

Ships With