DeepEval is an LLM evaluation framework that helps developers evaluate any LLM workflow, from simple prompt chains to complex multi-step agents. It provides a suite of metrics for various evaluation aspects like relevancy, faithfulness, hallucination, and agentic task completion. Currently at version 3.9.6, the library maintains a frequent release cadence, often introducing new metrics, test case types, and developer experience improvements.
pip install deepevalVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to define a basic text-based LLMTestCase, initialize an `AnswerRelevancyMetric`, and run an asynchronous evaluation using `deepeval.evaluate`. Remember to set an LLM API key (e.g., `OPENAI_API_KEY`) as an environment variable or directly in the code, as most metrics rely on an external LLM for their evaluation logic.
Migrate your conversational test cases from a list of `LLMTestCase` objects to a list of `Turn` objects, where each `Turn` has a `role` (e.g., 'user', 'assistant') and `content` attribute.
Review the official DeepEval v3.0 migration guide and documentation. Existing evaluation setups for multi-step or agentic workflows may require substantial refactoring due to the introduction of 'component-level granularity'.
Carefully select the appropriate `TestCase` type based on your evaluation need: `LLMTestCase` for single-turn text, `Turn` for conversational turns, `MLLMTestCase` for multimodal inputs, and `ArenaTestCase` for pairwise comparisons.
Ensure the necessary LLM API key is configured as an environment variable (e.g., `os.environ["OPENAI_API_KEY"] = "..."`) or passed explicitly via the `model` parameter when initializing metrics or running `evaluate`.
First, ensure you have the latest version of deepeval: `pip install -U deepeval`. If the issue persists, check the official DeepEval documentation for updated import paths or install specific extra dependencies, e.g., `pip install deepeval[benchmark]` or `pip install pandas` if related to benchmarks like MMLU.
Ensure your evaluation model is robust enough and consider increasing timeouts (`DEEPEVAL_PER_TASK_TIMEOUT_SECONDS_OVERRIDE`, `DEEPEVAL_PER_ATTEMPT_TIMEOUT_SECONDS_OVERRIDE`) to prevent premature termination. Also, enable verbose logging (`export LOG_LEVEL=DEBUG`) to get more context on why the verdict might be missing.
Try using a more capable LLM for evaluation (e.g., `gpt-4o-mini` or `gpt-4`). You can also enable JSON confinement for your custom LLM judge, customize the evaluation template to include clearer formatting instructions, or use `error_config=ErrorConfig(ignore_errors=True)` to skip failing test cases if immediate robustness is preferred.
First, ensure your `certifi` package is up to date: `python -m pip install -U certifi`. If the issue persists, clear any custom `REQUESTS_CA_BUNDLE`, `SSL_CERT_FILE`, or `SSL_CERT_DIR` environment variables, and verify your system's certificate store. Run `curl -v https://api.confident-ai.com/` and a `requests.get` check from Python to diagnose the underlying SSL issue in your environment.
No dependency data recorded yet.