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:
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:
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
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
Worked HotpotQA example from Yao et al. 2022 showing the ReAct pattern: interleave reasoning traces with tool actions to ground answers in retrieved evidence. Source: https://githu
Microsoft's documented chatbot template. The two line instruction block is what keeps the assistant from answering off topic questions, and the IRS fallback URL prevents hallucinat
Synthetic eval data generator from the OpenAI Evals cookbook. Used to bootstrap a test set from nothing more than a table schema. Source: https://cookbook.openai.com/examples/evalu
Classic 1 shot example from Brown et al. 2020 GPT 3 paper showing in context learning: define a new word, give one usage example, and the model generalizes. Source: https://github.
Canonical ReAct exemplar from Yao et al. The thought/action/observation rhythm is what makes ReAct prompts work copy this shape when wiring an LLM to a search tool. Source: https:/
Guides you on enriching LLM prompts with database schemas, sample data, and table relationships to improve generated SQL quality. Use this when Claude is producing inaccurate or in
Classic Wei et al. few shot CoT exemplars. Each example shows the reasoning trace explicitly, which conditions the model to do the same on the final query. Source: https://www.prom
Canonical example from Wei et al. 2022 showing how interleaving worked reasoning into few shot exemplars dramatically improves arithmetic and commonsense tasks. Source: https://git
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
Wang et al. self consistency uses the same CoT shape as Wei et al., then samples multiple reasoning paths and majority votes. Use these exemplars verbatim and sample at temperature