Day 42 / Daily GitHub Discovery / AI / LLMs

DeepEval

Unit-testing framework for LLM applications with hallucination detection and RAG evaluation.

~7,500 stars · checked Oct 4, 2026
PythonPytestPydanticLiteLLMOpenAIAnthropicOllama
Visit GitHub (opens in a new tab)

What it does

DeepEval is a unit-testing framework for LLM applications and RAG pipelines. It provides 14+ research-backed evaluation metrics that automatically grade language model responses for hallucinations, answer relevancy, faithfulness, toxicity, and context recall on a 0.0 to 1.0 scale.

Why it’s interesting

LLM outputs are non-deterministic, making traditional unit tests inadequate. DeepEval brings scientific rigor to GenAI development by enabling automated testing in CI/CD pipelines with detailed qualitative reasoning for each evaluation result.

Real-world use case

Integrate DeepEval into your GitHub Actions pipeline. On every PR touching prompts or retrieval logic, automatically run regression tests to ensure faithfulness to retrieved context exceeds 0.80, preventing hallucinations from reaching production.

What I can learn

  • 01

    Automated LLM-as-a-Judge Design

    Study how G-Eval and chain-of-thought rubrics structure evaluation prompts to accurately score subjective criteria with numeric scores and justifications.

  • 02

    Pytest Test Runner Extension

    Learn how DeepEval hooks into Pytest's execution lifecycle to provide pass/fail thresholds for non-deterministic AI outputs.

  • 03

    Synthetic Dataset Synthesis

    Understand how to automatically generate realistic Q&A test cases from raw documents to benchmark AI applications before production.

One thing to explore

Faithfulness and Answer Relevancy Metrics

Inspect the metrics folder to see how contradiction detection and claim extraction are implemented using LLM judge prompts.

Explore the source (opens in a new tab)

10-Minute Challenge

Write a RAG hallucination test

Before you start: Python 3.8+, pip, an OpenAI API key or local Ollama

  1. Install DeepEval: pip install deepeval
  2. Create a test file with an LLMTestCase that includes input, output, and retrieved context
  3. Define a FaithfulnessMetric with a threshold of 0.8
  4. Run the test using deepeval test run and observe the faithfulness score

Keep exploring

All repositories →