From the basic workflows.ipynb notebook in patterns/agents . Demonstrates the 'route' workflow: classify a ticket, then dispatch to a specialized sub prompt. Reproduced verbatim ar
From the basic workflows.ipynb notebook in patterns/agents . Demonstrates the 'route' workflow: classify a ticket, then dispatch to a specialized sub prompt. Reproduced verbatim ar
Chapter 9 of Anthropic's interactive prompt engineering tutorial includes this complex legal services prompt that demonstrates retrieval over research with citation formatting, pre
Chapter 8 Avoiding Hallucinations . A grounded QA template: extract the most relevant quote into <scratchpad , judge whether it answers the question, and only then write a brief nu
From the Anthropic cookbook's building moderation filter.ipynb . A production style moderation prompt that uses explicit ALLOW/BLOCK guidelines, a <thinking scratchpad, and an <out
From the cookbook's summarization guide. A focused prompt for sublease/legal agreement summarization that uses a system role, explicit section headers, an XML output format, prefil
Anthropic Chapter 6 Precognition / Thinking Step by Step . The canonical 'let Claude argue both sides before deciding' template. Pairs a savvy reader system prompt with explicit XM
Anthropic's metaprompt, from the official cookbook, is a battle tested 'prompt that writes prompts'. Feed it a task and an optional list of input variables; it returns a fully stru
Chapter 4 Separating Data and Instructions . Compares the un tagged form 'Yo Claude. {EMAIL} < Make this email more polite' with the safer tagged form below. The XML wrap is what s
From the Anthropic prompt engineering guide section on agentic systems. A concrete system prompt snippet that tells Claude Opus 4.7 when to spawn subagents counter balancing its de
From how to make sql queries.ipynb in the cookbook. A minimal, schema aware text to SQL prompt that constrains the model to output only the SQL. A more reliable extended version, f
From patterns/agents/evaluator optimizer.ipynb . Two cooperating prompts: a generator that produces a solution with <thoughts and <response blocks and an evaluator that returns PAS
From misc/generate test cases.ipynb in the cookbook. A meta prompt that takes a prompt template with {{variables}} and generates synthetic test cases in a structured XML format the
From the official Anthropic prompt engineering guide for the Claude 4.7 family. Two single line additions that calibrate verbosity in either direction useful as a system prompt fra
Appendix 10.1 Chaining Prompts . Two turns: 1 ask for ten words ending in 'ab'; 2 follow up with a request to replace any non real words. Demonstrates the multi turn 'have Claude d
The few shot variant of Anthropic's moderation cookbook. Demonstrates that, for short labels, well chosen positive and negative examples often beat chain of thought. Source: https:
From the same Anthropic prompt engineering guide. The canonical XML tagging recipe for any prompt that mixes instructions, context, examples, and variable inputs used throughout th
Chapter 7 Using Examples / Few Shot . Demonstrates how two worked examples of a paragraph structured individuals list train Claude to produce the same shape on a new paragraph, no
Verbatim system prompt from the Anthropic Research multi agent pattern. The 'research lead' classifies a user query as depth first, breadth first, or straightforward, then plans an
From the cookbook's using citations.ipynb . Pairs the Claude Citations API with a short, focused system prompt to ground answers in help center documents. Cited spans are returned
From Chapter 9 of Anthropic's interactive prompt engineering tutorial. A canonical complex prompt skeleton that combines task context, tone, rules, examples, conversational history