Prompt Regression Testing Kit

Know exactly what broke when you edit a prompt or switch models, before your users do.

Prompt Regression Testing Kit product illustration

What it does

Change one line of a prompt (or switch models) and something that used to work quietly breaks: the refund timeline disappears, the JSON gets an extra field, the sign-off is gone. This kit gives your prompts unit tests. Write test cases in YAML, run them against any model, and see which cases fail, which became flaky, and what regressed since the last run, in the terminal or in CI.

  • Test suites in YAML or JSON: prompts (inline or file://prompts/x.txt) with {{variables}}, test cases inline or from a .jsonl, .json or .csv file (a spreadsheet of cases works).
  • 17 assertion types: contains, not-contains, contains-any, contains-all, equals, starts-with, regex, not-regex, max-length / min-length (chars or words), is-json, json-schema, json-path, similar (token overlap), latency, cost, and llm-rubric (a grader model judges tone or correctness). Any assertion can take not: true. JSON is found inside code fences.
  • Compare prompt versions and models side by side: every prompt × provider × test case, with a pass count per prompt.
  • Flakiness: --repeat 3 runs each case several times; cases that pass only sometimes are reported as flaky.
  • Baselines: --out baseline.json, then --baseline baseline.json --fail-on regression lists regressions, fixed cases and new failures.
  • Providers: OpenAI, Anthropic, OpenRouter, any OpenAI-compatible server (Ollama, LM Studio, vLLM), or any program (command:). Keys come from environment variables and are never written to results.
  • Response cache (.promptcheck/cache) so re-running unchanged prompts costs nothing; repeats bypass it.
  • Reports: text, Markdown (for PR comments / $GITHUB_STEP_SUMMARY), JUnit XML (for CI test tabs), JSON.
  • Python 3.9+ standard library only. A Claude Code skill (skills/prompt-tests) and a GitHub Actions workflow are included.

What you get

The screenshot is real output from the kit’s own commands. Tested from a fresh download of this exact zip: ./run_tests.sh ran 8 tests OK on Python 3.13 and 3.10.

Real terminal output from Prompt Regression Testing Kit: demo and passing tests

Use

python3 -m promptcheck init tests/prompts                     # starter suites
python3 -m promptcheck run tests/prompts/support-replies.yaml --provider openai:<model>
python3 -m promptcheck run suite.yaml --provider anthropic:<model> --provider openai:<model>   # compare models
python3 -m promptcheck run suite.yaml --repeat 3 --out baseline.json
python3 -m promptcheck run suite.yaml --baseline baseline.json --fail-on regression
python3 -m promptcheck run suite.yaml --format junit > results.xml
python3 -m promptcheck run suite.yaml --provider "openai-compatible:llama3.2@http://localhost:11434/v1"   # local Ollama

Exit codes: 0 pass, 1 failures (or regressions with --fail-on regression), 2 suite or provider error.

./demo.sh runs everything offline with examples/fake_model.py standing in for an LLM: two versions of a support-reply prompt (v2 adds "keep replies under 40 words" and loses the refund timeline and the sign-off: 2 of 4 cases fail) and a JSON ticket classifier checked against a JSON Schema. ./run_tests.sh runs 8 test groups, including fake OpenAI and Anthropic servers.

A suite

providers:
  - openai:<model>
grader: openai:<model>          # only for llm-rubric
prompts:
  - id: reply-v1
    template: file://prompts/reply-v1.txt
defaults:
  assert:
    - type: not-regex
      value: "as an ai|language model"
tests:
  - name: double charge gets refund + timeline
    vars: {name: Priya, message: I was charged twice this month.}
    assert:
      - type: contains-any
        value: [refund, refunded]
      - type: regex
        value: "\\d+\\s*-\\s*\\d+ business days"
      - type: llm-rubric
        value: apologizes once, doesn't blame the customer

json-schema supports type, enum, const, required, properties, additionalProperties, items, min/maxItems, min/maxLength, minimum/maximum, pattern, anyOf/oneOf/allOf. json-path takes $.a.b[0] with value or one_of (or neither: the path must exist). cost takes price_per_mtok: {input, output} (your model's price per million tokens). Suite defaults can set temperature (only sent when set, since reasoning models reject it; a 400 about temperature is retried without it) and max_tokens (default 4096; reasoning tokens count toward it).

Honest limits

  • It tests outputs, not prompts: a passing suite only means your test cases pass. Add a case for every bug you fix.
  • llm-rubric results depend on the grader model; run it with --repeat and keep text checks for anything exact.
  • No web dashboard: results are files (JSON, Markdown, JUnit). No streaming, tool-calling or image inputs.
  • similar is token overlap, not embeddings.

Format and license

Zip, 29 KB, v1.0, 23 files. You may use and modify this kit for your own work and for clients you serve, including paid client work. Not affiliated with or endorsed by OpenAI, Anthropic or Ollama.

FAQ

Do I need an API key to try it?
No, the demo and tests run offline with a fake model; for real runs set OPENAI_API_KEY, ANTHROPIC_API_KEY or OPENROUTER_API_KEY, or use a local Ollama server.
How is it different from promptfoo?
promptfoo is a large Node.js platform with a web UI; this is a small Python tool with no dependencies, the core checks, baselines and CI reports, that you can read in an afternoon.
Does it cost API money?
Each case is one model call (plus one for llm-rubric); responses are cached, so re-running unchanged prompts is free.
How do I get the files?
Pay by card right here on youraitools.co: your download links appear on this page the moment the payment goes through (claim window: 72 hours, up to 5 downloads per 7 days). Need the files re-sent later? Email hello@youraitools.co.
Refunds?
Email hello@youraitools.co within 14 days if it doesn’t work and we can’t fix it.
Can I pay with crypto?
Yes. Pay the same price in USDC or USDT on Base, Ethereum, Arbitrum, Optimism, Polygon or Solana from the "Pay with crypto" button, with no account or KYC. We check the payment on-chain and show your download links as soon as it confirms.

Get Prompt Regression Testing Kit

Prompt testing tool: YAML test cases, 17 checks incl. JSON Schema and LLM grader, flaky detection, baseline regressions, JUnit. OpenAI, Anthropic, Ollama. $29.

Save with a bundle

Pairs well with

Download$29

RAG Evaluation Kit

RAG evaluation kit: hit@k, recall, MRR, nDCG, faithfulness, context recall and answer F1 on your own questions. BM25 baseline, chunk sweep, CI gates. $29.

View RAG Evaluation Kit
Download$29

Vibe Coding Security Audit

Security audit for AI-built apps: exposed API keys, NEXT_PUBLIC secrets, Supabase service_role, open API routes, Stripe webhooks, CORS. Grade + fixes. $29.

View Vibe Coding Security Audit
Download$19

Supabase RLS Checker

Supabase RLS checker for migrations: tables without RLS, using (true) policies, user_metadata, slow auth.uid(), definer views. Fix SQL included. $19.

View Supabase RLS Checker

Related

1 email a week: new x402 + MCP tools and free kits.

Short weekly digest of new x402 + MCP tools and free kits, including the MCP OAuth Checker. No spam, unsubscribe any time.