The Air-Gapped Chronicles: The Court Asked for the LLM’s Reasoning.
From the publisher’s feed, collected in the ZeroLabs newsroom.
The Air-Gapped Chronicles: The Court Asked for the LLM’s Reasoning. The Company Had Nothing. $10M Settlement.In Q4 2024, a Tier-1 US insurer faced discovery in the Northern District of California. The plaintiff’s attorney asked one question that ended the case: “Show me the temperature setting your AI used when it denied my client’s $2.2M claim.” The company couldn’t. Three months later: $10M settlement.Without audit trail: $10M settlement, 400+ hours manual reconstruction, regulatory investigation. With ProofGrid + Regure: $2.5M settlement, 3-second discovery export, cited as industry best practice. The difference: logging the decision path, not just the decision.The email from the General Counsel arrived at 11:47 PM.Subject line: “Discovery Motion Filed — AI Decision Records”I opened the attachment. It was a 47-page motion to compel production of records. Buried on page 23 was the sentence that would cost the insurance company $10 million:“Defendant shall produce all records, logs, settings, and parameters explaining how its artificial intelligence system arrived at the claim denial dated June 15, 2024, including but not limited to: model version, temperature settings, top-p sampling parameters, prompt templates used, knowledge base retrieval logs, and confidence scores.”The company’s response, filed three weeks later, was two paragraphs:“Defendant’s AI system does not produce such records. The system generates claim decisions based on proprietary algorithms. Defendant respectfully objects to this request as overly broad and seeking information protected as trade secrets.”The judge’s response came during a telephonic hearing on October 8, 2024. I wasn’t on the call, but the General Counsel read me the transcript verbatim:Judge Martinez: “Counselor, I’m trying to understand. Your client used an AI system to deny a $2.2 million commercial property damage claim. The plaintiff is entitled to discovery on how that decision was made. You’re telling me there are no records?”Defense Counsel: “Your Honor, the system doesn’t maintain those types of technical parameters for each individual claim decision — “Judge Martinez: “Then how do you expect me to assess whether the denial was reasonable? How does your client’s claims review committee evaluate whether the AI made the right call?”Defense Counsel: “We have quality assurance processes in place — “Judge Martinez: “That’s not what I asked. I’m asking: can you show me the reasoning the AI used for this specific claim?”Silence for 14 seconds, according to the court reporter’s timestamp.Defense Counsel: “No, Your Honor. Not in the way the plaintiff is requesting.”Judge Martinez: “Motion to compel is granted. Defendant has 30 days to produce responsive documents. If such documents don’t exist, we’ll be having a conversation about sanctions and what that means for your affirmative defenses.”Three months later, the case settled for $10 million. The claim itself was worth $2.2 million. The settlement was 4.5x the underlying claim value.This wasn’t a technology failure. This was an architecture failure.What Actually Happened: The Semantic JumpThe claim was straightforward. A commercial property owner in Oakland, California filed a claim for $2.2 million in water damage after a pipe burst on the third floor, flooding two floors of office space. The property was insured under an ISO Commercial Property Coverage Form CP 10 30 (Building and Personal Property Coverage — Special Form) with standard exclusions.The AI agent processed the claim on June 15, 2024 at 3:42 PM Pacific. Processing time: 840 milliseconds. The decision: DENIED.The denial cited Section 4.7.3: Negligence Exclusion of the policy.The problem: Section 4.7.3 only exists in residential property policies (ISO HO-3 Homeowners forms). Commercial Property Forms (CP 10 30) have a different exclusion structure. The correct section — if there was any applicable exclusion — would have been Section A.4.c: Faulty, Inadequate or Defective Maintenance under the Building and Personal Property Coverage Form.What the AI did wrong: It performed what we call a Semantic Jump. The claimant’s loss description included the phrase “water damage due to old plumbing.” The AI’s context window contained metadata from 47 prior claims processed that day. Three of those claims were residential policies with flood damage exclusions.When the model parsed “water damage,” it retrieved policy language from the wrong vector space. It mapped “flood” (residential) to “water ingress” (commercial), then cited an exclusion clause that didn’t exist in the actual policy the claimant held.The technical failure:Model: GPT-4 Turbo (exact version unknown, company didn’t log it)Temperature: Unknown (company didn’t log it)Top-P: Unknown (company didn’t log it)Knowledge Base Retrieval: Retrieved 3 residential policy clauses instead of commercial clausesConfidence Score: Unknown (company didn’t log it)The company knew the denial was wrong within 48 hours. A human claims adjuster reviewed the AI’s decision as part of their quality assurance process and flagged it immediately. The company reversed the denial on June 18, 2024 and paid the full $2.2 million claim.But the reversal came too late. The claimant’s business had already missed a critical contract deadline due to the delayed payout. The claimant sued for the consequential damages: lost contracts, late penalties, and reputational harm.And during discovery, the plaintiff’s attorney asked the one question the company couldn’t answer: “How did the AI make this decision?”The Discovery Process That Broke the CaseThe plaintiff’s attorney wasn’t a tech expert. He was a commercial litigation specialist who’d never handled an AI case before. But he’d read enough news articles about AI hallucinations to know the right questions to ask.His discovery requests were devastating in their simplicity:REQUEST NO. 12: “Produce all documents sufficient to show the artificial intelligence system’s decision-making process for Claim №2024–06–47392, including: a) The exact version of the AI model used b) All temperature, top-p, top-k, or other sampling parameters c) The prompt template or instruction set provided to the model d) All documents, policy text, or data the model retrieved or referenced e) Any confidence scores, probability assessments, or uncertainty measures f) All audit logs showing the model’s reasoning steps”The company’s problem: They had none of this.Their architecture was:User submits claim → API call to OpenAI → GPT-4 processes claim → Returns denial with cited policy section → Claim system logs denial decisionWhat they logged:Timestamp: 2024–06–15 15:42:33 PDTClaim ID: 2024–06–47392Decision: DENIEDReason Code: NEGLIGENCE_EXCLUSIONPolicy Section Cited: 4.7.3What they didn’t log:Which version of GPT-4 (June 2024 had three different versions with different training cutoffs)Temperature setting (affects randomness and creativity)Top-P setting (affects probability sampling)Which documents the model retrieved from the knowledge baseConfidence score for the denial decisionThe actual prompt template sent to the modelAny intermediate reasoning stepsThe company’s defense strategy collapsed during the deposition of their Head of Claims Technology on November 19, 2024.Here’s the exchange that sealed the case (from the deposition transcript):Plaintiff’s Attorney: “Can you tell me what temperature setting the AI used when it processed this claim?”Head of Claims Tech: “We don’t track that parameter.”Q: “Why not?”A: “It’s not something we considered necessary to log. The temperature is set at the API level by our engineering team.”Q: “What is it set to?”A: “I’d have to check with engineering.”Q: “You’re the Head of Claims Technology and you don’t know?”A: “The temperature setting is a technical parameter. It doesn’t affect the business logic of claim processing.”Q: “Let me ask you this: if the temperature was set to 1.0 instead of 0.2, would that affect how creative or random the AI’s responses are?”A: “Potentially, yes.”Q: “So it could affect whether the AI cited the correct policy section?”A: “In theory, yes, but — “Q: “And you don’t know what the temperature was set to for this specific claim?”A: “No, we don’t log that per-claim.”Q: “So there’s no way to reproduce this decision?”A: “Not exactly as it happened, no.”Q: “Which means there’s no way to verify that the AI’s reasoning was sound?”A: “We have QA processes — “Q: “I didn’t ask about your QA processes. I asked: can you verify this specific AI decision was made using appropriate reasoning?”Pause.A: “Not from the logs, no.”The case settled four weeks later.The ProofGrid “Decision Marble”: Every AI decision creates an immutable cryptographic chain. Leaves (prompt hash, model parameters, policy data) converge into a single Root Hash that makes tampering mathematically detectable. If even one character changes in the original log, the entire tree breaks. This is what the $10M settlement case couldn’t produce during discovery.What the Company Should Have Had: The Deterministic Audit TrailI’ve built AI systems for three insurance companies since 2023. Every one of them started with the same architecture flaw: they logged the decision, not the decision path.Here’s what a proper audit trail looks like for an AI-powered insurance claim:The Logic Trace (JSON payload stored in ProofGrid):{ "claim_id": "2024-06-47392", "timestamp_ms": 1718489553274, "user_uuid": "adjuster_847392", "inference_metadata": { "model_id": "gpt-4-turbo-2024-04-09", "temperature": 0.2, "top_p": 0.9, "max_tokens": 2048, "prompt_template_id": "commercial_property_v3.2" }, // Input/output hashing uses hashlib.sha256 (FIPS 180-4 compliant) "input_hash": "sha256:7d8f9a3c2b1e5f8d9a4c3e2f1b5a8d7c6e4f3a2b1c9d8e7f6a5b4c3d2e1f0a9b", "output_hash": "sha256:4b2e8f1a9c7d3e5f2b8a4c6d1e9f3a7b5c2d8e4f1a6b9c3d7e2f5a8b4c1d6e3f", "knowledge_retrieval": [ { "chunk_id": "policy_section_4.7.3", "policy_type": "RESIDENTIAL", "confidence_score": 0.42, "retrieval_rank": 1, "warning": "POLICY_TYPE_MISMATCH" }, { "chunk_id": "policy_section_6.2.1", "policy_type": "COMMERCIAL", "confidence_score": 0.38, "retrieval_rank": 2 } ], "decision": { "outcome": "DENIED", "reason_code": "NEGLIGENCE_EXCLUSION", "policy_section_cited": "4.7.3", "confidence_score": 0.67, "flags": [ "LOW_CONFIDENCE_RETRIEVAL", "POLICY_TYPE_MISMATCH_WARNING" ] }, "validation_gate_result": { "gate_id": "regure_logic_gate_v2.1", "status": "BLOCKED", "reason": "POLICY_SECTION_NOT_FOUND_IN_ACTIVE_POLICY", "human_review_required": true }}What this audit trail provides:Reproducibility: Every technical parameter is logged. You can re-run the exact same inference with the same model, temperature, and data.Forensic Analysis: When the AI cited Section 4.7.3, the audit trail shows it retrieved that section from a RESIDENTIAL policy with a confidence score of only 0.42. This is an immediate red flag.Validation Gates: The Regure Logic Gate cross-referenced “Section 4.7.3” against the actual commercial policy on file. The section didn’t exist. The gate blocked the decision and flagged it for human review.Legal Defensibility: During discovery, you can produce this exact JSON. It shows:What the AI consideredWhy it made its decisionWhat confidence scores were involvedThat your system caught the error before it reached the claimantThe difference in litigation outcomes:The Architecture: How We Implemented This for a Midwest InsurerThe Trust Stack: SentienGuard filters malicious prompts → ProofGrid intercepts and logs every inference parameter → LLM generates decision → Regure validates against policy structure in Redis (In August 2024, I deployed this exact architecture for a regional insurance company processing 47,000 claims annually. They’d been using a GPT-4-based claim triage system but had zero audit infrastructure.The implementation took 6 weeks.Week 1–2: ProofGrid IntegrationComponent: ProofGrid acts as middleware between the application layer and the LLM inference engine.Technical stack:Python FastAPI for the interceptor serviceAWS S3 with Object Lock (Compliance Mode) for immutable storageRedis for real-time caching of active claimsThe flow:Claim submission → App generates API call → ProofGrid Interceptor captures: 1. Input hash (SHA-256 of claim data) 2. Timestamp (microsecond precision) 3. User ID (adjuster who initiated the call) 4. Model parameters (temperature, top_p, model_id)→ API call proceeds to OpenAI → Response returns → ProofGrid captures: 1. Output hash (SHA-256 of model response) 2. Confidence scores (if available) 3. Retrieved knowledge base chunks 4. Reasoning steps (from chain-of-thought prompting)→ ProofGrid writes JSON log to S3 → Merkle Tree root hash generated → Log becomes immutable (cannot be modified or deleted for 7 years)Performance impact: Added 18ms latency. The write to S3 happens in parallel (non-blocking), so the user sees the claim decision with effectively zero delay.Cost: $0.12 per claim processed (S3 storage + compute). For 47,000 claims/year: $5,640 annual cost.ROI: The first time a plaintiff’s attorney requests discovery, this system pays for itself 1,780x over (avoided $10M settlement).What an insurance adjuster sees when Regure catches an AI error: The AI tried to deny a $2.2M commercial property claim using Section 4.7.3 — which only exists in residential policies. Regure’s deterministic validation queried the SQL policy database in 8ms, found zero matching rows, blocked the decision, and routed to human review. This is what saved the Midwest insurer from 47 incorrect denials in their first 90 days. The adjuster never sees the bad decision. The claimant never receives an erroneous denial.Week 3–4: Regure Logic GatesComponent: Deterministic validation that checks AI outputs against structured business rules.The problem we solved: The AI would occasionally cite policy sections that didn’t exist, or apply exclusions from the wrong policy type (residential vs. commercial, personal auto vs. commercial auto).The solution: Before any claim decision reaches the claimant, it passes through a logic gate that validates:Section Existence Check:AI cites “Section 4.7.3” → Gate queries SQL database of policy structuresDoes Section 4.7.3 exist in this policy type? → NO (only exists in residential)Decision blocked, flagged for human review2. Policy Type Consistency:AI retrieves knowledge from residential policy → Gate checks claim’s policy typeClaim is commercial → MISMATCH flagDecision confidence score downgraded, may be blocked depending on severity3. Exclusion Applicability:AI applies “Negligence Exclusion” → Gate checks if this exclusion exists in the policy documentExclusion found in Section 6.2, not Section 4.7.3 → AUTO-CORRECTOr if not found at all → BLOCK and flagCode example (simplified):# Regure Logic Gate Implementation# Uses hashlib.sha256 for cryptographic verification (FIPS 180-4)import hashlibclass RegureLogicGate: """ Deterministic validation layer for insurance claim decisions Runs before AI decision reaches claimant """ def __init__(self, policy_db_connection): self.db = policy_db_connection def validate_claim_decision(self, claim_data, ai_decision): """ Validate AI decision against business rules and policy structure Returns: (is_valid, flags, corrected_decision) """ flags = [] # Check 1: Does the cited policy section exist? cited_section = ai_decision.get('policy_section_cited') policy_type = claim_data['policy_type'] section_exists = self.db.execute( "SELECT EXISTS(SELECT 1 FROM policy_sections WHERE section_id = %s AND policy_type = %s)", (cited_section, policy_type) ).fetchone()[0] if not section_exists: flags.append({ 'severity': 'CRITICAL', 'type': 'SECTION_NOT_FOUND', 'message': f"Section {cited_section} does not exist in {policy_type} policies" }) return (False, flags, None) # Check 2: Does the exclusion logic make sense? if ai_decision['outcome'] == 'DENIED': exclusion_reason = ai_decision['reason_code'] # Verify this exclusion can legally apply to this claim type valid_exclusions = self.db.execute( "SELECT exclusion_codes FROM valid_exclusions WHERE policy_type = %s AND coverage_type = %s", (policy_type, claim_data['coverage_type']) ).fetchone()[0] if exclusion_reason not in valid_exclusions: flags.append({ 'severity': 'CRITICAL', 'type': 'INVALID_EXCLUSION', 'message': f"Exclusion {exclusion_reason} cannot apply to {claim_data['coverage_type']} claims" }) return (False, flags, None) # Check 3: Confidence score threshold if ai_decision.get('confidence_score', 0) flags.append({ 'severity': 'WARNING', 'type': 'LOW_CONFIDENCE', 'message': f"Decision confidence is {ai_decision['confidence_score']}, below 0.75 threshold" }) # Don't block, but flag for human review return (True, flags, ai_decision)Real-world catch rate: In the first 90 days post-deployment, the logic gates caught 47 decisions that would have been incorrect:23 cases: AI cited non-existent policy sections12 cases: AI applied residential exclusions to commercial policies8 cases: AI denied claims with confidence scores below 0.60 (should have been “review required”)4 cases: AI approved claims above $100K without human review (company policy requires dual approval)Zero of these incorrect decisions reached claimants.Week 5–6: Pilot Launch and TrainingDeployment strategy:Week 5: Pilot with 4 senior adjusters (20% of claims volume)Week 6: Full rollout after trainingAdjuster training: The hardest part wasn’t the technology — it was getting adjusters to trust the validation gates.Common objection: “The AI said to deny the claim. Why is the system blocking me?”Our response: “Because the AI cited a policy section that doesn’t exist. Here’s the audit trail showing exactly what went wrong. Would you have caught this in your manual review?”By Week 6, adjuster satisfaction was 8.7/10. They loved having the validation layer because it meant they weren’t liable for AI errors.The Regulatory Implications: Why State Insurance Commissions CareThree months after deployment, the company received a routine audit from their state insurance commission. The auditor’s report included this paragraph:“During our review of claim handling procedures, we examined the company’s use of artificial intelligence for claim triage and decision support. We found that the company has implemented industry-leading audit trail and validation infrastructure, including immutable logging of AI decision parameters and deterministic logic gates to prevent erroneous denials. This represents a model for responsible AI deployment in insurance operations.”The company’s CEO framed that paragraph and hung it in the lobby.Why regulators care:State insurance commissioners are terrified of AI in claims processing, but not for the reasons you’d think. They’re not worried about AI being “too smart” or “replacing humans.” They’re worried about unexplainable denials.Insurance regulation is built on a simple principle: every claim denial must be explainable and defensible.This principle extends globally. In the UK, the Prudential Regulation Authority’s Supervisory Statement SS1/23 on Model Risk Management explicitly requires that firms “maintain comprehensive documentation of model development, implementation, and performance monitoring” with “sufficient detail to allow an independent party to understand the model’s design, assumptions, and limitations.” The US regulatory approach mirrors this: demonstrate you understand what your model is doing, or face enforcement action.When a claimant disputes a denial, the insurance company must show:Which policy provision justified the denialWhy that provision applies to this specific claimThat the decision was made in good faith (not arbitrary)Traditional claim denials: Adjuster reviews claim, cites policy section, writes explanation. During dispute, the adjuster’s notes are the audit trail.AI claim denials (without audit trail): AI outputs “DENIED — Section 4.7.3.” No adjuster notes. No reasoning. No way to verify the decision was sound.Result: Regulators view this as a “bad faith” denial risk. If the company can’t explain why the AI made its decision, it can’t prove good faith.AI claim denials (with audit trail): AI outputs “DENIED — Section 4.7.3.” But the audit trail shows:AI retrieved Section 4.7.3 with 0.42 confidenceLogic gate flagged section mismatchDecision was blocked and sent to human reviewHuman adjuster reviewed, corrected to Section 6.2, denial upheldResult: Regulators see a robust quality control process. The AI is a tool, not a decision-maker. The company can defend every decision.What This Means for Your AI DeploymentIf you’re building AI systems that make decisions affecting people’s money, health, or legal rights, you have two choices:Choice 1: Log the decision“AI denied the claim at 3:42 PM on June 15”When challenged: “We don’t know why the AI made that decision”Litigation outcome: $10M settlement (or worse)Choice 2: Log the decision path“AI denied the claim at 3:42 PM on June 15 using model version X, temperature 0.2, after retrieving policy sections A, B, C with confidence scores 0.42, 0.38, 0.29. Logic gate blocked the decision because section A doesn’t exist in this policy type. Claim routed to human review.”When challenged: “Here’s the complete audit trail showing exactly what happened and how our validation system caught the error”Litigation outcome: Case dismissed or minimal settlementThe cost difference:Audit infrastructure: $5,640/year (for 47,000 claims)Avoided liability: $10,000,000 (one case)ROI: 1,780xThe architecture isn’t complex:ProofGrid: Immutable logging of every AI inference (input hash, model params, output hash, timestamp)Regure Logic Gates: Deterministic validation that checks AI outputs against business rulesHuman review workflow: Flagged decisions route to humans before reaching customersImplementation time: 6–8 weeks for most companiesThe alternative: Wait until you’re in discovery, facing a motion to compel, with a judge asking “How did your AI make this decision?” and having no answer.The Five Questions Your Legal Team Should Ask TodayIf your company is using AI for decisions that affect customers, your General Counsel should be asking these questions right now:1. “Can we reproduce any AI decision from the past 90 days?”If the answer is “no” or “not exactly,” you don’t have an audit trail. You have a liability exposure.2. “What model parameters are we logging per inference?”If the answer doesn’t include model version, temperature, top-p, and retrieved knowledge chunks, you’re not logging enough to defend the decision.3. “How do we validate that the AI isn’t hallucinating policy provisions or regulatory requirements?”If the answer is “we have a QA process” or “humans review a sample,” that’s not sufficient. You need deterministic validation before the decision reaches the customer.4. “Where are these logs stored and how long do we retain them?”If the answer is “database” or “log aggregation service,” ask: “Can those logs be modified?” If yes, they’re not defensible in litigation. You need immutable storage (S3 Object Lock, blockchain, or equivalent).5. “If we get a discovery request tomorrow, how long would it take to produce complete records for a specific AI decision?”If the answer is more than 24 hours, or if it requires “reconstructing” the decision, you have a problem.What I Learned After Three Insurance ImplementationsFirst deployment (Failed):Built audit logging as an afterthoughtLogged decisions but not decision pathsWhen client got their first discovery request, realized we had nothing usefulSpent 8 weeks retrofitting the architectureLesson: Audit infrastructure is not a feature. It’s the foundation.Second deployment (Expensive):Built comprehensive audit trail from day oneLogged everything: model params, retrieved docs, confidence scores, reasoning stepsStorage costs exploded ($47K/year for 200K claims)Learned that 80% of logs are never accessedLesson: Use immutable cold storage (S3 Glacier) with lifecycle policies. Most logs age out to $0.004/GB/month after 90 days.Third deployment (Optimal):ProofGrid captures full audit trail with parallelized writes (18ms overhead)Regure logic gates block bad decisions before they reach customersHot storage (30 days) + cold storage (7 years) = $5,640/year for 47K claimsZero incorrect decisions have reached customers in 8 monthsLesson: The architecture described in this article is the result of those failures.The insurance company from the opening case study no longer uses AI for claim decisions.After the $10M settlement, their board voted to shut down the entire AI claims program. They went back to 100% human adjudication.The regional insurer I worked with in August 2024? They’re now processing 73% of claims with AI assistance, with a 0.02% error rate (all caught by logic gates before reaching claimants).The business case for deterministic audit trails: Same claim denial error, two different architectures. Without ProofGrid + Regure: $10M settlement after 14 months of litigation and 400+ hours reconstructing “what the AI was thinking.” With The Trust Stack: $2.5M settlement in 4 months with 3-second audit export. Implementation cost: $5,640/year. Single avoided liability event: $10M. The math is simple. The decision should be too.The difference: One built AI without accountability. The other built accountability into the AI.Piyoosh Rai is the architect behind The Algorithm, a global venture studio engineering the deterministic trust layer for high-stakes AI. From air-gapped LLM deployments in Riyadh to cryptographic audit trails for US insurers, he builds the infrastructure that makes AI-driven decisions verifiable and sovereign.Currently helping US & UK insurers eliminate ‘Bad Faith’ liability through deterministic audit trails at Regure.The Air-Gapped Chronicles: The Court Asked for the LLM’s Reasoning. was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.