Skip to content

Getting Started

Production AI Patterns is a structured pattern library for engineers building AI systems in production. It is not an awesome list of links, not vendor documentation, and not a research paper collection. It is a curated set of named patterns with descriptions, trade-offs, when-to-use guides, and code examples for every layer of a production AI system.

Browse the sidebar. Patterns are organized into 8 pillars. Each pillar covers a distinct layer of a production AI system.

Use the Decision Guide to answer a few questions about your system and get recommended patterns.

Read through the pillars in order. They roughly follow the lifecycle of a request through a production AI system:

  1. Inference & Serving — How requests reach models and how responses come back.
  2. Data Patterns for AI — The data foundation every AI system depends on.
  3. Reliability & Resilience — Keeping AI systems working when things go wrong.
  4. Retrieval & Memory — What knowledge AI systems can access and remember.
  5. Observability & Monitoring — Seeing what your AI system is actually doing.
  6. Security & Trust — Guardrails, PII handling, and prompt injection defenses.
  7. Cost & Efficiency — Running AI systems without unbounded spend.
  8. Governance & Compliance — Lineage, model cards, and compliance operations.
  9. Graph Patterns — Knowledge graphs, graph-based reasoning, and entity resolution.
  10. Evaluation & Testing — LLM-as-Judge, eval pipelines, and regression testing.

Every pattern follows the same structure:

SectionPurpose
What It IsOne paragraph plain-language description
The Problem It SolvesWhat breaks without this pattern
How It WorksStep-by-step mechanism with diagrams
When to Use ItSpecific conditions and workload types
When NOT to Use ItExplicit anti-use-cases
Trade-offs2-4 honest trade-offs
Implementation ExampleMinimal working code snippet
Tool LandscapeTools that implement or support the pattern
Related PatternsLinks to adjacent patterns
Further Reading2-4 high-quality external references

The When NOT to Use It section is the most important. It is what makes this resource opinionated rather than encyclopedic.

Each pattern has a status indicating its maturity level:

  • Proposed — Pattern identified, not yet validated in production systems.
  • Emerging — Used by early adopters, trade-offs still being understood.
  • Validated in Production — Widely used by multiple teams, trade-offs well understood.

This is an open-source project. If you have used a pattern in production and want to share it, or if you see something that needs correction, see the Contributing Guide.