Regression suites for prompts
Sizing, scoping and running a suite against a prompt that changes weekly, and why a green suite still misses regressions.
A regression suite for ordinary code answers a question with a yes or a no: given this input, is the output still what it was. A prompt has no such question available to it. The output is drawn from a distribution, so the same input run twice is two different strings, and the assertion everybody reaches for first — that the model still says what it said — fails on days when nothing is wrong and passes on days when something is. The suite that results is a red build people learn to ignore, which is worse than no suite, because it costs money and buys distrust.
These pages are about the two decisions that actually make the suite work: what you assert on when you cannot assert on the text, and how big the thing is allowed to get before it stops being run. Both are arithmetic more than taste. The rest — organising cases by failure mode, tagging them to the prompt revision they were written against, running only the ones a change can affect, and keeping a control run going so you can tell a provider’s change from your own — follows from getting those two right.
Sizing a Regression Suite for a Prompt That Changes Weekly
The suite size that survives a weekly prompt change is set by your triage budget, not by your CI budget, and the arithmetic goes the opposite way to intuition.
10 min read
Structuring a Prompt Regression Suite by Failure Mode
Organising cases by what they would catch rather than by which feature they exercise, so a red build tells you what broke before you open it.
10 min read
Running a Regression Suite Only on Changed Prompts
Making the dependency from a prompt to its tests visible to the test runner, so a one-prompt commit runs a handful of cases instead of all of them.
10 min read
Tagging Regression Tests to a Specific Prompt Version
A three-field convention that makes a failing case say which prompt revision it was written against, and one number it lets you compute about the whole suite.
9 min read
When a Passing Regression Suite Still Missed a Regression
The five ways a green prompt suite is compatible with a broken system, and why sampling once per case is the one that catches nearly everybody.
10 min read
Baseline Drift: Why Old Regression Tests Stop Meaning Anything
Stored outputs, stored thresholds and stored judgements each decay in a different direction as the model and the prompt move underneath them.
10 min read
Writing a Regression Test From a Support Ticket
Turning a customer complaint about model output into a permanent case: recovering the exact input, minimising it safely, and choosing the assertion the ticket actually implies.
10 min read
Parallelising a Slow Prompt Regression Suite
Choosing the concurrency number from your token-per-minute limit rather than from your CPU count, and finding the shared state that breaks when you do.
11 min read
Running the Same Regression Suite Against Two Model Versions
Using an existing suite as a migration gate: parameterising the model, running both versions paired in one job, and reading the four buckets the results fall into.
10 min read
Regression Testing After a Provider Silently Updates a Model
How a suite goes red on a commit that changed nothing, how to establish it was the provider rather than you, and why only a scheduled run on a frozen tree can tell you.
10 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
- 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
- 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