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
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
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
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:
RAG system prompt from the embeddings QA recipe. The closing sentence is what stops hallucinations on questions outside the retrieved articles. Paired role message: You answer ques
OpenAI's recommended pattern for summarizing an article into a fixed schema. Each field is described inline so the model knows exactly what the JSON shape means. Source: https://co
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
Named entity recognition prompt that locks the model to a single, closed label set. Pinning the categories is what makes the output safe to feed into a downstream parser. User turn