Prompt
what should i use for llm regression testing in ci
Latest observation
Nov 4, 2026
OpenAI APIWeb search: off
For LLM regression testing in CI, I’d use a layered approach rather than a single tool.
Best practical setup
-
Deterministic unit tests
- Mock the model where possible.
- Test prompts, parsing, routing, tool calls, and schema validation.
- Use these for fast CI checks.
-
Golden-set / scenario tests for LLM behavior
- Maintain a small set of prompts + expected outputs or properties.
- Check things like:
- exact JSON schema
- required fields present
- no policy violations
- similarity to approved answers
- Run these on every PR or nightly.
-
Evals with judges/metrics
- For open-ended outputs, use:
- rule-based checks first
- then an LLM judge or embedding similarity if needed
- Treat these as “signal,” not absolute truth.
- For open-ended outputs, use:
Tools worth considering
If you want a framework
- OpenAI Evals – good for structured evals and custom benchmarks.
- promptfoo – very practical for CI, prompt comparisons, assertions, model matrices.
- LangSmith Evals – good if you’re already in LangChain/LangSmith.
- DeepEval – nice Python-native eval framework with LLM-as-judge patterns.
- Ragas – especially good for RAG pipelines.
If you want CI-friendly assertions
- promptfoo is often the easiest to wire into GitHub Actions because it supports:
- prompt/version comparisons
- assertions
- multiple models
- output diffing
My recommendation by use case
- Prompt engineering / app logic:
promptfoo - Python-heavy eval suite:
DeepEval - RAG evaluation:
Ragas - Custom benchmark suite:
OpenAI Evals - LangChain app:
LangSmith
What to check in CI
Use assertions like:
- output matches JSON schema
- contains/doesn’t contain specific fields or phrases
- classification label is correct
- tool calls happened when expected
- safety constraints
- no regression in score vs baseline
Suggested CI pattern
- On PR: run fast subset, mocked or small model, strict pass/fail thresholds
- Nightly: run larger eval suite against production model
- Before release: run full benchmark set + human review on failures
Short answer
If you want a single recommendation, start with promptfoo for CI regression testing. It’s the most straightforward for prompt/output regression checks.
If you tell me your stack (Python/JS, RAG or not, OpenAI/Anthropic/local models, GitHub Actions/GitLab), I can suggest a concrete setup and example config.