Building Production-Grade AI Applications at Scale
Introduction: Why Claude Fable 5 Changes the Game
Chapter 1: The Claude Fable 5 Model Landscape
- The Mythos Tier: Beyond Opus
- API Specifications and Configuration
- Safety Architecture and Refusal Handling
- Data Retention and Privacy
- Platform Availability and Migration
- Choosing Fable 5 vs. Other Models
- Key Takeaways
Chapter 2: Foundations of Claude Prompting
- Clarity and Directness
- Role Assignment
- Few-Shot and Multishot Examples
- XML Structuring
- Chain-of-Thought Reasoning and Adaptive Thinking
- Output Format Steering
- Long Context Best Practices
- Model Identity and API Nuances
- Common Prompt Mistakes
- Exercises
- Key Takeaways
Chapter 3: System Prompt Architecture
- Anatomy of a Claude System Prompt
- Role Definition and Behavioral Constraints
- Tool-Use Defaults and Overtriggering Prevention
- Multi-Prompt Strategies and CLAUDE.md
- Prompt Versioning and Testing
- Anti-Patterns in System Prompt Design
- System Prompt Templates
- Exercises
- Key Takeaways
Chapter 4: Context Engineering at Scale
- Prompt Caching: Mechanics and Strategy
- Caching Pricing and Token Accounting
- Minimum Content Lengths for Caching
- Cache Invalidation Rules
- Server-Side Compaction
- Context Editing (Beta)
- Context Management Strategies for Long-Running Applications
- Token Budgeting and Cost Optimization
- Limitations and Edge Cases
- Exercises
- Key Takeaways
Chapter 5: Tool Use and MCP Integration
- Programmatic Tool Calling Patterns
- Tool Description Design
- Parallel vs. Sequential Tool Calling
- Security and Path Traversal Protection
- The Model Context Protocol (MCP)
- Building Custom MCP Servers
- MCP Client Integration
- Combining MCP with Programmatic Tools
- Debugging Tool Use Issues
- Exercises
- Key Takeaways
Chapter 6: Memory Systems and Cross-Session Persistence
- The Memory Tool: Architecture and Operations
- Client-Side Implementation
- Just-in-Time Retrieval Patterns
- Multi-Session Development Workflows
- Context Editing + Memory: The 39% Improvement
- Hybrid Memory Architectures
- Security and Data Hygiene
- Memory File Organization
- Exercises
- Key Takeaways
Chapter 7: RAG and Knowledge-Augmented Generation
- The RAG Pipeline: From Documents to Answers
- Baseline RAG Performance
- Level 2: Summary Indexing
- Level 3: Re-Ranking with Claude
- Contextual Retrieval: Anthropic’s Approach
- Chunking Strategies for Long-Context Models
- Embedding Model Selection
- Prompt Design for RAG Generation
- Evaluation Framework
- Trade-offs and Design Decisions
- Exercises
- Key Takeaways
Chapter 8: Agent Workflows and Orchestration
- Sequential Workflows
- Parallel Workflows
- Evaluator-Optimizer Workflows
- Dynamic Workflows: Subagent Orchestration at Scale
- State Management Across Sessions and Context Windows
- Failure Handling and Graceful Degradation
- Choosing the Right Workflow Pattern
- Combining Patterns
- Exercises
- Key Takeaways
Chapter 9: Evaluation and Testing Frameworks
- The Structure of an Evaluation
- Grader Types: Code-Based, Model-Based, and Human
- pass@k vs pass^k Metrics
- Capability vs. Regression Evals
- Evaluating Different Agent Types
- Building Evals: A Step-by-Step Roadmap
- Promptfoo Integration
- Beyond Automated Evals: A Holistic View
- Eval Frameworks and Tools
- Exercises
- Key Takeaways
Chapter 10: Safety, Guardrails, and Responsible Deployment
- Fable 5’s Safety Classifiers
- Refusal Handling: The New Normal
- Prompt Injection Defenses
- Jailbreak Resistance and Red-Teaming
- Data Privacy and Zero Data Retention
- Compliance Considerations
- Safety in Agent Workflows
- Compliance Checklist
- Exercises
- Key Takeaways
Chapter 11: Debugging, Optimization, and Production Deployment
- The Five Categories of Prompt Failure
- The Systematic Debugging Workflow
- Common Claude Code Anti-Patterns
- Latency Optimization
- Cost Optimization
- Production Deployment Practices
- Claude Code Best Practices for Production
- Debugging Common Production Issues
- Exercises
- Key Takeaways
Chapter 12: End-to-End Projects and Real-World Case Studies
- Project A: Customer Support Agent with RAG, Memory, and MCP Integration
- Project B: Research Agent with Parallel Subagents and Evaluation Harness
- Case Study 1: Stripe’s Fifty-Million-Line Migration Using Claude Fable 5
- Case Study 2: Drug Design Acceleration in Life Sciences
- Reusable Template Library
- Exercises
- Key Takeaways
- Conclusion
