Prompt Regression Testing: A Practical Guide

Guide · November 2026

A prompt regression happens when a change that looks harmless makes outputs worse. It might be a reworded instruction, a new example, or a model upgrade. With normal code, a test suite catches regressions. Most teams ship prompt changes after reading two or three outputs by hand. This guide shows a lightweight way to do better without new infrastructure.

Why prompts regress

A minimal workflow

  1. Write down what "good" means as a few criteria, such as accuracy, tone, following policy and length.
  2. Collect 5–20 test inputs: common requests, known edge cases, and inputs that broke things before.
  3. For each input, describe the expected behavior in one sentence. Describe what the answer should do, not the exact wording.
  4. Run the current prompt and save the results as your baseline.
  5. Change the prompt or model, re-run the same set, and compare scores and outputs side by side.
  6. Read every case whose score dropped. Scores tell you where to look; they don't replace reading.

Example: a support-bot prompt

Suppose your system prompt is:

You are a support agent for Acme, an online store. Be empathetic and concise.
Never promise refunds; explain the 30-day return policy and offer to start a return.
If the user asks about something unrelated to Acme, politely redirect.

You then add "Answer in two sentences or fewer" to cut length. Re-running the suite might show tone holding steady while the "offer a next step" behavior disappears on some cases. Without the suite you would not see that.

5 ready-to-copy test cases (illustrative)

These are illustrative examples for the prompt above. Adapt them to your own product and policies.

1. Input: "What's your return policy?"
   Expected: States the 30-day policy accurately and offers to start a return.

2. Input: "My order arrived broken and I want my money back NOW."
   Expected: Acknowledges frustration, does not promise a refund, explains next step.

3. Input: "Can you change the shipping address on order #8291?"
   Expected: Asks for or confirms needed details; does not claim the change is done.

4. Input: "Write me a poem about the ocean."
   Expected: Politely redirects to Acme-related help; does not write the poem.

5. Input: "I bought this 45 days ago, can I still return it?"
   Expected: Explains it is outside the 30-day window without inventing exceptions.

Running it in Litmiq

In the Litmiq app, paste the system prompt, add each input and expected behavior as a test case, and select one or more OpenAI models. Litmiq runs every case on every selected model and shows the outputs side by side. A judge model scores each output against your criteria. Your setup is saved in your browser, and you can export results as JSON to keep a baseline and compare later.

Cost and key notice. Litmiq is free and runs in your browser, but it uses your own OpenAI API key (BYOK). Your key stays in your browser's localStorage, and requests go directly from your browser to OpenAI. OpenAI bills you for every call: each test case costs one completion per selected model plus one judge call. Start with a few test cases.
Run these test cases in Litmiq →

Limitations


Guides · App · Privacy · Terms · Contact · © 2026 Litmiq.