SkillsMar 31, 2026·2 min read

DeepEval — LLM Testing Framework with 30+ Metrics

DeepEval is a pytest-like testing framework for LLM apps with 30+ metrics. 14.4K+ GitHub stars. RAG, agent, multimodal evaluation. Runs locally. MIT.

Agent ready

Ready-to-run agent install

This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
DeepEval — LLM Testing Framework with 30+ Metrics
Direct install command
npx -y tokrepo@latest install a4d57f88-3711-4032-8ad5-f2040ae03178 --target codex

Run after dry-run confirms the install plan.

TL;DR
DeepEval provides 30+ evaluation metrics for LLM apps in a pytest-compatible framework.
§01

What it is

DeepEval is an open-source testing framework designed specifically for LLM applications. It works like pytest but adds 30+ evaluation metrics tailored to AI outputs, including answer relevancy, faithfulness, contextual precision, hallucination detection, and task completion scoring.

The framework targets ML engineers and backend developers building RAG pipelines, AI agents, or any application that needs automated quality checks on LLM outputs.

§02

How it saves time or tokens

Manual evaluation of LLM outputs is slow and inconsistent. DeepEval automates the process with quantitative metrics, catching regressions in CI/CD before they reach production. All evaluations run locally on your machine, so no data leaves your environment and you avoid paying for external evaluation APIs.

§03

How to use

  1. Install DeepEval via pip: pip install -U deepeval.
  2. Create a test file with test cases defining input, expected output, and retrieval context.
  3. Run tests with deepeval test run test_llm.py -- results show pass/fail per metric.
§04

Example

from deepeval import assert_test
from deepeval.test_case import LLMTestCase
from deepeval.metrics import AnswerRelevancyMetric, FaithfulnessMetric

def test_rag_pipeline():
    test_case = LLMTestCase(
        input='What is DeepEval?',
        actual_output='DeepEval is an LLM testing framework.',
        retrieval_context=['DeepEval provides 30+ metrics for LLM evaluation.']
    )
    relevancy = AnswerRelevancyMetric(threshold=0.7)
    faithfulness = FaithfulnessMetric(threshold=0.8)
    assert_test(test_case, [relevancy, faithfulness])
§05

Related on TokRepo

§06

Common pitfalls

  • Setting metric thresholds too high initially causes false failures. Start with 0.5-0.7 and tighten as your pipeline matures.
  • DeepEval strips types but does not validate LLM logic. Pair it with unit tests for deterministic code paths.
  • The retrieval_context field is required for RAG metrics like faithfulness. Omitting it silently skips those checks.

Frequently Asked Questions

How does DeepEval compare to manual LLM evaluation?+

Manual evaluation is subjective and does not scale. DeepEval quantifies output quality with reproducible metrics, runs in CI/CD, and catches regressions automatically. It replaces spreadsheet-based reviews with pytest-style assertions.

Does DeepEval support multi-model evaluation?+

Yes. DeepEval integrates with OpenAI, Anthropic, LangChain, LlamaIndex, and CrewAI. You can evaluate outputs from any model by passing the actual_output to test cases regardless of which LLM generated it.

Can DeepEval run in CI/CD pipelines?+

Yes. DeepEval is pytest-compatible, so it runs in any CI system that supports Python testing -- GitHub Actions, GitLab CI, Jenkins, CircleCI. Use deepeval test run in your pipeline script.

What RAG-specific metrics does DeepEval provide?+

DeepEval offers answer relevancy, faithfulness, contextual precision, contextual recall, and hallucination metrics. These measure whether the LLM answer stays grounded in the retrieved documents.

Is DeepEval free to use?+

DeepEval is open source under MIT license. All metrics run locally on your machine at no cost. An optional hosted dashboard (Confident AI) is available for teams that want centralized reporting.

Citations (3)
🙏

Source & Thanks

Created by Confident AI. Licensed under MIT. confident-ai/deepeval — 14,400+ GitHub stars

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets