LLM Smoke Testing: A Fast Check That Your AI Still Works After Every Change

LLM Smoke Testing: A Fast Check That Your AI Still Works After Every Change

LLM smoke testing is a small, fast suite of checks that proves your language model application still works after a change, before that change reaches users. It answers the question every team asks after a deploy goes wrong: how do we catch the obvious breakage in minutes instead of hearing about it from users? The short answer is a handful of representative prompts, run automatically on every deployment, that fail loudly when the model stops answering, the retrieval breaks, or the output format changes.

Smoke testing matters because LLM applications break in ways that ordinary deployment checks cannot see. A service can return healthy status codes while the model refuses every request, the retrieval returns nothing, or the output no longer parses. A smoke test is the check that notices.

Key takeaways

  • LLM smoke testing is a small suite of representative prompts run on every deployment.
  • It checks that the system answers, retrieves, calls tools and returns parseable output.
  • Smoke tests catch obvious breakage fast; they do not measure quality in depth.
  • Keep the suite small and fast, or the team will stop running it.
  • A failed smoke test blocks the deploy; a passed one is not a guarantee of quality.

What is LLM smoke testing?

Smoke testing comes from hardware engineering, where powering on a device and checking for smoke was the first test after assembly. In software it means a shallow, broad check that the system basically works. For a language model application, that means sending a few representative prompts through the real system and confirming that sensible, well-formed answers come back.

A smoke test is not an evaluation. An evaluation scores quality across hundreds of cases; a smoke test asks whether the system functions at all. The distinction matters, because the two are often confused and the confusion is costly: a team that relies on smoke tests for quality will ship subtle regressions, and a team that runs a full evaluation on every deploy will wait so long that deploys stop happening. Our guide to building an LLM evaluation framework covers the deeper testing that smoke tests deliberately skip.

The suite should run in minutes, not hours. That constraint is what keeps it honest: if the checks take an hour, they will be skipped under pressure, and a skipped check protects nobody. Speed is a feature of a smoke test, not a compromise.

What a smoke test should cover

A good smoke suite covers the main paths through the system, not every feature. Pick the flows that users actually rely on: the main chat or completion endpoint, the most-used retrieval flow, and any tool or function call that is central to the product. Each flow gets one or two prompts that exercise it end to end.

For each prompt, check more than the status code. Confirm that a response arrived within the time limit, that it is not empty, that it parses into the expected format, and that it contains the kind of content expected, such as a reference to the retrieved documents or a completed tool call. A response that passes the status check but contains an apology and no answer is a failure, and the smoke test should say so.

Include a negative case or two. A prompt the system should refuse, or a question outside its knowledge, tests whether the guardrails and fallback behaviour still work. Systems that answer everything confidently are often systems whose refusal logic broke silently. The LLM evaluation metrics guide explains which signals work for deeper checks, once the smoke test has passed.

Designing the smoke test suite

Start with the happy path. Choose five to fifteen prompts that represent the most common real user requests, drawn from production logs rather than invented. A prompt taken from a real conversation is worth more than ten imagined ones, because it reflects what users actually ask and how they phrase it.

Keep the assertions loose. A smoke test should not fail because the model worded an answer differently from yesterday; it should fail because the answer is missing, malformed, empty, or clearly wrong in a way a simple check can detect. Useful assertions include checking that the response is non-empty, that it parses as the expected format, that it stays within a length range, and that it mentions a key fact from the retrieved context. Tight assertions turn the smoke test into a flaky test, and flaky tests get disabled.

Make the suite deterministic where possible. Set the temperature low for smoke test calls, so the same prompt produces similar output on each run. Non-determinism is the enemy of a fast gate: a test that passes on retry without any change teaches the team that failures do not matter. Best for: any team deploying LLM changes regularly, where a five-minute check can prevent a broken release.

Smoke tests versus regression tests

Smoke tests and regression tests are neighbours, not twins. A smoke test asks whether the system works at all, right now, after this change. A regression test asks whether a specific past failure has returned. Regression tests grow from incidents: every production failure becomes a case that must keep passing. Smoke tests stay small and stable, while the regression suite grows over time. Both belong in the pipeline, and the smoke test runs first because it is faster.

A clipboard with a checklist of green ticks beside a closed laptop on a desk
A smoke test is a short checklist: if every box ticks, the deployment can go ahead.

Running smoke tests in the deployment pipeline

Smoke tests belong in the deployment pipeline, running automatically after every deploy to a staging or production environment. The sequence is simple: deploy, run the smoke suite against the live environment, and promote or roll back based on the result. A deploy that fails its smoke test does not proceed, no matter how urgent the release feels.

Run the suite against the real environment, not a mock. A test that runs against a stubbed model proves that the stub works, which nobody doubts. The point of the smoke test is to verify the real wiring: the real model, the real retrieval index, the real tools, and the real configuration. That is where deployments actually break.

Keep the results visible. Log each smoke test run with its prompts, its assertions and its outcome, and link failures to the deployment that caused them. When a deploy is rolled back, the smoke test failure is the record of why, and that record is what prevents the same broken change from being deployed again. Our guide to building an LLM evaluation pipeline shows how smoke tests fit into the wider testing pipeline.

Smoke testing agents and multi-step flows

Agents need smoke tests too, and they need them more than simple chatbots do, because there are more places for a deploy to break. An agent that cannot call its tools, cannot read retrieval results, or loops forever is broken in a way that a single-turn test will not reveal.

Design agent smoke tests around short, complete tasks. A task with a known answer, such as looking up a fact from the knowledge base or completing a two-step workflow, exercises the loop end to end. Check that the agent finished, that it called the expected tool, and that the final answer contains the expected result. Set a strict step limit, so a looping agent fails fast instead of running until the timeout.

Watch the cost of agent smoke tests. A multi-step agent can make ten or more model calls per task, so a suite of fifteen agent tasks costs far more than fifteen chatbot prompts. Keep the agent smoke suite smaller than the chatbot one, and run the full agent evaluation suite less often, on a schedule rather than on every deploy.

Check What it proves How it fails
Response received in time The service and model are reachable Timeout or provider error
Response is non-empty The model produced output Empty or refused response
Output parses correctly The format contract still holds Malformed JSON or structure
Retrieval returned results The knowledge base is connected Empty or irrelevant context
Expected tool was called Agent wiring is intact Missing or wrong tool call
Key fact present in answer The answer used the retrieved context Hallucinated or generic answer
Refusal case refused Guardrails still work Answered what it should refuse

Common smoke testing mistakes

The most common mistake is making the suite too big. A smoke suite that grows to a hundred cases is no longer a smoke test; it is an evaluation suite wearing a smoke test’s name, and it will be too slow to run on every deploy. When the suite grows, split it: keep the fast checks as the smoke test and move the rest into the evaluation suite that runs on a schedule.

The second mistake is asserting on exact wording. Language models rephrase, and a test that requires a specific sentence will fail on a perfectly good answer. Assert on structure, presence of key facts and format, not on the precise words. Exact-match assertions belong in unit tests for deterministic code, not in smoke tests for a probabilistic model.

The third mistake is running smoke tests only in staging. Staging catches configuration errors, but production has the real model, the real index and the real data. Run the suite in production after every deploy, even if the production run is a smaller subset. The LLM latency monitoring guide explains how to watch the timing side of a deploy, since a slow release is a broken release for users.

LLM smoke testing checklist

  • The suite covers the main user flows end to end, with five to fifteen prompts.
  • Prompts come from real production conversations, not invented examples.
  • Each check asserts on structure, format and key facts, not exact wording.
  • A negative case tests that guardrails and refusals still work.
  • Temperature is set low so results are stable across runs.
  • The suite runs automatically after every deploy, against the real environment.
  • A failed smoke test blocks the deploy and triggers a rollback.
  • Agent tasks have a step limit so a looping agent fails fast.
  • Results are logged with the deployment they belong to.
  • The suite stays small; slower checks move to the evaluation suite.

Frequently asked questions

How is LLM smoke testing different from LLM evaluation?

Smoke testing is a small, fast check that the system works at all after a change. Evaluation is a large, slow measurement of how well it works. Smoke tests run on every deploy in minutes; evaluations run on a schedule or before major releases and take far longer. You need both, for different purposes.

How many prompts should a smoke test suite have?

Enough to cover the main flows and no more. For most applications that means five to fifteen prompts. Fewer than five leaves major paths untested; more than fifteen makes the suite slow and tempts the team to skip it. If you need more coverage, that is a sign the evaluation suite should grow, not the smoke suite.

Should smoke tests run in production?

Yes, after every production deploy. Staging catches many problems, but only production has the real model, index and data. Keep the production run small and cheap, and make sure the test prompts do not pollute analytics or trigger side effects such as sending messages or creating records.

What should happen when a smoke test fails?

The deploy stops. Roll back to the previous version, then investigate the failure with the trace from the failing test. A failed smoke test is a clear signal, and overriding it should require an explicit decision by a named person, not a quiet retry until it passes.

Can smoke tests catch hallucinations?

Only the obvious ones. A check that the answer mentions a key fact from the retrieved context will catch a model that ignored the context entirely, but it will not catch a subtle factual error. Catching those is the job of evaluation and human review, not of a five-minute smoke test.

Latest articles

Scroll to Top