AI Engineering Patterns

Decision Guide

Answer questions about your AI system to get recommended patterns.

Use this guide to identify which patterns are most relevant to your current situation. Start with the question that best describes your primary concern.

I need to reduce costs

How are you currently calling LLMs?

I need to improve reliability

What kind of failures are you seeing?

I need better retrieval / RAG

What does your knowledge base look like?

I need to handle security and compliance

What is your primary concern?

I need observability

What can you not see today?

I am building agent systems

Agents combine multiple patterns. A typical production agent stack includes:

  1. LLM Gateway Pattern for routing and observability
  2. Input Sanitization for the front door
  3. Tool Output Firewall for the side door (tool results re-entering context)
  4. Circuit Breaker for LLMs for provider resilience
  5. Token Budget Pattern for runaway prevention
  6. Span-Level Tracing for debugging multi-step flows

I need graph-based intelligence

What are you trying to achieve with graphs?

  • Multi-hop questions that connect information across documents → Start with GraphRAG
  • Non-linear reasoning with branching and merging approaches → Start with Graph of Thoughts
  • Deduplicating entities across multiple data sources → Start with Entity Resolution Graph
  • Building a knowledge graph for your domain → Start with GraphRAG for the retrieval layer and Entity Resolution Graph for clean entity data

I need to evaluate and test AI quality

What is your primary evaluation challenge?