Home/ Part XV — Troubleshooting, Checklists, and Reference/45. Common Failure Modes (And Fix Recipes)

45. Common Failure Modes (And Fix Recipes)

Overview and links for this section of the guide.

Failure Mode Overview

LLMs fail in predictable ways. Learn the patterns, apply the fixes:

┌─────────────────────────────────────────────────────────────────┐
│                    COMMON FAILURE MODES                          │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  IGNORES INSTRUCTIONS                                            │
│  └─ Fix: Structured prompts, examples, repeat key rules         │
│                                                                  │
│  MESSY OUTPUT                                                    │
│  └─ Fix: Schema enforcement, output format examples             │
│                                                                  │
│  CONFIDENT BUT WRONG                                             │
│  └─ Fix: RAG, self-consistency, uncertainty markers             │
│                                                                  │
│  INCONSISTENT                                                    │
│  └─ Fix: Lower temperature, few-shot examples, testing          │
│                                                                  │
│  TOO SLOW/EXPENSIVE                                              │
│  └─ Fix: Smaller model, caching, prompt compression             │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Quick Fix Guide

Symptom First Try Then Try
Ignores rules Move rules to end of prompt Add examples showing rule-following
Wrong format Use response_mime_type: 'application/json' Add schema to prompt
Makes stuff up Add "If unsure, say so" Use RAG with citations
Different each time Set temperature=0 Add few-shot examples
Too slow Use Flash instead of Pro Reduce context size

Where to go next