DeepEval is a simple and easy-to-use open-source large language model (LLM) evaluation framework for evaluating and testing large language model systems. It is similar to Pytest, but specifically designed for unit testing LLM applications. The framework combines the latest research results and runs evaluations through metrics such as G-Eval, task completion, answer relevancy, hallucination, etc., which use LLM-as-a-judge and other NLP models that run on the local machine.
Key Capabilities
DeepEval provides rich and ready-to-use evaluation metrics covering a variety of use cases, all of which come with explanations and can be driven by any LLM, statistical method, or local NLP model:
- Custom general metrics: JevEval (scored by Jev, one system one model, answering questions with calibrated probabilities instead of generated text), G-Eval (a research-based LLM-as-a-judge metric that supports any custom criteria), DAG (a graph-based deterministic LLM-as-a-judge metric builder).
- Agent metrics: task completion, tool correctness, goal accuracy, step efficiency, plan adherence, plan quality, tool use, parameter correctness.
- RAG metrics: answer relevancy, faithfulness, contextual recall, contextual precision, contextual relevancy, RAGAS (the average of the above four).
- Multi-turn metrics: knowledge retention, conversation completeness, turn relevancy, turn faithfulness, role adherence.
- MCP metrics: MCP task completion, MCP use, multi-turn MCP use.
- Multimodal metrics: text-to-image, image editing, image consistency, image helpfulness, image reference.
- Other metrics: hallucination, summarization, bias, toxicity, JSON correctness, prompt alignment.
In addition, DeepEval supports end-to-end and component-level evaluation, can build custom metrics that are automatically integrated into its ecosystem, generate single-turn and multi-turn synthetic datasets, seamlessly integrate with any CI/CD environment, automatically optimize prompts based on evaluation results, and can test any LLM on popular benchmarks such as MMLU, HellaSwag, DROP, BIG-Bench Hard, TruthfulQA, HumanEval, GSM8K, etc. in less than 10 lines of code.
Usage
DeepEval is suitable for Python >= 3.9. The basic usage process is as follows:
- It is recommended to create an account so that shareable test reports can be generated in the cloud (free and without additionalexternal code). Create an account as instructed by the CLI, copy the API key and paste it into the CLI, and all test cases will be recorded automatically.
- Write test cases: create a test file (such as test_chatbot.py) and write end-to-end evaluation test cases. Set the environment variable OPENAI_API_KEY (a custom model can also be used).
- Run the test file in the CLI.
In the example, the variable input simulates user input, actual_output is the placeholder for the application's expected output based on that input, expected_output represents the ideal answer, and GEval is a research-based metric provided by DeepEval for evaluating LLM output according to any custom criteria. All metric scores range from 0-1, and threshold=0.5 determines whether the test passes.
DeepEval also supports running fully traced evaluations using evals_iterator(), either through manual instrumentation or framework integration, tracing the ordered sequence of model decisions, tool calls, and intermediate steps, thereby enabling trajectory-based evaluation. It also supports use without Pytest integration (suitable for Notebook environments) as well as standalone use of metrics.
Regarding environment variables: DeepEval automatically loads .env.local and then .env from the current working directory on import. Priority: process environment -> .env.local -> .env. You can opt out via DEEPEVAL_DISABLE_DOTENV=1.
When used with Confident AI, you can log in from the CLI and run tests as usual, and results are automatically synced to the platform. It also supports using a persistence layer through Confident AI's MCP server.
For Vibe-Coders, the DeepEval skill can be installed, allowing coding agents to generate datasets, write evaluation suites, run deepeval test run, and iterate on failing metrics.
Integration Capabilities
DeepEval can connect to any LLM framework, including: OpenAI Agents, LangChain, CrewAI, LangGraph, Pydantic AI, Anthropic, AWS AgentCore, Google ADK, AI SDK, Mastra, OpenAI, LlamaIndex, and more.
Use Cases
Suitable for developers building AI agents, RAG pipelines, or chatbots, used to determine the best models, prompts, and architectures, improve AI quality, prevent prompt drift, or confidently migrate from OpenAI to Claude, etc.
Platform and Ecosystem
Confident AI is an enterprise-grade AI evaluation and observability platform that provides organizations with consistent standards, integrates natively with DeepEval, and remains model- and framework-agnostic. Product teams manage datasets, pre-release evaluations, and online monitoring of production traces; platform teams define organization-level quality standards and enforce them through governance and native red teaming.
Limitations
The materials do not provide explicit limitations, charges, or pricing information. The specific pricing for some features (such as creating an account and the Confident AI platform) is not yet provided.