Learn how to implement SOC 2 for LLM systems. Ensure compliance and security with practical controls and a clear plan.
Naman Arora
January 24, 2026

Last month, I pushed a conversational agent to production that I thought was safe. Users started seeing a private client address in a reply. I had logging in place, or so I thought. The logs were sparse, and the few entries I had did not show the prompt that triggered the leak. I spent the night tracing request IDs, checking deployment diffs, and sipping terrible office coffee. By dawn, I found the issue, a prompt tweak that slipped past review. I laughed at myself, and then I made a checklist I still carry.
Opening anecdote and scope
I want to be clear. If you are an engineering manager, SRE, or security lead running LLM powered services, this guide is for you. My goal is to map SOC 2 requirements to real LLM systems. I will show practical controls and what auditors expect. I will also give a 30-60-90 day plan to make progress.
In one sentence, this is a SOC 2 LLM playbook. Think of SOC 2 like a car dashboard that is missing instruments. You can drive, but you will not know your speed, oil level, or whether the engine is overheating. For LLMs, missing logs and traces are missing instruments. SOC 2 asks you to install those gauges and prove they work over time.
SOC 2 is an auditor attestation about controls. It is not a certification you hang on the wall and forget. It says you have the right controls, and you follow them. Type I shows the controls exist at a point in time. Type II shows the controls work over a period. For LLM services, Type II matters the most. LLM behavior changes with models, prompts, and data. Auditors want to see that your controls work under real change.
Analogy: SOC 2 is like a restaurant health inspection. The inspector checks your rules and watches how often you follow those rules. It is not enough to have a clean kitchen once. You must show you keep it clean every day. For LLMs, auditors want both the rules and proof you follow them.
Answer: What does SOC 2 mean? It is evidence that you secure customer data and run reliable systems. It proves your team thinks about controls and follows them over time. For LLMs, that means secure prompts, logging, access control, and repeatable testing.
SOC 2 has five criteria. Each maps to concrete LLM controls. I give one example per criterion and why auditors ask for evidence.
Security
Control example: Network controls, RBAC on model endpoints, and encryption of prompt data at rest and in transit.
Why auditors ask: They want proof you prevent unauthorized access to models and data.
Analogy: Building safety checks, locked doors, and guards to stop intruders.
Availability
Control example: Redundant model serving, autoscaling, and SLOs for latency and uptime.
Why auditors ask: They want evidence your service is reliable and customers can use it when needed.
Analogy: Backup power and multiple exits so people can leave safely if one fails.
Processing Integrity
Control example: Input validation, schema checks for prompts, and output sanity checks to detect hallucination spikes.
Why auditors ask: They want to know responses are accurate and processed as intended.
Analogy: Quality checks on a production line to stop bad items before they ship.
Confidentiality
Control example: Redaction of PII from prompts, tag-based access to logs, and encryption of stored responses.
Why auditors ask: They want proof you protect sensitive customer data from leaks.
Analogy: Private changing rooms and curtains to keep guests confidential.
Privacy
Control example: Consent tracking, data minimization in prompts, and processes for deletion requests.
Why auditors ask: They want to ensure you handle personal data according to policies and laws.
Analogy: A restaurant that asks permission before sharing a guest photo.
Auditors ask for evidence and metrics because claims are not enough. They want time-stamped logs, runbooks, and change approvals that show controls worked. Think of it as a five-point safety checklist. Each point needs concrete items.
Define LLM in a way auditors and engineers both understand. A deployed LLM is not just a model file. It is the model, plus prompts, the data given to it, the infrastructure that serves it, and the APIs that connect clients. Security people must treat the whole stack as one system.
Attack surfaces include:
Prompt injection, where a malicious prompt changes behavior.
Data leakage, where private content appears in outputs.
Model inversion, where attackers reconstruct training data.
Supply chain risk from third-party models or tool calls.
Controls must sit at multiple layers:
API gateway for rate limits and authentication.
Prompt sanitizer and redaction before logging.
Model artifacts storage with versioning and access control.
Tool call and external retrieval protections.
Analogy: A LLM is like a factory, a conveyor belt, and a recipe book. The model is the machine, the prompt is the recipe, and the data is raw material. You need controls on the factory floor, on the conveyor belt, and in the recipe book. If any single piece is insecure, the final product can be compromised.
Answer: What is a LLM in security? It is the full system that takes inputs, runs a model, and returns outputs. Security must cover inputs, models, and outputs.
SOC 2 focuses on preventing unauthorized access and incorrect processing of outputs. For generative AI, that means protecting customer data used in prompts, training, and responses. Auditors want repeatable controls for tagging, redaction, and retention. You must show you can find every copy of a sensitive item, and you can delete or redact it when required.
Analogy: Think of a bank vault policy that covers both the key and every copy of the ledger. SOC 2 wants to know who has the key, who copied the ledger, and where those copies live.
Answer: The primary role of SOC 2 is to make sure your controls prevent data leakage and bad processing. For LLMs, it means proving you track data, redact sensitive parts, and retain or delete data according to policy.
You must log the right things. Key items to capture are:
Inputs, prompts, and context.
Metadata like user ID, request ID, timestamp, and model version.
Outputs, and any transformations or tool calls.
Prompt provenance, who edited the prompt, and why.
Logs must be tamper-resistant. Timestamps must be accurate. Retention must follow policy. Include model config, temperature, and tokens. The goal is to recreate a request end to end during an audit.
Analogy: Store camera footage plus access logs for each gate at a facility. You need both the video and the badge scan to know who went where and when.
For more on tracing and observability, see the LLM Observability & Tracing pillar page. It explains best practices for tracing request IDs, prompt versions, and model outputs.
Answer: What are the logging needs? Log everything needed to recreate and audit a request, including prompt, output, model version, and user metadata.
Access control must follow least privilege. Lock down who can deploy models, edit prompts, or read raw logs. Use RBAC and roles at the API and infrastructure layers. Use managed secrets for API keys. Rotate keys regularly and log key usage.
Model governance needs a registry and approval gates. Every model and prompt change should have a recorded approval. Track model lineage and training data versions.
Analogy: Keys and locks for rooms where only certain staff can enter. Only authorized staff should enter the server room, and every key turn is logged.
Classify data. Tag prompts that contain PII. Redact or pseudonymize before logging. Set clear retention rules for raw prompts, responses, and derived embeddings. Keep lineage so you can answer deletion requests.
Document consent and keep proof of it. For training data, keep records of sources and any filtering you applied.
Analogy: A library tracks borrowing, categorizes books, and removes outdated copies. You must know who checked out the book, where it came from, and when to remove it.
You must monitor model health and security signals. Important metrics:
Drift in input distribution.
Hallucination or error rates.
Latency and cost spikes.
Anomalous outputs that may leak secrets.
Create alert rules tied to thresholds. Build incident playbooks that combine model rollback, key rotation, and customer notifications. Exercise these playbooks in drills.
Analogy: A factory alert system stops the line if quality drops. The system not only alerts, it also stops production and rolls back to a safe state.
Map each control to artifacts:
Logs for requests and responses.
Runbooks and incident reports.
Change approvals and model registry entries.
Test results from continuous evaluation.
Keep time-stamped traces for requests that map to control objectives. Use automated evidence collection so you do not scramble when the auditor calls. Continuous tests are proof that controls work over time.
Analogy: Collect receipts and photos to prove you followed a process. Do not rely on memory or verbal claims.
For governance and evidence best practices, see the Enterprise AI Quality & Governance pillar page. It covers how to tie tests and governance to audit artifacts.
30 days
Inventory active LLMs, endpoints, prompts, and data flows.
Enable basic logging of prompts, outputs, model version, and user IDs.
Enforce secrets for API keys.
60 days
Add immutable audit trails and tamper-resistant logs.
Deploy a model registry and RBAC for deployments.
Start tagging data for PII and retention.
90 days
Automate evidence pipelines and continuous tests.
Run an internal mock audit and fix gaps.
Add prompt A/B testing and observability for experiments.
Analogy: A sprint plan that moves your team from firefighting to reliable operations. First stabilize. Then lock things down. Finally automate and test.
Short checklist tied to SOC 2 criteria:
Security: RBAC, encryption, secrets rotation. Artifacts: access logs, key rotation records.
Availability: SLOs, redundancy, tests. Artifacts: uptime reports, DR tests.
Processing Integrity: Input validation, output checks. Artifacts: test runs, anomaly logs.
Confidentiality: Redaction, tag-based access. Artifacts: redaction logs, encryption keys access.
Privacy: Consent records, retention policies. Artifacts: deletion logs, consent docs.
Quick wins:
Enable request ID logging.
Start a model registry.
Tag PII in prompts.
Longer term:
Automated evidence collection.
Continuous A/B testing for prompts.
Immutable tracing across infrastructure.
Analogy: A preflight checklist for releasing a plane. You tick boxes and keep the receipts.
Common auditor questions and short answers:
Q: How do you prove who changed a prompt? A: Show version history and approval record.
Q: How do you prove you can delete user data? A: Show lineage and deletion logs with request ID.
Q: How do you prove model rollbacks work? A: Show deployment approvals, tests, and rollback trace.
Achieving SOC 2 for LLMs is both engineering work and evidence work. You must build controls and then prove they work. My experience at Zomato and BrowserStack taught me that proofs matter as much as code. Logs and traces save nights of frantic auditing.
LaikaTest fits naturally into this roadmap. It helps teams experiment, evaluate, and debug prompts and agents safely in real usage. It solves core problems like silent regressions after prompt or model changes and observability that does not tie behavior to prompt versions.
LaikaTest features that help with SOC 2 LLM controls:
Prompt A/B testing, so you can run variants on real traffic and collect evidence about which prompt performed better.
Agent experimentation, so you can run experiments rather than guessing which agent setup is safer.
One-line observability and tracing, which shows prompt version, model outputs, tool calls, costs, and latency tied to a request ID.
Evaluation feedback loop, which collects human or automated scores tied to the exact prompt version.
Use LaikaTest to automate observability, run continuous LLM tests, capture immutable audit trails, and generate evidence packages for auditors. It reduces friction when preparing for a Type II audit because it ties tests to exact prompt and model versions. That helps you answer auditor questions with concrete artifacts.
If you follow the 30-60-90 plan and apply the logging, access, and governance controls here, you will be in a strong position for SOC 2. This guide mapped SOC 2 requirements to LLM systems and audits. The competitor gap is real. Most SOC 2 guides ignore LLM specifics. This one closes that gap and points to tools and pages that help you make steady progress.
Further reading and resources:
LLM Observability & Tracing pillar page for best practices on tracing and logging.
Enterprise AI Quality & Governance pillar page for governance and evidence patterns.
Good audits start with good habits. Build your dashboard. Collect the receipts. Then sleep at night.