aicoolies logo

RAG Evaluation Pipeline Stack: Metrics, Tracing, and CI

varies

A production-minded RAG evaluation workflow that combines RAGAS and DeepEval metrics with Langfuse traces, Arize Phoenix retrieval analysis, and GitHub Actions release gates.

curated by Raşit Akyol July 13, 2026 updated August 26, 2026

Verdict

The RAG Evaluation Pipeline Stack delivers continuous quality assurance for retrieval-augmented generation systems by decoupling and evaluating retrieval precision and generation faithfulness. Ragas measures core retrieval metrics, including context recall, context precision, and answer relevance. DeepEval executes deterministic semantic tests and unit assertions across RAG pipelines. Arize Phoenix provides deep observability into vector search steps, chunk relevance, and embedding space distributions, while Langfuse captures runtime trace latencies, token usage, and end-user feedback. GitHub Actions automates test execution on every embedding update, chunking modification, or prompt change, ensuring RAG applications maintain high factual accuracy and avoid semantic drift.

RAGASRAG metric and synthetic test layer
Open-source core (Apache-2.0) with $0 self-hosted local evaluation via `pip install ragas` (LLM judge token costs paid directly to model providers). Exploding Gradients offers Ragas Cloud with a Free tier ($0/mo for basic evaluation runs), Team / Pro tier ($49–$99/mo for collaborative dataset management, regression tracking, and continuous CI/CD integration), and Enterprise custom plans for private VPC deployment, custom SLAs, and enterprise security.
DeepEvalPytest-style assertions and LLM-as-judge checks
Open-source core (Apache-2.0) with $0 local Pytest evaluations. Confident AI Cloud Free includes 2 seats, 5 test runs/wk, and 5 GB-mo trace data. Starter is $99-$200/mo for automated CI/CD testing ($1/GB-mo trace overage). Pro/Team is $499-$2,000/mo with 75 GB trace data, Git prompt versioning, RBAC, and SOC 2 Type II. Enterprise offers custom pricing for VPC/on-premise deployment, DeepTeam AI Red Teaming, production Guardrails, HIPAA compliance, and 24/7 SLA.
LangfuseTrace capture, datasets, and production scores
Langfuse is open-source under MIT for self-hosting with full features. Langfuse Cloud provides a free Hobby tier (50k units/month, 2 users), a Core plan at $29/month (100k units, unlimited users), a Pro plan at $199/month (3-year retention, SSO, SOC2), and an Enterprise plan at $2,499/month with custom SLAs.
Arize PhoenixRetrieval diagnostics and embedding analysis
Free and open-source (ELv2/Apache-2.0) for self-hosted LLM observability, tracing, and evaluations with zero software fees. Managed cloud platform (Arize AX) provides SaaS hosting starting with AX Free, Pro tiers from ~$50/mo, and custom Enterprise plans with SOC 2, HIPAA, SAML SSO, and dedicated SLAs.
GitHub ActionsPull-request and release automation
GitHub Actions provides free and unlimited CI/CD execution for public repositories, alongside 2,000 free minutes per month for private repositories. GitHub Pro ($4/month) and Team ($4.67/user/month) include 3,000 monthly minutes, while GitHub Enterprise includes 50,000 minutes with overage billed starting at $0.006 per Linux minute.

Evaluation architecture and handoffs

This stack separates RAG quality into five accountable layers instead of asking one dashboard for a single accuracy score. RAGAS measures retrieval and answer behavior, DeepEval turns expectations into test assertions, Langfuse connects scores to traces and datasets, Arize Phoenix helps diagnose retrieval and embedding failures, and GitHub Actions makes the checks repeatable before release. Each component owns a distinct stage, so a failing score can be traced to data, retrieval, generation, or deployment rather than treated as an unexplained model problem.

The design is best for teams that already have a working retrieval pipeline and need regression evidence as prompts, chunking, embeddings, rerankers, or source documents change. It does not create a trustworthy golden dataset automatically, and no LLM-as-judge metric should be treated as ground truth without calibration. Human-reviewed examples, failure labels, and explicit acceptance thresholds remain the control surface; the tools automate evaluation and diagnosis around that evidence.

Build the dataset and metric layer

Start with RAGAS on a narrow dataset that includes the user question, retrieved context, generated answer, and any known reference answer. Faithfulness, context precision, context recall, and answer relevancy expose different failure modes, so combine them only after each metric has a documented decision rule. Keep difficult negatives, ambiguous questions, missing-source cases, and citation failures in the suite because an average score can hide exactly the incidents that matter in production.

Use DeepEval to express release-facing assertions in the same workflow as application tests. Deterministic checks should cover schema, citations, required phrases, latency budgets, and tool-call shape; judge-backed checks can handle relevance, groundedness, and rubric-based quality. Pin judge prompts and evaluation settings, record the model used for each run, and rerun a stable calibration subset whenever the judge changes. That discipline prevents a judge upgrade from looking like an application improvement.

Trace and diagnose retrieval failures

Langfuse is the trace and dataset bridge. Capture the prompt, retrieved passages, model response, latency, token usage, and evaluation scores on a shared trace identifier, then promote representative failures into versioned datasets. Production sampling should be deliberate: retain enough context to investigate regressions without storing secrets or personal data by default. Scores are most useful when they remain linked to the exact prompt, retriever, model, and release that produced them.

Arize Phoenix adds a retrieval-analysis workspace for examining embeddings, document relevance, span behavior, and clusters of weak results. Use it when a RAGAS score says retrieval deteriorated but the cause is unclear: source drift, chunk boundaries, embedding mismatch, metadata filters, or reranking can produce similar symptoms. Phoenix does not replace the release suite; it shortens the path from a failed metric to a concrete retrieval experiment and a reproducible fix.

Make evaluation a CI release gate

GitHub Actions should run a fast deterministic and small judge-backed suite on every pull request, then reserve larger datasets and red-team-style cases for scheduled or pre-release jobs. Cache dependencies, cap concurrency, and separate code failures from external model-provider failures so a temporary API problem does not silently become a pass. Upload machine-readable results and a human summary as artifacts, and require the responsible team to review any accepted threshold change in the same pull request.

A practical gate compares the candidate branch with a stored baseline rather than demanding perfect absolute scores. Block releases on severe groundedness or citation failures, statistically meaningful regressions, missing evaluation data, or unexplained cost and latency jumps. Allowing a bypass may be necessary for incidents, but the exception should name an owner, reason, expiry, and follow-up dataset. The goal is a visible engineering decision, not an opaque green badge.

Rollout, cost, and failure modes

Roll out the stack in stages: instrument one RAG route, curate a small human-reviewed set, add RAGAS and DeepEval locally, connect Langfuse traces, use Phoenix on recurring retrieval failures, and only then enforce GitHub Actions gates. Track dataset versions and false-positive rates alongside scores. If engineers routinely ignore a metric, either repair its rubric or remove it; accumulating low-trust checks makes the pipeline slower without improving release confidence.

The budget range varies because the open-source components can be self-hosted while model calls, embeddings, trace retention, CI minutes, and managed hosting create real operating cost. This stack is justified when retrieval changes frequently or a wrong answer carries support, compliance, or revenue risk. A small internal prototype with a stable corpus may need only a compact offline dataset and one test runner until its usage and failure cost warrant the full observability loop.

Stack Overview

RAGASRAG metric and synthetic test layer
Pricing
Open-source core (Apache-2.0) with $0 self-hosted local evaluation via `pip install ragas` (LLM judge token costs paid directly to model providers). Exploding Gradients offers Ragas Cloud with a Free tier ($0/mo for basic evaluation runs), Team / Pro tier ($49–$99/mo for collaborative dataset management, regression tracking, and continuous CI/CD integration), and Enterprise custom plans for private VPC deployment, custom SLAs, and enterprise security.
Open Source
Yes
DeepEvalPytest-style assertions and LLM-as-judge checks
Pricing
Open-source core (Apache-2.0) with $0 local Pytest evaluations. Confident AI Cloud Free includes 2 seats, 5 test runs/wk, and 5 GB-mo trace data. Starter is $99-$200/mo for automated CI/CD testing ($1/GB-mo trace overage). Pro/Team is $499-$2,000/mo with 75 GB trace data, Git prompt versioning, RBAC, and SOC 2 Type II. Enterprise offers custom pricing for VPC/on-premise deployment, DeepTeam AI Red Teaming, production Guardrails, HIPAA compliance, and 24/7 SLA.
Open Source
Yes
LangfuseTrace capture, datasets, and production scores
Pricing
Langfuse is open-source under MIT for self-hosting with full features. Langfuse Cloud provides a free Hobby tier (50k units/month, 2 users), a Core plan at $29/month (100k units, unlimited users), a Pro plan at $199/month (3-year retention, SSO, SOC2), and an Enterprise plan at $2,499/month with custom SLAs.
Open Source
Yes
Arize PhoenixRetrieval diagnostics and embedding analysis
Pricing
Free and open-source (ELv2/Apache-2.0) for self-hosted LLM observability, tracing, and evaluations with zero software fees. Managed cloud platform (Arize AX) provides SaaS hosting starting with AX Free, Pro tiers from ~$50/mo, and custom Enterprise plans with SOC 2, HIPAA, SAML SSO, and dedicated SLAs.
Open Source
No
GitHub ActionsPull-request and release automation
Pricing
GitHub Actions provides free and unlimited CI/CD execution for public repositories, alongside 2,000 free minutes per month for private repositories. GitHub Pro ($4/month) and Team ($4.67/user/month) include 3,000 monthly minutes, while GitHub Enterprise includes 50,000 minutes with overage billed starting at $0.006 per Linux minute.
Open Source
No

FAQ

How do RAGAS and DeepEval metrics divide retrieval from generation quality checks in CI/CD?

Retrieval quality is measured via Context Precision (ranking quality) and Context Recall (ground truth presence). Generation quality is audited via Faithfulness (hallucination-free context fidelity) and Answer Relevance. GitHub Actions CI blocks PRs dropping below defined thresholds (e.g. Faithfulness < 0.85).

How are test durations, costs, and flaky tests resolved in GitHub Actions RAG evaluation pipelines?

Pipelines run a Synthesized Golden Test Suite of 30–50 critical scenarios rather than massive datasets. Embedding and retrieval outputs are cached in CI, temperature is pinned to 0.0 to prevent non-determinism, and exponential retries handle rate limits.

How is production telemetry from Arize Phoenix and Langfuse fed back into active evaluation loops?

Production queries with negative user feedback or high retrieval distance in Phoenix are automatically flagged as Hard Negative datasets and injected into GitHub Actions CI test sets as new golden test fixtures.

How are re-rankers and Hybrid Search (BM25 + Dense) configurations A/B tested with RAGAS metrics?

Pipelines run parameter sweeps comparing Dense, BM25, and Cross-Encoder re-rankers. Context Precision and Recall are calculated per configuration, tracking quality improvements against latency and cost trade-offs in Langfuse and Phoenix.

Verification

Content verified

Verification dates are editorial checks. Routine CMS saves and automatic updatedAt timestamps do not advance them.