Prompt recipes and pattern library
Twenty complete, copyable prompts — one per task — each annotated line by line, with the failure it prevents and the signal that says it has stopped working.
Almost every “prompt template” page is a list. It gives you the text and nothing else, so the first time it does not work you have no way to repair it — you cannot tell which line was load-bearing, which was decoration, and which was actively causing the problem. That is why those pages are useful exactly once.
These pages are built the other way round. The prompt comes first and complete, so you can copy it and run it. Then every part of it is justified: what that line is for, what happens when you delete it, and what it costs in tokens. Then the failure it prevents, shown as an actual bad output rather than a warning. Then the drift signal — the thing you watch that tells you the recipe has stopped working, before a user does.
A recipe you cannot edit is a recipe you will replace. The point of the annotation is that when your labels change, your schema grows, or you move to a different model, you can take this apart and put it back together for your own case rather than starting again.
A System Prompt You Can Actually Reuse
A complete 268-word system prompt for a grounded assistant, with a justification for every line and the failure each one prevents.
11 min read
Summarisation Prompts That Keep the Numbers Right
A two-call summarisation recipe — extract verbatim, then compress against the extract — with a numeric fidelity check that runs in fifteen lines of Python.
12 min read
Classification Prompts With Stable Labels
A classification prompt built from label definitions, ordered tie-breaks and a blessed none-of-these label, with an evidence span on every decision.
12 min read
Extraction Prompts for Messy Documents
A field-by-field extraction prompt with evidence spans, a three-way not-found convention, and a verifier that rejects any unquoted value.
13 min read
Rewriting Prompts That Do Not Destroy Meaning
A rewriting prompt with constraints in explicit priority order, plus a two-stage diff check that catches the facts a rewrite invents.
12 min read
Translation Prompts With Glossary Enforcement
A translation prompt that locks terminology and declares forced grammatical choices, plus a back-translation gate that never sees the source.
13 min read
Code Prompts That Produce Runnable Code
A code generation prompt that puts conventions first and tests last, uses the tests as the specification, and forbids the model from editing them.
12 min read
Code Review Prompts That Find Real Problems
A review prompt with a three-level severity rubric, a ban on style-only findings, and a trigger field that speculative findings cannot fill.
12 min read
Putting a 200-Table Schema Into a Prompt
How to serialise a large database schema so it fits, select the handful of tables a question needs, and enforce read-only where enforcement actually lives.
14 min read
Prompts That Apply Business Rules
A rule table in, a decision plus the rule it cited out — with conflict and insufficient-data as first-class outcomes rather than silent guesses.
12 min read
Question Generation and Grading Prompts
A question generator with difficulty defined by the work required, keys that carry their spans, and a control that falsifies the difficulty claim.
12 min read
Prompts for Understanding a Search Query
One cheap call returning intent, entities, filters, a rewrite and expansions, with the token arithmetic and the timeout that keeps it off the critical path.
12 min read
Agent System Prompts: Tools, Limits, Stop Conditions
A complete agent system prompt in five sections, with the rule that every limit written in the prompt needs a twin enforced in the loop.
13 min read
Guardrail Prompts: Refusing Well
A refusal prompt that answers the part it can, names the limit specifically, and routes — plus the allowed-set test that measures what a guardrail costs.
12 min read
Rubrics Two Judges Agree On
Three anchored levels per criterion, ordering controls against position bias, and a kappa harness that says whether the rubric or the judge is at fault.
14 min read
Triage Prompts for Meetings, Calls and Tickets
One output schema across three input types, with the per-type evidence rules that differ and routing applied deterministically afterwards.
12 min read
Brand-Voice Prompts That Survive Forty Turns
Voice as measurable constraints rather than adjectives, why it decays over a long conversation, and a drift report that runs before a turn is recorded.
12 min read
Prompts for Data Cleaning and Normalisation
Where the boundary between deterministic code and a model actually falls, and a prompt for the residue that proposes rules rather than values.
12 min read
Multi-Turn Prompts for Gathering Information
A slot-filling conversation prompt with a computable completion criterion, an inferred-versus-filled distinction, and state held in code, not the transcript.
12 min read
Turning a Working Prompt Into a Reusable Recipe
The metadata a prompt needs to be maintainable by somebody else: dependencies, an eval gate, a cost line, and the fails_when field that nobody writes.
12 min read
Other topics
- LLM fundamentals & architecture
- Tokens, tokenization & context windows
- Prompt engineering
- Reasoning models & test-time compute
- Multimodal AI: vision, audio, video
- RAG & retrieval
- Embeddings & vector search
- AI agents & tool use
- Structured output & function calling
- Fine-tuning & post-training
- Inference, serving & latency
- Evaluation, benchmarks & LLM-as-judge
- Observability & LLMOps
- Hallucination & failure modes
- LLM cost engineering
- AI security & prompt injection
- Privacy, compliance & data residency
- AI governance, policy & society
- Building reliable AI applications
- AI hardware, GPUs & compute
- Open-weight models & local inference
- AI for developers & coding agents
- AI in industry: vertical playbooks
- AGI, superintelligence, alignment & the long future
- Machine learning foundations
- NLP fundamentals & classical tasks
- Data engineering for AI
- Synthetic data & dataset curation
- AI product design & UX
- Search, ranking & recommendation
- Enterprise adoption & change management
- AI careers, skills & teams
- Reading AI research
- AI in science & discovery
- Robotics & embodied AI
- AI economics, markets & business models
- AI myths, hype & media literacy
- Context engineering
- Shipping AI features: patterns & anti-patterns
- Build it: end-to-end AI tutorials
- Python for AI: hands-on recipes
- TypeScript, React and the web
- Frameworks and SDKs
- Errors and troubleshooting
- AI facts, numbers and statistics
- The history of AI
- The maths behind AI
- Architectures beyond the transformer
- Reinforcement learning
- Diffusion and generative media
- Speech, audio and voice engineering
- Benchmarks, one at a time
- AI search visibility
- Infrastructure and operations
- Databases and storage for AI
- Knowledge graphs and structured knowledge
- Classical ML in production
- Regulation, jurisdiction by jurisdiction
- AI for people who do not write code
- Writing, media and creative work
- Edge and on-device AI
- Interpretability and model internals
- Field notes