Prompt engineering
Which prompting techniques actually change a model's output, which ones better models absorbed, and how to tell the difference on your own workload.
Prompt engineering acquired a bad reputation honestly. A great deal of what was published between 2022 and 2024 was folklore: phrases that worked once, on one model, for reasons nobody isolated, repeated until they became advice. Then the models improved and most of it stopped doing anything.
What is left is narrower and more durable. A prompt is the entire program — there is no state between calls — so everything the model can use has to be in it, arranged so the model can find it, in a shape you can check in code. These pages are about that: what to put in, where to put it, what to stop putting in, and how to know which is which without trusting anyone’s list of tricks, including this one.
Prompt Engineering: What Still Works in 2026
The techniques that survived three generations of better models, the ones the models absorbed, and the order to try them in.
5 min read
System Prompts: What Belongs There and What Does Not
A placement rule for every kind of instruction, derived from what actually differs between the system role and the user role.
5 min read
Few-Shot Prompting: How Many Examples Is Enough?
What examples actually teach a model, what the published literature says about the shape of the accuracy curve, and the exact cost of every extra shot.
5 min read
Chain of Thought Is Now Built In. Should You Still Prompt for It?
When an explicit reasoning instruction still earns its output tokens, and when it duplicates work the model is already billing you for.
5 min read
Role Prompting: Does "You Are an Expert" Do Anything?
What the published persona studies found, why the mechanism predicts exactly that result, and the part of role prompting that does still work.
4 min read
Delimiters, XML Tags and Structuring a Long Prompt
How to separate instructions from data so a model can tell them apart, and why each family documents a different convention.
5 min read
Negative Instructions: Why "Don't" Often Backfires
Why prohibitions are a weak instruction form, ten real ones rewritten into positives, and what to enforce in code instead.
5 min read
Prompt Chaining vs One Big Prompt
A cost model for decomposition you can run on your own token counts, and the error arithmetic that decides the accuracy side.
5 min read
Self-Consistency: Sampling Five Times and Voting
The majority-vote technique, the gains its authors reported, and the break-even calculation that tells you whether five times the cost is worth it for you.
5 min read
ReAct: Interleaving Reasoning and Tool Calls
The loop behind almost every agent, as the original paper defined it and as it looks now that tool calling is an API feature.
5 min read
Meta-Prompting: Using an LLM to Write Your Prompts
The optimiser loop, the published results that make it credible, and the statistics that explain why most of its wins evaporate.
5 min read
Prompt Templates and Variables Without a Framework
Why string interpolation breaks on prompts specifically, and a hundred-line templating layer that fails loudly instead.
6 min read
Versioning Prompts Like Code
A git-based workflow where every prompt change is a diff, every generation is attributable to a version, and the eval runs in CI.
5 min read
Why the Same Prompt Behaves Differently on Every Model
The nine ways a working prompt breaks when you point it at another model, each with the symptom you will actually see first.
4 min read
Prompt Compression Without Losing Accuracy
What to cut from a prompt first, ordered by how recoverable the loss is, and the harness that tells you when you have cut too far.
6 min read
Instruction Following: Why Models Ignore Rule 7 of 12
Why compliance degrades as rules accumulate, how to measure it on your own rule set, and what to do instead of adding rule 13.
5 min read
Output Formatting: Consistent Shapes Without JSON Mode
Getting parseable output from models with no structured-output support: format choice, prompt-side tactics, tolerant parsing and a retry that works.
5 min read
Prompting for Refusals: Making a Model Say "I Don't Know"
Abstention as a designed output rather than a hoped-for behaviour: give it a literal, make it evidence-backed, and measure both directions.
5 min read
A/B Testing Prompts in Production
Splitting traffic between two prompts, sizing the experiment before you run it, and the analysis mistakes that make prompt tests unusually easy to get wrong.
5 min read
The Prompt Engineering Techniques That Stopped Mattering
A graveyard with causes of death: what the models absorbed, what the APIs replaced, and what was never real to begin with.
4 min read
Other topics
- LLM fundamentals & architecture
- Tokens, tokenization & context windows
- 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
- Local inference errors, string by string
- Running local models day to day
- Testing code that calls an LLM
- Snapshot and property testing for model output
- Regression suites for prompts
- Eval gates in CI
- Flaky tests against a model
- Determinism and the cost of testing
- Contract and streaming tests
- Testing tool calls and retrieval
- Inference, serving & latency
- Rolling out a prompt change
- Testing AI systems in practice
- Forecasting a time series
- Machine learning on tabular data
- Geospatial data and models
- Understanding audio that is not speech
- Understanding video
- Core computer vision tasks
- Machine learning on graphs
- Point clouds and 3D
- Evaluation, benchmarks & LLM-as-judge
- Sensor and IoT data
- Logs and event streams
- Models over biological sequences
- Machine learning on molecules
- Embedding and searching code
- Extracting invoices and purchase orders
- Receipts, statements and tax forms
- Insurance policies and contracts
- Deeds, court filings and patents
- Extracting from medical records
- Observability & LLMOps
- CVs, certificates and identity documents
- Shipping, customs and technical documents
- Meetings, email, chat and filled-in forms
- Building an extraction pipeline
- Business, property and inspection documents
- Contract clauses and insurance claims
- Regulated and compliance documents
- Consumer, travel and closing documents
- Mapping one chat API onto another
- SDK and framework migrations
- Hallucination & failure modes
- Re-embedding and model deprecation
- Cutting over between providers
- Parity gaps, shims and legacy endpoints
- Moving between model versions
- Migrating vector stores and caches
- Mapping capabilities and parameters
- Migrating pipelines and agents
- Contracts, runbooks and rollback
- Auditing a codebase before a cutover
- Compliance and fine-tune migration
- LLM cost engineering
- Routing, cost tracking and multi-tenancy
- What a migration does to your prompts
- 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
- Prompt recipes and pattern library
- AI for people who do not write code
- Writing, media and creative work
- Edge and on-device AI
- Interpretability and model internals
- Field notes
- OpenAI model behaviour
- Claude model behaviour
- Gemini model behaviour
- Llama model behaviour
- Mistral model behaviour
- Qwen model behaviour
- DeepSeek model behaviour
- Cohere model behaviour
- Grok model behaviour
- Small model behaviour
- Hybrid model architectures
- Token cost by language and script
- Transliteration, romanization and script handling
- Locale-correct output
- Multilingual generation quality
- Multilingual pipelines
- The EU AI Act, article by article
- AI under the GDPR and EU data law
- US AI regulation, state and sector
- International AI governance and standards
- AI litigation and enforcement
- Running AI workloads on AWS
- Running AI workloads on Google Cloud
- Running AI workloads on Azure
- AI at the edge: Workers, Vercel and Netlify
- Serving models on Kubernetes
- Operating AI infrastructure
- Quantization formats and what they cost
- llama.cpp, flag by flag
- Ollama and the desktop local-model runtimes
- Local models on Apple Silicon
- Hardware for local inference
- Running speech and embedding models locally
- Model files, adapters and conversion
- VRAM arithmetic for local models