Main rule
Treat AI output like a product behavior that must be tested, measured, and regressed safely.
A testing-first reference for evaluating LLM behavior, including correctness, safety, groundedness, and regression tracking.
Treat AI output like a product behavior that must be tested, measured, and regressed safely.
Prompt validation, RAG quality, hallucination checks, and AI workflow regression in CI.
Keep a small evaluation dataset before trusting improvements.
Use this with AI basics, RAG, and AI test generation.
Evaluation starts with explicit quality dimensions.
- correctness - relevance - completeness - groundedness - safety - consistency
Ask whether the model invented facts or exceeded the available evidence.
Good check: Can this answer be supported by the source context? If not, mark it as hallucinated or unsupported.
Evaluate whether the response matches the expected schema as well as the meaning.
Check: - required fields exist - field types are correct - enums are valid - business rules still hold
RAG systems need retrieval and answer quality checks, not just final-output review.
Key checks: - context relevance - groundedness - answer relevance
Useful for test-style LLM evaluations embedded into code-based workflows.
Good for: - metric-based evaluation - regression suites - code-driven checks - CI integration
Useful for prompt comparison, model comparison, and output quality benchmarking.
Good for: - comparing prompts - comparing models - scoring answer quality - config-driven runs
Strong when you need observability and deeper RAG-specific introspection.
Good for: - RAG tracing - retrieval debugging - groundedness analysis - pipeline observability
Even a small curated set of examples is better than trusting vibes.
Include: - representative happy paths - edge cases - known failure cases - tricky ambiguous inputs - unsafe prompts
Run evals like any regression suite and fail builds only on meaningful thresholds.
- nightly evaluation run - prompt change checks - score thresholds - trend tracking - artifact output for review