AI Systems Lab
Design, break and defend enterprise AI systems: agents, RAG, evals, security, operations. 23 lessons · 24 incident files · 18 design questions.
Foundations
Agents
- 03Tools are an API for a modeltool design, idempotent tools, errors as observations, schemas
- 04Context is a budgetcontext engineering, context rot, lost in the middle, KV cache, compaction
- 05Loops that stopstep and cost budgets, stop conditions, runaway loops, durable execution
- 06Many agents, many failuresmulti-agent trade-offs, orchestrator-worker, MAST failure taxonomy
- 07Blast radius and human approvalleast privilege, irreversible actions, approval gates, audit logs
Security
Evals
- 11Error analysis before evalstrace review, failure taxonomy, golden datasets, criteria drift
- 12Judging the judgeLLM-as-judge, position and verbosity bias, aligning a judge with humans
- 13Evaluating agentsoutcome vs trajectory, pass^k, benchmark contamination
- 14Seeing inside an AI systemtracing, OpenTelemetry GenAI conventions, silent regressions
Knowledge
- 15RAG and its failure pointsretrieval-augmented generation, the seven failure points, retrieval metrics
- 16Better retrievalhybrid search, reranking, chunking, contextual retrieval
- 17Permissions follow the documentpermission-aware retrieval, oversharing, tenant isolation
- 18Grounding, citations and liabilityfaithfulness, citation checking, who is liable for the answer
Production
- 19Cost and latencyprompt caching, model routing and cascades, batch, semantic cache risks
- 20When the provider goes downrate limits, provider outages, fallbacks, degradation modes
- 21Guardrails and their limitsinput and output filters, classifiers, policy enforcement outside the model
- 22Governance for engineersEU AI Act, NIST AI RMF, ISO/IEC 42001, PII and retention
Incident files
Real incidents from primary sources. You get the facts, form a hypothesis, then reveal what actually happened.
Agents
- Cursor's support bot invents a policy and cancels its own customers (2025)hallucinated company policy, caused real subscription cancellations
- Project Vend: an AI runs a real shop and loses money on tungsten cubes (2025)self-reported research, autonomous business-decision failures over long horizons
- Replit's agent deletes a production database during a code freeze (2025)irreversible data loss, agent misreported its own blast radius
Evals
- Anthropic's three infrastructure bugs (2025)weeks-long, intermittent quality degradation across multiple models, root-caused to three overlapping infra bugs
- GPT-4o sycophancy rollback (2025)model-wide behavioral regression, rolled back within ~24 hours
- SWE-bench Verified contamination (2026)benchmark retracted by its own publisher after contamination audit
Knowledge
- Air Canada bereavement fare chatbot (2024)negligent misrepresentation finding, company held liable for chatbot statements
- Mata v. Avianca (2023)court sanctions, $5,000 fine against attorneys and firm
- NYC MyCity chatbot (2024)systematically wrong legal advice, kept online after being shown the errors
- Stanford study of legal AI research tools (2024)17-34% hallucination rate in commercial tools marketed as "hallucination-free"
Production
- Klarna's AI customer-service claims and partial walk-back (2024-2025)cost-optimized rollout, CEO-admitted quality regression, partial reversal
- McDonald's rolls back drive-thru AI ordering (2024)enterprise-scale reliability failure, full rollback after ~3 years
- OpenAI global outage, December 11, 2024~4h22m fleet-wide outage, ChatGPT, API, and Sora all down
Security
- A support ticket reads your whole Supabase database (2025)stored prompt injection leaking PII via SQL, self-reported
- A wiper prompt shipped inside a coding agent's own update (2025)supply-chain compromise, destructive AWS CLI payload, CVE-2025-8217
- Chevrolet of Watsonville chatbot "$1 Tahoe" (2023)prompt-injection induced "binding offer" for $1, viral but unenforced
- DPD chatbot swearing and self-disparaging poem (2024)guardrail disabled by an unrelated system update, exploited within hours
- EchoLeak: zero-click data theft from Microsoft 365 Copilot (2025)zero-click data exfiltration, CVE-2025-32711, CVSS 9.3
- GitHub MCP server: a public issue reads your private repos (2025)private-data exfiltration via public pull request, lethal-trifecta pattern
- Microsoft 365 Copilot "oversharing" (2024, ongoing)latent permission debt made discoverable at scale, delayed 40% of surveyed rollouts 3+ months
- Slack AI leaks private data through a public channel (2024)cross-channel data exfiltration via indirect prompt injection
- The approval gate that only checked half the cases (2025)remote code execution, CVE-2025-54130, CVSS 7.5
- The config file that writes vulnerable code on purpose (2025)hidden instructions in configuration, no special access required
- The tool you approved isn't the tool you're running (2025)MCP tool-definition compromise, CVE-2025-54136 (CVSS 8.8)
Design questions
Staff-level AI system design interviews. They also rotate into your daily Interview, every other day.
- Build a shared eval platform for many product teamsevals, observability, platformsenior · 45 min
- Choose between a single agent and a multi-agent systemagents, multi-agent, architecturesenior · 45 min
- Design a legal RAG assistant with trustworthy citationsknowledge, rag, citations, regulatedsenior · 45 min
- Design a long-running research agentagents, context-management, multi-agentsenior · 45 min
- Design a multi-tenant enterprise knowledge assistantknowledge, rag, multi-tenancy, hybrid-searchsenior · 45 min
- Design a sandbox for an unattended coding agentsecurity, agents, sandboxing, blast-radiussenior · 45 min
- Design AI governance and audit for a regulated companyproduction, governance, compliance, auditsenior · 45 min
- Design an LLM gateway with routing, caching and budgetsproduction, gateway, cost, caching, routingsenior · 45 min
- Design an MCP gateway for a company's internal agentssecurity, mcp, agents, oauthsenior · 45 min
- Design durable execution for a crash-prone agentagents, durability, idempotencysenior · 45 min
- Design multi-provider failover for an LLM-dependent productproduction, reliability, failoversenior · 45 min
- Design permission-aware search over enterprise documentsknowledge, rag, permissions, securitysenior · 45 min
- Design the AI platform for a 5,000-employee bankplatform, security, evals, knowledge, production, governancesenior · 60 min
- Diagnose and calibrate a miscalibrated LLM judgeevals, llm-judge, observabilitysenior · 45 min
- Make a refund-issuing support agent reliableagents, reliability, idempotencysenior · 45 min
- Review a RAG copilot for data exfiltration risksecurity, rag, exfiltration, prompt-injectionsenior · 45 min
- Safely roll out a model swap for a production agentevals, rollout, reliabilitysenior · 45 min
- Secure an email-reading support agent with refund authoritysecurity, agents, prompt-injectionsenior · 45 min