Decision Guide
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
Section titled “I need to reduce costs”How are you currently calling LLMs?
- Direct API calls with no intermediary → Start with LLM Gateway Pattern
- Single provider, single model for everything → Start with Model Router Pattern
- Seeing many repeated or similar queries → Start with Semantic Caching
- Long context windows eating your budget → Start with Prompt Compression Pattern
- No visibility into per-feature spend → Start with Cost Attribution Pattern
I need to improve reliability
Section titled “I need to improve reliability”What kind of failures are you seeing?
- Provider outages causing downtime → Start with Fallback Chain and Circuit Breaker for LLMs
- Quality degradation after prompt or model changes → Start with Prompt Regression Guard
- Silent quality drops nobody notices → Start with Quality Drift Detection
- No safe way to roll out model changes → Start with Canary Deployment for Models
I need better retrieval / RAG
Section titled “I need better retrieval / RAG”What does your knowledge base look like?
- Static documents, FAQ-style → Classic RAG Pattern
- Complex relational data, multi-hop questions → GraphRAG Pattern
- Need both keyword and semantic matching → Hybrid Search Pattern
- Retrieval quality is inconsistent → Reranking Pattern
- Need to remember across user sessions → Contextual Memory Pattern
I need to handle security and compliance
Section titled “I need to handle security and compliance”What is your primary concern?
- Prompt injection and jailbreak attempts → Input Sanitization Pattern
- PII in model inputs or outputs → PII Scrubbing Pipeline
- Need structured, type-safe outputs → Structured Output Enforcement
- Audit requirements for model interactions → Audit Trail Pattern
- Regulatory compliance (EU AI Act, HIPAA) → Policy-as-Code Pattern
I need observability
Section titled “I need observability”What can you not see today?
- What is happening inside multi-step chains → Span-Level Tracing Pattern
- How much each feature or user costs → Cost Attribution Pattern
- Whether output quality is changing over time → Quality Drift Detection
- How to set meaningful SLAs → SLO Pattern for AI
I am building agent systems
Section titled “I am building agent systems”Agents combine multiple patterns. A typical production agent stack includes:
- LLM Gateway Pattern for routing and observability
- Least-Privilege Tool Access for safe tool use
- Agent Action Log Pattern for auditability
- Human-in-the-Loop Gate for high-risk actions
- Cost Circuit Breaker for runaway prevention
- Contextual Memory Pattern for session persistence
I need graph-based intelligence
Section titled “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
Section titled “I need to evaluate and test AI quality”What is your primary evaluation challenge?
- Need automated quality scoring at scale → Start with LLM-as-Judge
- Quality is degrading after prompt or model changes → Combine LLM-as-Judge with Span-Level Tracing
- Need a quality gate before deploying changes → Build an eval pipeline with LLM-as-Judge scoring