Stepthrough Start free

What is regression testing for AI workflows?

Quick answer

Regression testing means re-running tests that already passed after you change something, to make sure the change didn't break what used to work. A "regression" is a step backwards: a bug that comes back, or a feature that stops working because of an unrelated edit, a new model or a new prompt.

Last updated

Take the free module →Module 24 of the free AI Apps Worth Knowing course, about 12 minutes. No account needed.

Updated · By Robert Breen

Why it matters for a small business

AI systems regress more easily than ordinary software. Rewording one line of a prompt, switching to a newer model or adding a field to a workflow can change answers you never touched. The only way to know is to keep the tests from last time and run all of them again, not just the one you were fixing.

The habit is simple. Every time a real mistake is found, add it as a test case with the correct answer. After every change, run the whole set and compare. Over months that set becomes the memory of everything that has gone wrong before, so the same mistake can't reach a customer twice.

In a real lesson: Kosuke: Let the AI Test Its Own Changes with Automated QA

In Kosuke: Let the AI Test Its Own Changes, Sam asks the coding agent to add a Delivery column to Acme's orders table, then types /kosuke:automated-qa. QA Report v1 shows 1 failed, 1 blocked and 3 passed. The failed item is the same delivery-date bug customers found last month: a shipped order's window counted from the order date, not the ship date. That is a regression in plain sight.

The fix comes from /kosuke:automated-qa --fix, which repairs the failed item and tests it again. Report v2 shows it passed, and once the blocked item gets a test order, all 5 pass and the pull request carries the qa: passed label. The Testing Checklist stays with the project, so the same items can be checked after the next change.

Kosuke Sensei home with Robert's Organization, Import repository and Settings in the sidebar
Kosuke Sensei home with Robert's Organization, Import repository and Settings in the sidebar

Try this lesson free or read the step-by-step guide.

Common confusions

Regression testing vs regression analysis

Regression analysis is a statistics method for finding relationships in data. Regression testing is about bugs coming back. Same word, different fields.

Regression testing vs acceptance testing

Acceptance testing asks whether a new change does what the business needs. Regression testing asks whether everything else still works.

Tips

  • Turn every real mistake into a saved test case with the right answer.
  • Re-run the full set after any prompt, model or workflow change, not only the part you edited.
  • Keep the test inputs fixed, so a change in results points at your change.

More n8n and automation terms

Where you use it: free lessons

Frequently asked questions

Why do AI tools regress when I only changed the prompt?
A prompt affects every answer, not just the case you had in mind. A small wording change can shift tone, format or facts elsewhere.
Do I need to re-test when the AI vendor updates the model?
Yes. A new model version can answer differently on the same input, so run your saved tests before relying on it.
How does Truquence help here?
The contract you write stays on file, so each new exported run can be checked against it. If you change the workflow itself, Truquence wants a newly reviewed contract.

All AI glossary terms, A to Z · Free prompt templates