deepeval

Activity, over time

Daily GitHub activity and social mentions.

Mentions

Daily posts linking to this repository

Loading mentions chart

Attention

Daily stars & forks

Loading attention chart

Star accumulation

Cumulative stars

Loading star accumulation chart

Pull requests

Daily opens & merges

Loading pull requests chart

Conversations

Daily issues & comments

Loading conversations chart

Community

Daily accounts & reviews

Loading community chart

Mentions

10posts · 30d
Nov 190 posts
  1. 4/ DeepEval Unit testing framework for LLM applications. • Evaluates hallucination and answer relevancy • Pytest-like syntax for custom eval assertions • Track eval metrics across model iterations confident-ai/deepeval t.co

    13 views
  2. DEV · · @veduis

    Evaluating LLM Output Drift in CICD Pipelines --- title: "Evaluating LLM Output Drift in CICD Pipelines" published: true tags: llmevaluation, outputdrift, cicd, deepeval canonical_url: veduis.com cover_image: veduis.com description: "Detect prompt regressions, format breakage, and model output drift in production web apps using automated CI evaluation pipelines." --- Evaluating LLM output drift in CICD pipelines is vital for maintaining software reliability in applications powered by generative artificial intelligence. In traditional web development, unit tests and integration tests are deterministic: given the exact same input, a function either produces the expected output or fails the build. Language models, however, are non-deterministic by design. Furthermore, cloud foundation model providers (such as OpenAI and Anthropic) silently update model weights, tune inference quantization, and adjust safety classifiers under existing model tags. A system prompt that successfully generated clean JSON yesterday may suddenly produce conversational markdown wrappers or truncate responses today. Without continuous automated evaluation in your continuous integration and continuous deployment pipelines, output drift slips silently into production, breaking client parsers and degrading user experience. !Technical architecture schematic showing continuous integration pipeline executing automated evaluation benchmarks on prompt changes To build reliable validation pipelines, examine our guide on evaluating LLM outputs with automated quality checks, review developer collaboration tooling in AI code review tools for dev teams, and study hallucination remediation in our AI hallucination detection business guide. How Do You Detect LLM Output Drift in Continuous Integration Pipelines? Continuous integration for generative software requires treating model evaluation as a first-class test suite, comparable to End-to-End or integration test passes. An automated evaluation pipeline follows four structured steps during pull request execution: 1. Curated Golden Evaluation Dataset: The test runner loads a fixed collection of 50 to 200 real-world user prompts covering core business scenarios, difficult edge cases, and known historical failure points. 2. Deterministic Syntactic Assertions: The pipeline validates that model responses conform to structural constraints: valid JSON syntax, required schema keys, absence of markdown code block fences when raw text is demanded, and strict output length boundaries. 3. Semantic Similarity and G-Eval Scoring: Using lightweight evaluation frameworks like DeepEval, the test suite grades answers against golden reference outputs using embedding cosine similarity and LLM-as-a-judge scoring rubrics. 4. Statistical Regression Thresholds: Rather than expecting 100% exact string equality, the CI build asserts that aggregate pass rates, hallucination metrics, and semantic alignment scores remain above fixed statistical thresholds (e.g., minimum 92% semantic score with zero critical schema failures). What Evaluation Metrics Work Best for Non-Deterministic Model Outputs? Relying on legacy NLP metrics like BLEU or ROUGE fails in production web applications because those algorithms only measure n-gram lexical overlap. An LLM might generate a mathematically identical answer using completely different phrasing, triggering a false-negative failure under BLEU scoring. Instead, modern evaluation suites employ three complementary metric layers: 1. Structural and Contractual Checks - Schema Conformity: Validating output dictionaries against Zod or Pydantic schemas. - Latency and Cost Bounds: Ensuring p95 latency does not exceed 3 seconds and token usage does not exceed defined cost budgets. - Prohibited Token Scans: Verifying that responses never contain system leakage markers, developer debugging logs, or internal database table names. 2. Retrieval-Augmented Generation (RAG) Triad Metrics - Faithfulness: Does the generated completion rely strictly on facts present in the retrieved context, or does it invent extraneous claims? - Answer Relevance: Does the completion directly address the user query without rambling? - Context Precision: Did the vector search engine retrieve relevant chunks, or was the prompt polluted with noisy documents? 3. Semantic Alignment and Rubric Scoring - Evaluating tone, brand voice guidelines, and domain accuracy using calibrated few-shot judge prompts that score candidate text on a 1-to-5 scale. !Paper model of two gauge dials side by side, one needle high and one near the middle, representing a semantic similarity score against an exact match check How Do You Run Automated Regression Test Suites on Prompt Changes? When a developer submits a pull request modifying a system prompt or updating an embedding model, the CI pipeline executes regression testing against the golden dataset. To keep CI execution fast and cost-effective: - Run Fast Structural Checks First: Validate syntax, types, and schema compliance on 100% of pull requests using fast local rules. - Sample for PR Checks, Full Runs for Nightly Builds: Execute a targeted 20-prompt smoke test on every commit, reserving the exhaustive 200-prompt evaluation suite for pull requests merging into main or nightly scheduled cron jobs. - Mock External APIs for Syntactic Passes: When testing application parsing logic, use recorded response cassettes (via VCR.py or Polly.js) to avoid incurring API token bills during routine frontend commits. { "cicd_eval_run_report": { "workflow_run_id": "eval_gh_actions_8819", "commit_sha": "f1a942b", "dataset_name": "customer_support_golden_v3", "test_cases_evaluated": 50, "pass_rate_percentage": 96.0, "metrics_summary": { "schema_validity_score": 1.00, "faithfulness_score": 0.942, "answer_relevance_score": 0.928, "semantic_similarity_score": 0.915 }, "regressions_detected": 0, "ci_status": "PASSED" } } Golden Dataset Curation and Semantic Distance Thresholds A golden dataset is only as valuable as its edge-case representation. Engineering teams should continuously curate their evaluation datasets directly from production logs: - Add every user-reported bug or hallucination as a permanent test case in the golden repository. - Include adversarial jailbreak prompts to verify security guardrail persistence. - Track versioned JSON files (eval_dataset_v1.json) alongside application source code in version control. !Paper model of a card tray holding a stack of test cards beside a vertical threshold ruler with a paper marker clipped partway up Complete Pytest and DeepEval Automation Script for GitHub Actions Here is a complete, executable Python test file using DeepEval and Pytest that executes automated RAG faithfulness and answer relevance checks in CI: # test_llm_regression.py import pytest from deepeval import assert_test from deepeval.test_case import LLMTestCase from deepeval.metrics import FaithfulnessMetric, AnswerRelevancyMetric # Golden dataset sample TEST_CASES = [ { "input": "How do I upgrade to the enterprise tier?", "actual_output": "To upgrade to Enterprise, visit Settings > Billing, or contact our sales team at sales@example.com for custom invoicing.", "retrieval_context": [ "Enterprise tier upgrades are available via Settings > Billing for credit card payments, or via sales@example.com for annual wire invoicing." ] }, { "input": "What is your refund policy for unused seats?", "actual_output": "Unused seats are refunded on a pro-rata basis within 30 days of billing cycle renewal upon submitting a support ticket.", "retrieval_context": [ "Refund policy: Unused seats qualify for pro-rata refunds within 30 days of the renewal date through our support helpdesk." ] } ] @pytest.mark.parametrize("case_data", TEST_CASES) def test_prompt_faithfulness_and_relevance(case_data): test_case = LLMTestCase( input=case_data["input"], actual_output=case_data["actual_output"], retrieval_context=case_data["retrieval_context"] ) faithfulness = FaithfulnessMetric(threshold=0.85) relevancy = AnswerRelevancyMetric(threshold=0.85) assert_test(test_case, [faithfulness, relevancy]) And here is the corresponding GitHub Actions job configuration: # .github/workflows/llm-eval.yml name: LLM Evaluation CI Gate on: pull_request: paths: - 'prompts/**' - 'src/services/ai/**' jobs: evaluate-prompts: runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v5 with: python-version: '3.11' - name: Install Dependencies run: pip install pytest deepeval - name: Run DeepEval Regression Suite env: OPENAI_API_KEY: ${{ secrets.EVAL_OPENAI_API_KEY }} run: pytest test_llm_regression.py -v Four-Stage Continuous LLM Evaluation Governance SOP Software organizations building generative web features should structure automated evaluation governance across four operational phases: Phase 1: Golden Dataset Assembly and Schema Baselines - Audit user query logs to identify the top 50 high-frequency query patterns and failure clusters. - Establish baseline syntactic assertions: strict JSON typing, required keys, and bounded token lengths. - Commit initial golden test datasets to version control with strict semantic change tracking. Phase 2: CI Pipeline Integration and Gating Logic - Wire automated evaluation scripts into GitHub Actions or GitLab CI runners triggered by prompt or model modifications. - Define hard blocker thresholds: zero schema validation failures and minimum 85% faithfulness scores required for PR merge. - Isolate test runner API keys with strict monthly billing limits to prevent runaway CI token expenses. Phase 3: Drift Detection and Production Telemetry Feedback - Ingest real-world production user thumbs-up/down ratings and user feedback directly into the golden dataset backlog. - Run automated scheduled evaluations against live production endpoints weekly to detect silent foundation model provider weight updates. - Track score degradation trends over time across model revisions. Phase 4: Automated Canary Rollouts and Fallbacks - Route new prompt versions through canary deployments (e.g., 5% of live traffic) before complete deployment. - Compare live production metrics between canary and control groups, measuring user retention, conversion rates, and latency. - Automate instant rollback to previous prompt versions if live evaluation scores drop below baseline thresholds. !Paper model of four stepped modules rising toward a final gate with a check shape cut into it, representing staged evaluation governance Conclusion Shipping generative AI features without continuous evaluation is like deploying backend code without integration tests. Because foundation models evolve unpredictably and prompt modifications produce non-linear behavioral shifts, engineering teams need rigorous automated verification. By embedding structural schema checks, RAG faithfulness metrics, and statistical regression gates into CICD pipelines, web engineering organizations can ship AI features rapidly while guaranteeing that output quality and system reliability never drift. <div class="mt-12 not-prose"> <div class="rounded-2xl border border-slate-700/80 bg-slate-900/90 p-8 shadow-xl backdrop-blur-sm"> <div class="flex flex-col md:flex-row items-start md:items-center justify-between gap-6"> <div> <span class="inline-flex items-center rounded-full bg-cyan-500/10 px-3 py-1 text-xs font-semibold uppercase tracking-wider text-cyan-400 border border-cyan-500/20"> DevOps & Continuous AI Evaluation </span> <h3 class="mt-3 text-2xl font-bold tracking-tight text-white"> Looking to automate LLM testing and prevent output drift? </h3> <p class="mt-2 text-base text-slate-300 max-w-2xl"> Veduis helps software engineering teams build automated prompt evaluation pipelines, DeepEval CI/CD test suites, and resilient production monitoring. </p> </div> <div class="flex flex-col sm:flex-row gap-3 w-full md:w-auto shrink-0"> <a href="veduis.com" class="cta-primary-btn inline-flex items-center justify-center rounded-lg bg-white px-6 py-3 text-sm font-semibold text-slate-950 shadow-sm hover:bg-slate-100 transition-colors"> Consult an AI DevOps Specialist </a> </div> </div> </div> </div>

  3. Zenn · · @sscodeai

    DeepEval を「道具」で終わらせない — 継続的な企業 Gold Dataset の作り方 対象: LLM アプリの評価を社内に定着させたい開発者・EM・QA 検証環境: Python 3.12 / deepeval 4.3.2 / 決定論的メトリクスは API キーなしで実行 · 2026-11 本記事の立場: 公開 OSS のコードを読み、手元で実際に動かして確認した範囲だけを書いています。ベンダーの意図やロードマップを示すものではありません。 はじめに:Eval ツールを入れただけでは何も変わらない 「Eval を導入しました」という報告の多くは、フレームワークを pip install したという意味でしかありません。テストファイルが 1 本増えて、CI で回るようになって、最初の 1 か月は順調に見えます。 問題は 2 か月目に来ます。 テストケースが最初に書いた 20 件のまま更新されない 本番で新しい失敗パターンが出ても、テストに追加されない モデルを替えたときに「前と同じ基準で測れているのか」が誰にも分からない ツールは評価を「実行可能」にしますが、「継続可能」にはしません。 その差を埋めるのが、企業が自社で保有し続ける Gold Dataset(正解付きデータセット)です。 この記事の結論 ツールとデータセットは別の層。pip install -U deepeval で良くなるのは前者だけで、Gold Dataset は自動では良くならない 決定論的メトリクスを土台に置き、LLM judge は統制付きで後から載せる。順序を逆にすると、コストと再現性の両方を失う データセットは「育てる」もの。Git で版管理し、実行履歴を自社に残し、入口を本番の失敗につなぐ この記事は、DeepEval の構造を実際に読み、動かして確認したうえで、この 3 点を企業で運用できる形まで落とします。 DeepEval とは何か(実測ベース) まず対象を正確に押さえます。以下は 2026-11 時点で確認した事実です。 項目 値 リポジトリ confident-ai/deepeval ライセンス Apache-2.0 言語 Python(>=3.9) 最新版 deepeval 4.3.2(PyPI) Star 約 19,300(2026-11 時点) 位置づけ 「The LLM Evaluation Framework」。実質は LLM アプリを pytest の世界に持ち込む 設計 assert_test(test_case, [metric]) という形で、テストケースとメトリクスを pytest のアサーションに変換します。これによって、既存の CI パイプラインにそのまま乗ります。 tests/test_refund.py from deepeval import assert_test from deepeval.metrics import ExactMatchMetric from deepeval.test_case import LLMTestCase def test_refund_policy_wording(): assert_test( LLMTestCase( input="返品は何日以内ですか", actual_output="30日以内です", expected_output="30日以内です", # ExactMatch では必須 ), [ExactMatchMetric(threshold=1.0)], ) deepeval test run tests/test_refund.py この「pytest に乗る」という設計判断は、企業導入の観点で非常に重要です。新しい実行基盤を覚える必要がなく、既存の CI/CD とシフトレフトの習慣にそのまま統合できるからです。 expected_output を渡さずに ExactMatchMetric を実行すると、MissingTestCaseParamsError: 'expected_output' cannot be None for the 'Exact Match' metric で落ちます。実際に踏んだ挙動です。テストが「静かに通る」より、パラメータ不足で即座に落ちるほうが CI としては健全ですが、サンプルコードをコピーする際は注意してください。 メトリクスの 2 分類:LLM 依存と非依存 DeepEval のメトリクスは多数ありますが、企業のデータ設計に関わるのは LLM を呼ぶかどうかの違いです。4.3.2 のソースで確認した結果です。 メトリクス スコアの決まり方 初期化に LLM クライアント ExactMatchMetric 完全一致(expected_output 必須) 不要 PatternMatchMetric 正規表現の fullmatch 不要 AgentLoopDetectionMetric 反復・停滞・循環の検出(トレース必須) 不要 JsonCorrectnessMetric pydantic によるスキーマ検証 必要 ToolCorrectnessMetric 既定はツール名の照合(決定論) 必要 GEval カスタム基準の LLM judge 必要 ここには実測でしか分からないねじれがあります。 ! JsonCorrectnessMetric のスコアは LLM judge ではなく、expected_schema.model_validate_json() による決定論的な検証で決まります。ところが init の中で LLM クライアントを初期化するため、API キーがないと DeepEvalError: OpenAI API key is not configured で落ちます。「判定は決定論、初期化は LLM」という構造なので、CI のジョブを分けるときはこの 2 つを混同しないでください。ToolCorrectnessMetric も同様で、既定(evaluation_params=[])ではツール名の照合だけを行いますが、初期化にはキーが要ります。 もう 1 つ、実務で効く挙動があります。PatternMatchMetric は部分一致ではなく fullmatch です。つまり出力全体がパターンに一致しなければ 0 点になります。禁止語の検出のような「含まれていたらアウト」という用途には、そのままでは使えません。 否定先読みを使えば、fullmatch のまま禁止語を判定できます。手元で確認した例です。 from deepeval.metrics import PatternMatchMetric 「返金不可」「絶対に」が含まれていたら 0 点 metric = PatternMatchMetric(pattern=r"(?s)(?!.(返金不可|絶対に)).") "30日以内であれば返金できます" -> 1.0 "返金不可です" -> 0.0 "絶対に保証します" -> 0.0 決定論的メトリクス 4 本(ExactMatch 2 本 + PatternMatch 2 本)を API キーなしで実行したときの実際の出力です。 ✓ Evaluation completed 🎉! (time taken: 0.29s | token cost: None) » Test Results (4 total tests): » Pass Rate: 50.0% | Passed: 2 | Failed: 2 決定論的メトリクスだけで構成できる範囲は、API キーなしで CI に置けます。 コストがゼロで、結果が毎回同じで、原因の特定が容易です。ここを土台にするのが企業利用の第一歩になります。 ExactMatch をどこで使わないか 決定論を強調すると「では全部 ExactMatch で」となりがちですが、それは逆方向の失敗です。 「30日以内です」と「30 days」は、業務上同じ意味でも 0 点 自由記述の回答は正解が複数あるため、文字列一致では正しい出力を誤って落とす 顧客対応の言い回しが変わっただけでテストが赤くなり、やがて誰も直さなくなる ExactMatch が向くのは、決済 ID・日付形式・選択肢・禁止語・構造化フィールドのような「1 つに決まる」対象です。自由記述は rubric 型の LLM judge に任せ、決定論は「機械的に決まる部分」に限定する。この線引きが、評価系が半年後も生きているかどうかを分けます。 ツールとデータセットは別物である DeepEval を使い始めて最初に気づくべき分離はこれです。 層 実体 誰が管理するか 陳腐化するか フレームワーク 評価ロジック、メトリクス実装 OSS コミュニティ アップデートで改善される Gold Dataset 正解付きの実例 企業自身 放置すれば確実に陳腐化する 判定基準(しきい値) 業務の合格ライン 企業自身 業務変更で見直しが必要 pip install -U deepeval で改善されるのは 1 層目だけです。2 層目と 3 層目は、どれだけ優れたフレームワークを入れても自動では良くなりません。 ここが「ツールを入れたのに評価が機能しない」の正体です。 データセット機能の実像 DeepEval には EvaluationDataset があり、add_goldens_from_csv_file / from_json_file / from_jsonl_file といった取り込み、generate_goldens_from_docs による合成生成、create_version によるバージョン管理、evaluate / evals_iterator による実行が用意されています。 ただし実装を読んで確認した重要な事実があります。push と pull は Confident AI のマネージド API を経由します(Api クライアント、DATASET_ALIAS_ENDPOINT)。つまりクラウド側のデータセット管理は同社のプラットフォームが担います。 これは欠点ではありませんが、企業のデータガバナンス設計では必ず判断が必要になる点です。 機密性の高い業務データをベンダーのクラウドに置けるか データセットのバージョン履歴を自社で保持する必要があるか OSS 部分だけで完結させたいか 結論から言うと、企業の Gold Dataset は Git 管理を基本にすべきです。 CSV / JSONL をリポジトリに置き、レビューを経てマージし、バージョンをコミット履歴で追う。これならベンダー依存がなく、データの所在が明確で、監査にも耐えます。 そして重要なのは、push / pull を使わなくても、ローカルの JSONL からデータセットを組み立てて実行できることです。クラウドのデータセット管理は、複数チームで共有したくなった段階で追加すれば十分です。 継続的な Gold Dataset の設計 企業が Gold Dataset を「資産」として維持するための構造を整理します。 この循環で重要なのは、入口が「本番の失敗」であることです。思いつきで作ったテストケースは、実際の失敗分布を反映しません。本番で起きたことは、業務が本当に困っていることの証拠です。 3 層に分けて管理する 単一のデータセットにすると、目的の違うテストが混ざって判断できなくなります。 層 中身 実行頻度 失敗したときの意味 Core 業務上絶対に守る中核事例 全コミット リリース不可 Regression 過去に落ちた事例 全コミット デグレ。修正必須 Production 本番由来の新事例(レビュー済み) 定期 + リリース前 品質の現在地を示す Regression が企業価値の中心です。一度直した失敗が二度と戻らないことを保証する層であり、これはモデルを替えても、プロンプトを書き換えても維持されなければなりません。モデルを乗り換えるたびに同じバグを踏み直す組織は、この層を持っていない組織です。 件数の目安は、Core が 20〜50 件、Production が週 5〜10 件の追加、Regression は減らさず積み上げる、という配分が現実的です。ただし件数そのものは品質の指標になりません。20 件で 1 件落ちると合格率は 5 ポイント動くので、その差を「劣化」と読むのは危険です。件数が少ないうちは、合否の差ではなくどのケースが落ちたかを見てください。 データセットの実体(Git に置く) ここが記事で一番再現性が出る部分です。ディレクトリは層ごとに分け、1 ファイル 1 インシデントを基本にします。 evals/ ├── core/ │ └── refund.jsonl ├── regression/ │ ├── 2026-10-inc1042.jsonl │ └── 2026-11-inc1103.jsonl └── production/ └── 2026-11.jsonl tests/ ├── deterministic/ │ ├── test_core.py │ └── test_regression.py └── judge/ └── test_production.py JSONL の 1 行はこうなります。additional_metadata は Golden がそのまま保持するフィールドで、由来を残すのに使えます。 {"input": "返品は何日以内ですか", "expected_output": "30日以内です", "additional_metadata": {"layer": "core", "incident": "INC-1001", "owner": "cs-team", "reviewed_by": "yamada", "added_at": "2026-11-02"}} 読み込みは 1 ファイル単位の API なので、層のディレクトリを回します。 from pathlib import Path from deepeval.dataset import EvaluationDataset def load(layer: str) -> EvaluationDataset: dataset = EvaluationDataset() for path in sorted(Path(f"evals/{layer}").glob("*.jsonl")): dataset.add_goldens_from_jsonl_file(str(path)) return dataset 実行は pytest のパラメタライズに乗せます。run_app() は自社アプリを本番と同じ経路で呼ぶ関数です。 import pytest from deepeval import assert_test from deepeval.metrics import ExactMatchMetric from deepeval.test_case import LLMTestCase from evals_loader import load, run_app # 上の load() と自社アプリの呼び出し dataset = load("core") @pytest.mark.parametrize( "golden", dataset.goldens, ids=[g.input for g in dataset.goldens], ) def test_core(golden): assert_test( LLMTestCase( input=golden.input, actual_output=run_app(golden.input), expected_output=golden.expected_output, ), [ExactMatchMetric(threshold=1.0)], ) この形にすると、1 ケースが落ちたときに pytest のテスト ID でどのケースか分かります。失敗の原因を人が追えることが、評価系を続ける上での最低条件です。 1 件の完成定義(DoD) レビューで必ず確認する条件を決めておくと、データセットの質が属人化しません。 本番で実際に起きた入力(またはそれに準ずる再現入力)である expected_output が業務責任者の承認を得ている どの層(Core / Regression / Production)に属するかが明示されている 由来(インシデント ID・日付・提供者)が additional_metadata に残っている 既存ケースと重複していない(近似重複を含む) 5 番目は軽視されがちですが、似たケースを量産すると合格率が見かけ上良くなり、本当に落ちるべきケースが薄まります。追加時に埋め込み類似度で近傍を確認するか、少なくとも入力の正規化キーで重複チェックを入れてください。 入口を運用にする(本番の失敗をどう拾うか) 「本番の失敗を還元する」は、仕組みがなければただのスローガンです。最低限これだけ決めます。 役割 担当 責任 Eval Owner 開発リード 層・しきい値・CI の維持 Reviewer 業務責任者 expected_output の承認 Contributor 現場・CS・サポート 失敗事例の提供 入口は 1 本に絞ります。プロダクト内のフィードバック(👎)やエスカレーション記録 → Issue テンプレート → データセット PR という経路です。Issue には入力・実際の出力・期待する出力・発生元を必須項目として置きます。レビューは PR 上で行い、承認されたものだけが Regression に入ります。 機密情報の扱い 入口が本番データである以上、これは避けて通れません。 顧客名・注文番号・住所・連絡先はダミーに置換してからコミットする additional_metadata に顧客 ID や社内 URL を入れない リポジトリは private にし、必要なら評価データ専用のリポジトリに分ける CI では DEEPEVAL_TELEMETRY_OPT_OUT=1 を設定する 「あとで消す」は機能しません。入口で落とすのが唯一現実的な統制です。 CI に置く 「pytest に乗る」の価値は、実際に CI に置いて初めて回収できます。決定論的メトリクスと LLM judge は、ジョブを分けてください。 name: evals on: pull_request: schedule: - cron: "0 18 * * *" # JST 03:00 jobs: deterministic: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.12" - run: pip install "deepeval==4.3.2" - run: deepeval test run tests/deterministic --identifier "pr-${{ github.sha }}" env: DEEPEVAL_TELEMETRY_OPT_OUT: "1" judge: if: github.event_name == 'schedule' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.12" - run: pip install "deepeval==4.3.2" - run: deepeval test run tests/judge --identifier "nightly-${{ github.sha }}" env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} DEEPEVAL_TELEMETRY_OPT_OUT: "1" DEEPEVAL_LOCAL_STORE: "sqlite" - uses: actions/upload-artifact@v4 if: always() with: name: deepeval-db path: .deepeval/deepeval.db PR では決定論層だけを回して merge をブロックし、judge 層は nightly で回してまずは通知にする。この分離がないと、LLM の揺らぎで PR が赤くなり、やがて全員が無視するようになります。 実行履歴も自社に残す 「精度 92%」という数字は、どのデータセットで測ったかが分からなければ意味を持ちません。ここも OSS の範囲で完結できます。 DEEPEVAL_LOCAL_STORE=sqlite を設定すると、deepeval test run のたびに .deepeval/deepeval.db へ 1 実行 = 1 行で記録されます。手元で確認したテーブルは test_runs / test_cases / metric_data / traces / spans です。 実行一覧(identifier にコミット SHA を入れておくと追跡できる) deepeval inspect --list 実行ごとのメトリクス平均を SQL で比較する sqlite3 .deepeval/deepeval.db \ "SELECT r.id, m.name, avg(m.score) FROM metric_data m JOIN test_runs r ON r.id = m.test_run_id GROUP BY r.id, m.name" --identifier にコミット SHA を渡しておけば、どのデータセット版で測った結果かを、実行履歴側から辿れます。データセットは Git、結果は SQLite(または artifact)。どちらも自社の管理下に置けます。 LLM judge を業務で使うときの注意 DeepEval の中心的な機能は LLM-as-a-Judge です。便利ですが、企業利用では 3 つの統制が必要になります。 第一に、judge 自体の妥当性を測ること。 judge が人間の判断とどれだけ一致するかを検証しないまま、judge のスコアを業務判断に使うのは危険です。同じ入力に対して判定がぶれるなら、そのスコアは品質の指標になりません。 やり方は単純です。100 件程度を人間が 2 人でラベリングし、judge の判定と突き合わせる。一致率だけでなく、偶然一致を除いた Cohen's κ を見ます。 def cohen_kappa(human: list[int], judge: list[int]) -> float: n = len(human) agree = sum(h == j for h, j in zip(human, judge)) / n ph = sum(human) / n pj = sum(judge) / n expected = ph * pj + (1 - ph) * (1 - pj) return (agree - expected) / (1 - expected) 目安として、κ が 0.6 を下回るなら judge のプロンプトかモデルを見直し、judge のモデルを替えたら必ず再測定して、κ が下がったら回帰として扱います。judge は「評価の物差し」なので、物差し自体の検定を省いてはいけません。 第二に、決定論的メトリクスを先に置くこと。 完全一致や正規表現で判定できる部分を LLM judge に任せるのは、コストと再現性の両面で不利です。判定できるものを決定論で、判定できないものだけを LLM で、という順序を守るだけで、評価系の安定性は大きく変わります。 第三に、揺らぎとコストを測ること。 同じテストを複数回まわして判定が安定するか確認できます。 同じテストを 3 回まわして、スコアのばらつきを見る deepeval test run tests/judge -r 3 変更していないテストの結果をキャッシュしてコストを抑える deepeval test run tests/judge -c -r でスコアが毎回変わるメトリクスは、しきい値ぎりぎりに置いてはいけません。しきい値は業務要件から決め、モデルに合わせて緩めない。これは運用ルールとして明文化しておく価値があります。 陳腐化を防ぐ運用ルール データセットは放っておくと必ず古くなります。具体的に効く運用ルールを 6 つ挙げます。 本番の失敗を、レビューを経て Regression に還元する(入口を塞がない) 業務要件が変わったら、しきい値のほうを更新する(モデルに合わせて緩めない) 定期的に「使われていないテスト」を棚卸しする(意味を失ったテストは判断を濁らせる) データセット自体をバージョン管理し、評価結果とセットで記録する 近似重複を追加しない(合格率が薄まり、判断を誤らせる) 非推奨になった業務フローのケースは、理由を書いて削除する(残すと誤検知の温床になる) 4 番目が特に見落とされます。半年前の数字と今日の数字を比較できないと、改善したのか劣化したのか判断できなくなります。 正直な限界 ! 本記事は DeepEval 4.3.2 の公開リポジトリと実装を読み、ローカル環境で実際に実行して確認した分析です。ベンダーの意図や今後のロードマップを示すものではありません Star 数・バージョンは執筆時点の値で、変動します 実測したのは次の範囲です:決定論的メトリクス 4 本(ExactMatch / PatternMatch)の挙動、expected_output 欠落時のエラー、JsonCorrectnessMetric / ToolCorrectnessMetric の初期化時に API キーを要求する挙動、ローカル JSONL からの読み込み、SQLite への実行履歴記録、失敗時の終了コード。LLM judge 系メトリクスの精度検証は行っていません push / pull が Confident AI 経由であることは実装から確認しましたが、プラットフォームのデータ管理ポリシーの詳細は各社の規約を確認してください Gold Dataset の設計は方向性であり、必要な件数・層の分け方は業務とリスクに依存します。数十件から始めて、失敗の還元で育てるのが現実的です CI のサンプルは GitHub Actions を前提にした一例で、社内の実行基盤に合わせて読み替えてください まとめ DeepEval は評価を「実行可能」にするが、「継続可能」にはしない 「pytest に乗る」設計は企業の CI 統合において大きな利点 メトリクスは LLM 依存 / 非依存で分かれ、決定論的な部分はコストゼロで CI に置ける。ただし JsonCorrectness のように「判定は決定論でも初期化にキーが要る」ものがある PatternMatchMetric は fullmatch など、実際に動かして初めて分かる挙動がある フレームワーク(OSS)と Gold Dataset(自社資産)は別の層。後者は自動では良くならない 企業のデータセットは Git 管理 + 実行履歴を基本にする。additional_metadata に由来を残し、1 件ごとに完成定義を満たす 入口は「本番の失敗」。Core / Regression / Production の 3 層で育て、Regression が企業価値の中心 judge は κ で人間との一致を測り、モデルを替えるたびに再測定する 優れたフレームワークは、優れたデータセットの代わりにはなりません。ツールを選ぶ前に、自社の正解データを誰が持ち続けるのかを決める必要があります。 DeepEval は Apache-2.0 で公開されています → confident-ai/deepeval

  4. > Stopping a bad plan is cheaper than tracing a bad run. Most of this list watches an AI app after it's live. coduo-afk has a plan reviewer that refuses a ticket graph that can't be built, before any branch exists. sahildave/coduo-afk

    2 likes · 82 views
  5. OpenAI's hosted Evals goes read-only on 31 October: what to export and where to move If you built evals in the OpenAI dashboard or through the Evals API, two dates matter. OpenAI's deprecations page lists: - 31 October 2026: existing evals become read-only. - 30 November 2026: the Evals dashboard and API are scheduled to shut down. The same notice says the graders documented for eval workflows are part of this transition. This post covers what is affected, what to save while you still can, and the open-source tools you can move to. What is shutting down (and what is not) The change applies to OpenAI's hosted Evals platform: the dashboard UI and the /evals API, where you define an eval with a data source and a set of testing_criteria (graders), then launch runs against models. It does not apply to the open-source openai/evals repository on GitHub. That repo is a separate Python framework with a registry of evals and tooling for writing your own. The names overlap, so it is worth checking which one your team actually uses before you plan anything. If your evals live in YAML files and Python classes in a repo, you are on the open-source framework. If they live in the dashboard and you call them by eval ID, you are on the hosted platform. Why the first date matters more OpenAI's notice says existing evals become read-only on 31 October. It does not spell out what read-only allows, so do not assume you will be able to edit or create evals after that date. The final cutoff on 30 November is when the dashboard and API are scheduled to go away entirely. Plan your export for before the first date, and treat the second as the hard stop for anything you missed. What to export before the deadline For each eval you care about, save four things: 1. The eval definition. This is the JSON returned when you retrieve an eval through the API: its name, data source configuration and the full testing_criteria list. The graders hold the logic you will need to rebuild, including model-grader prompts, label sets, pass thresholds and score ranges. 2. The test items. If the eval used an uploaded file, keep the JSONL. If you only have the file ID, download it now. Evals built on stored completions or logs have no item file of their own, so you will have to rebuild that dataset from your own logs. 3. The run configuration. Which model, which prompt template, which sampling parameters. Without this you cannot tell whether a new tool reproduces your old results or just produces different numbers. 4. Past results. Export run summaries and, where possible, per-item outputs and grades. These are your baseline. After migration, rerun the same items and compare. If pass rates move a lot, the cause is usually a grader that did not translate one-to-one, not a real model regression. Store all of this in version control next to your application code. Exported evals that sit in someone's downloads folder tend to get lost. A practical tip: list every eval through the API first and write the IDs to a file, then loop over them. It is easy to forget evals that someone created months ago and nobody opens. Migration options None of these is a drop-in replacement. Each has its own config format and grading model, so expect some manual work, mostly around model-graded checks. promptfoo OpenAI's deprecations notice links to its cookbook guide, "Moving from OpenAI Evals to Promptfoo", as the migration path. promptfoo is open source and MIT licensed, and its README notes that it is now part of OpenAI. You configure it in a promptfooconfig.yaml file with prompts, providers (models) and tests, and attach assertions to each test. Its assertion types include equals, contains and icontains for string checks, and llm-rubric for model-graded checks. The cookbook describes the migration as recreating each eval, so budget time for it. The open-source openai/evals repo If you want to stay close to OpenAI's original eval concepts and are comfortable with Python, the open-source framework is still on GitHub. You write evals as registry entries backed by JSONL samples and eval classes. It runs locally against whatever models you configure. Check the repo's recent activity yourself before committing to it for the long term. Inspect Inspect is an open-source framework for large language model evaluations, developed by the UK AI Security Institute and Meridian Labs. In Python you define a task from a dataset, a solver that produces an answer for each sample, and a scorer that evaluates the output using text comparisons, model grading or custom logic. It also has building blocks for tools and agents. It suits teams whose evals go beyond single prompt-response checks, for example tool use or agent tasks. DeepEval DeepEval is an open-source Python framework that its maintainers describe as similar to Pytest, but for unit testing LLM apps. You write test cases in Python and apply metrics such as G-Eval, answer relevancy and hallucination, many of which use an LLM as the judge. It fits well if your team already runs tests in CI with pytest. Mapping graders: where the work is Most of the effort goes into graders, not test data. Some patterns: - String checks (equals, contains, case-insensitive contains) translate cleanly in every tool above. - Text similarity metrics may exist under the same name but use a different implementation, so scores can differ. Re-check thresholds against your old results. - Score-model and label-model graders become an LLM-as-judge check in the new tool. Rubric wording, score scales and the judge model all affect results, so treat these as approximations until you have compared them with your baseline. - Python graders and multi-graders usually need to be rewritten by hand as custom assertions or scorers. A converter for the promptfoo route We published a small open-source script, openai-evals-migration, that takes an exported eval JSON plus its JSONL items and writes a promptfoo config and tests file. It has no dependencies beyond Node 18. It maps string checks and some similarity metrics directly, converts score-model and label-model graders to llm-rubric with a warning that they are approximations, and lists anything it cannot convert (Python, multi and endpoint graders, among others) in a migration report. It handles the mechanical part. You still need to review the judges and compare results. A short checklist - [ ] Confirm whether you use the hosted platform, the open-source repo, or both. - [ ] List all hosted eval IDs. - [ ] Export definitions, item files, run configs and results before 31 October. - [ ] Pick a target tool and rebuild one eval end to end first. - [ ] Rerun on the same items and compare with the exported baseline. - [ ] Remove calls to the Evals API from CI before 30 November. We keep a page with the dates and the link to OpenAI's notice here, and update it if OpenAI changes the schedule. Written by the Evals Review team, which runs evalsreview.com.

  6. Open-source AI tool you need to know 📌 ​DeepEval is like Pytest for LLMs—unit test AI apps for hallucinations, answer relevancy, & faithfulness in CI/CD. ​🔗 confident-ai/deepeval ​Bookmark this for your testing stack! ​#OpenSource #GitHub #AI

    5 likes · 130 views
  7. Your LLM demo works. Will it stay reliable? 📏 DeepEval helps test RAG and agent outputs with evaluation metrics. Compare changes instead of relying on vibes. 🧪 confident-ai/deepeval #LLMOps #浇朋友 #蓝朋友 #互关 #fo

    2 likes · 46 views
  8. RAG 回答看起来对,怎么系统评测?📏 DeepEval 给 LLM 应用写自动化评测,检查回答质量和检索效果。改 Prompt 前后有据可比。🧪 confident-ai/deepeval #LLMOps #浇朋友 #蓝朋友 #互关 #fo

    1 like · 38 views

Latest stargazers

The last 10 distinct accounts we observed this year.

Most active participants

PR, issue, comment & review events in the past year.

Packages

3
PackageVersionDownloads · 30dTrend · 30d
deepevalv0.9.9
v0.9.9——
———
deepevalv4.3.1
v4.3.1
≥768.3K

Live mentions badge

Show how many posts mention your project in the last 30 days.

Live mentions · last 30 days