
Replicating Anthropic's Self-Service Analytics
A Practitioner's Implementation Guide
Step-by-step guide to replicating Anthropic's internal self-service analytics system — the one that automated 95% of business analytics quer.
You can read the contents and the first 2,000 characters.
Free accounts get the whole book.
- By Matan Marudi
- 12 chapters
- Updated Nov 2, 2026
- 78 readers
What’s inside
- The System Anthropic Built
- Building the Data Foundation
- Building the Skills
- The Agentic Loop
- The Evaluation System
- Going to Production
From the first page
A working blueprint for building an LLM-driven analytics system that automates 95% of business questions at 95% accuracy. All specifics traced to the Anthropic engineering blog post by Chen Chang, Clement Peng, Justin Leder, Johanne Jiao, and Josh Cherry (June 2026). Templates included are complete and copy-paste ready.
This book is written for Claude Code so it can guide a data engineer or analytics engineer through replicating Anthropic's stack. Each chapter is actionable. The target reader is technically fluent and impatient: the prose is dense and the examples are real.
Anthropic built an internal self-service analytics system that resolves natural-language questions to correct SQL against the company's warehouse with approximately 95% accuracy. About 95% of business analytics queries that previously routed to human analysts now flow through this system without intervention. In some domains, accuracy peaks near 99%.
The 21% baseline is the number to internalize: without the skills, sources of truth, and validation harness described in this book, a fluent LLM with warehouse access answers only about one-in-five analytics questions correctly. Most of those wrong answers look right. That gap — 21% to 95% — is engineering work, not a model upgrade.
The 95% number is aggregated over a production query stream. It includes both queries the system answered correctly on first attempt and queries where the adversarial reviewer caught and corrected a mistake before the answer was returned. It excludes queries where the system explicitly refused (red flag detection, ungated domains, missing authentication).
Preview · 2,000 of 171,187 characters
Contents
- 01Replicating Anthropic's Self-Service Analytics: A Practitioner's Implementation Guidep.1
- 02The System Anthropic Builtp.2
- Chapter 1: What They Built and Why It Worksp.2
- Chapter 2: The Three Failure Modesp.2
- Chapter 3: The Four-Layer Architecturep.2
- 03Building the Data Foundationp.3
- Chapter 4: Canonical Datasets — Your Single Sources of Truthp.3
- Chapter 5: The Semantic Layerp.3
- Chapter 6: The Query Corpus — What to Skip and What to Keepp.3
- 04Building the Skillsp.4
- Chapter 7: What Skills Arep.4
- Chapter 8: Writing Knowledge Skillsp.4
- Chapter 9: Writing Unbook Skillsp.4
- Chapter 10: The Skill Taxonomy — Organizing for Scalep.4
- 05The Agentic Loopp.5
- Chapter 11: System Prompt Architecturep.5
- Chapter 12: Adversarial Review Sub-Agentsp.5
- Chapter 13: Provenance Footersp.5
- Chapter 14: Entity Disambiguationp.5
- 06The Evaluation Systemp.6
- Chapter 15: Offline Evals — The Foundationp.6
- Chapter 16: Eval Versioningp.6
- Chapter 17: Correction Harvestingp.6
- Chapter 18: The CI/CD Enforcement Systemp.6
- 07Going to Productionp.7
- Chapter 19: The 3-Week Launch Planp.7
- Chapter 20: Monitoring and Governancep.7
- Chapter 21: Scaling Across Domainsp.7
- Chapter 22: What NOT to Dop.7
- 08Appendix A: Copy-Paste Templatesp.8
- A.1 Knowledge Skill — Index Filep.8
- A.2 Knowledge Skill — Domain Reference Filep.8
- A.3 Unbook Skill — Main Filep.8
- A.4 Analysis Pattern — Retention Curvep.8
- A.5 Analysis Pattern — Rate Decompositionp.8
- A.6 Analysis Pattern — Funnel Analysisp.8
- A.7 System Prompt — Full Templatep.8
- A.8 Adversarial Reviewer — Prompt Templatep.8
- +6 more sections
See all 12 parts
- 09Appendix B: Accuracy Diagnostic Checklistp.9
- Step 1: Identify the failure categoryp.9
- Step 2: If concept-entity ambiguity dominatesp.9
- Step 3: If staleness dominatesp.9
- Step 4: If retrieval failure dominatesp.9
- Step 5: If "other" dominatesp.9
- Step 6: Re-run evalsp.9
- 10Appendix C: Tool Stack Optionsp.10
- Semantic layerp.10
- Warehousep.10
- Skill storagep.10
- Eval trackingp.10
- Correction harvestingp.10
- 11Appendix D: Glossaryp.11
- 12Extended Practitioner Sectionsp.12
- The No-Semantic-Layer Onboarding Pathp.12
- Cross-Grain Derived Metricsp.12
- Pattern: Trailing-Period Deviation Flaggingp.12
- Query Cost Controlsp.12
- Cost Estimate Reconciliationp.12
- Event Naming Conventionp.12
- Chapter 11a: The Meta-Tool Pattern — One Exec Surface Instead of Forty Toolsp.12
- Chapter 14a: Choosing a Chart Type for Rate-by-Category Metricsp.12
- +3 more sections




