If your team changes a prompt, swaps a model, or re-chunks a knowledge base, someone has to decide whether that change can ship. Without an LLM evaluation framework, that decision rests on a few manual spot checks and the opinion of whoever looked at the outputs last, which holds up for a demo and breaks at the first model upgrade.
The short version: define what “good” means for each use case, collect 50 to 200 real examples with expected behavior, score them with a mix of code checks, calibrated LLM judges, and human review, and block any release that drops below agreed thresholds. A first working version is typically one to two weeks of work for one engineer. The running cost after that is mostly judge-model API calls plus a few hours of human review a month. This guide walks through the six steps, then compares eight tools that run them. If you would rather have the framework built and run for you, that is what our LLM evaluation services cover.
What Is an LLM Evaluation Framework
An LLM evaluation framework is the repeatable process a team uses to prove an LLM feature is good enough to ship: the quality goals, a golden dataset, the metrics, the evaluators that score them, pass thresholds, and a schedule for running it all. Libraries such as DeepEval and Ragas are the tools that execute that process.
The word “framework” gets used for two different things, and mixing them up is how teams end up with a tool installed and no evaluation strategy. Your framework is the set of decisions: which behaviors matter, how you measure them, and what score blocks a release. A framework library is code that runs those decisions for you, with metric implementations, test runners, and dashboards. You can swap the library later and keep every one of those decisions.
The individual tests inside the framework are usually called LLM evals. One eval might check that a support bot never promises a refund amount; another scores whether a summary stays faithful to the source document.
Core Components of an LLM Evaluation Framework
Every working framework has the same six parts, whatever tool runs it. Goals and datasets define what you test, metrics and evaluators define how each output gets scored, and thresholds and run cadence decide what happens with the score. Leave one out and the rest lose most of their value: a well-chosen metric with no threshold produces a number nobody acts on, and a threshold checked only before launch misses every regression that comes after it. The table shows all six parts for a customer support assistant.
Evaluation goals
What must this feature get right, and what must it never do?
Refund answers cite the current policy and never promise a specific amount
Datasets
Which inputs prove it?
150 anonymized real tickets with expected answers, plus 30 adversarial prompts
Metrics
How is each goal measured?
Faithfulness to the policy document, answer relevancy, JSON schema validity, correct refusals
Evaluators
Who or what does the scoring?
Code assertions for format, an LLM judge for faithfulness, a human reviewer for tone
Thresholds
What score is good enough to ship?
Faithfulness of at least 0.9 on refund questions, zero schema failures
Run cadence
When does it run?
A fast subset on every pull request, the full set nightly, a weekly sample of production traffic
Evaluators deserve a closer look, because most of the cost and most of the trust problems sit there:
- Code-based checks (regex, schema validation, exact match, “did it call the right function”) are cheap, deterministic, and narrow. Use them for everything that has a single correct answer.
- LLM-as-a-judge scores subjective qualities such as faithfulness, helpfulness, or tone at scale. It costs an API call per score and is only as trustworthy as its calibration.
- Human reviewers are the reference point. They are too slow to score every run, so their main job is labeling the calibration set and reviewing the cases the automated evaluators disagree on.
How to Build an LLM Evaluation Framework in 6 Steps
These six steps take you from “we eyeball outputs” to a framework that gates releases. The order matters: metrics chosen before the use cases are defined tend to measure whatever the tool makes easy.
Step 1: Define Use Cases and Risk Tiers
List every distinct job the LLM does in your product. A support assistant might answer policy questions, summarize a ticket for an agent, and draft a reply, and each of those fails differently. Then assign each use case a risk tier, because the tier decides how much evaluation effort it earns.
High
Acts, advises, or commits on the user’s behalf
Tool calls that write data, financial or medical guidance, account changes
Largest dataset, strict thresholds, human review of a sample every release
Medium
Informs a customer directly
Support answers, product search, onboarding help
Solid dataset, automated gates, periodic human spot checks
Low
Assists an internal user who reviews it
Internal drafting, ticket summaries for staff
Smaller dataset, lighter gates
For each use case, write two short lists: what a good answer must do, and what it must never do. Those lists become your evaluation goals.
Step 2: Build a Golden Dataset
A golden dataset is a versioned set of inputs with the expected behavior for each one. It is the single most valuable asset in the framework, because every metric and every tool you add later runs against it.
Good sources, roughly in order of value:
- Anonymized production logs and support tickets, which show what real users actually ask
- Cases written by subject-matter experts for situations that are rare but costly
- Adversarial and edge cases: prompt injection attempts, out-of-scope questions, ambiguous requests, other languages
- Synthetic examples generated by an LLM to fill gaps, each one reviewed by a person before it enters the set
Start with 50 to 100 examples per high-risk use case and grow from there. Each record should hold the input, any retrieved context (for retrieval-augmented generation, or RAG), the expected output or a grading rubric, and tags such as intent, language, and difficulty. The tags are what let you see results per slice later. Store the dataset in version control next to your prompts, so every evaluation result can be traced to the exact dataset version that produced it.
Step 3: Choose Metrics
Map each evaluation goal from the use-case step to a metric that measures it. Most products need three to five metrics per use case, drawn from these groups:
- Correctness and grounding: faithfulness, hallucination rate, answer relevancy, and, for RAG, context precision and context recall
- Task success: task completion and, for agents, tool-call correctness
- Safety: toxicity, personal data leakage, correct refusals, prompt-injection resistance
- Format: schema validity, length limits, required fields present
- Operational: latency and cost per answer, tracked next to quality so a “better” prompt that triples cost is visible
Our breakdown of LLM evaluation metrics explains how each of these is calculated and where each one misleads.
Agents need one extra layer. A correct final answer can hide a bad path to it: the wrong tool called first, a retry loop, a write action that should never have run. Score the trajectory as well as the outcome, which our guide to AI agent evaluation metrics covers step by step.
How we set metrics for Granola. For Granola, an AI notepad that turns meeting audio and rough notes into structured summaries, we evaluated the LLM’s output for factual accuracy, hallucinations, and whether it kept the right context through complex, multi-turn conversations. Because the generated notes differ on every run, exact-match checks could not score them, so we used LLMs inside our automation scripts to verify the summaries, with DeepEval among the tools, and ran the suite in CI. The full setup is described in our case study on test automation for Granola.
Step 4: Choose Evaluators and Calibrate Judges
Use a deterministic check wherever one exists. Reach for an LLM judge only for qualities that code cannot score, and treat every judge as untrusted until it has been calibrated against people.
A practical calibration routine:
- Take 50 to 100 outputs from your golden dataset and have two people label them against the rubric independently.
- Resolve the cases where the two people disagree. If they disagree often, the rubric is ambiguous, so fix it before involving a model.
- Run the LLM judge on the same outputs and measure how often it agrees with the human labels.
- Tune the judge prompt (clearer criteria, worked examples, a narrower scale) until agreement is acceptable for that risk tier.
- Recalibrate whenever you change the judge model, the rubric, or the product’s domain.
A few habits make judges more reliable. Binary pass/fail or a three-point scale is easier to calibrate than a ten-point score. Asking the judge to write its reasoning before the verdict improves consistency. Pin the judge model version so scores stay comparable over time, and where possible use a different model family from the one being judged, since models tend to rate their own style favorably. In pairwise comparisons, run each pair in both orders to cancel out position bias.
Step 5: Wire Evaluations Into CI and Set Gates
An evaluation that someone has to remember to run will stop being run. Put it in the pipeline:
- On every pull request that touches a prompt, model setting, retrieval config, or tool definition, run a fast subset of the golden dataset that finishes in minutes.
- Nightly or before each release, run the full dataset with every metric.
Then decide what blocks a merge. Hard gates are zero-tolerance checks: schema failures, safety failures, a high-risk tool call made without confirmation. Soft gates compare quality metrics against the current production baseline and fail when any slice drops by more than an agreed margin. Comparing against a baseline works better than fixed absolute targets, because LLM output varies from run to run. Reduce that noise by fixing temperature where the product allows it, or by sampling each case several times and scoring the average.
This is the core of LLM regression testing: every change is judged against the last known good version, slice by slice.
Budget for the judge calls. A full run of 200 cases with three judged metrics is 600 judge calls, so a nightly suite plus pull-request runs adds up over a month. Code checks cost nothing, which is one more reason to use them first.
Step 6: Monitor Production and Feed Failures Back Into the Dataset
Pre-release evaluation only covers the inputs you thought of, so production monitoring has to catch the rest. Trace every LLM call (input, retrieved context, tool calls, output, latency, cost), run your judges on a sample of live traffic, and watch user signals such as thumbs-down ratings, escalations to a human, and abandoned sessions.
Once a week, triage the failures. Each real failure that reveals a new pattern becomes a new golden dataset case, which means the next release is tested against it automatically. Running this loop continuously, with ownership, cadence, and drift alerts, is the practice known as EvalOps.
Best LLM Evaluation Frameworks and Tools
Once the six steps are defined, a tool runs them. The market splits into open-source libraries you run yourself and managed platforms that add tracing, dashboards, and review queues. Many teams end up with one of each: a library for tests in CI and a platform for production traces.
DeepEval
Open source (Apache 2.0), plus the Confident AI platform
Python teams that want evals written as tests
Yes, built-in metrics
Yes, task completion, tool correctness, plan metrics
Yes, deepeval test run
Ragas
Open source (Apache 2.0)
RAG-heavy products, or RAG metrics inside another tool
Yes, its core focus
Partial, tool-call and goal accuracy
Yes, pytest pattern
Promptfoo
Open source (MIT), plus paid enterprise plans
Comparing prompts and models, red teaming, any language stack
Yes, context assertions
Yes, trajectory assertions
Yes, official GitHub Action
LangSmith
Managed platform, self-hosting on Enterprise
Teams building on LangChain or LangGraph
Yes, judge-based evaluators
Yes, trajectory matching
Yes, pytest and Vitest/Jest
Langfuse
Open source (MIT core), plus managed cloud
Tracing and evals on your own infrastructure
Yes, via Ragas integration and judges
Yes, trace-based
Yes, GitHub Action
OpenAI Evals
Open-source repo (MIT, maintenance only); hosted version closing 30 November 2026
Existing setups that need migrating
Not built in
Not built in
Repo only
Arize Phoenix
Source-available (Elastic License 2.0), plus the Arize AX platform
Self-hosted tracing with evals attached
Yes, retrieval and answer relevance
Yes, tool selection and invocation
Yes, pytest and Vitest/Jest
Braintrust
Managed platform, plus open-source autoevals scorers
Engineers and product managers reviewing experiments together
Yes, autoevals RAG scorers
Yes, span and trace scorers
Yes, GitHub Action with PR comments
If your product is mainly a retrieval pipeline, our comparison of RAG evaluation tools goes deeper on retrieval-specific scoring than this general guide.
How to Choose the Right LLM Evaluation Framework for Your Team
Start from three constraints: your stack, your team size, and where your data is allowed to go. Your stack decides how much integration work a tool needs, since a library that matches your language and CI runner can be gating pull requests within days. Team size decides whether a hosted platform pays for itself, and data residency often rules options out before any features are compared.
Python team, wants evals as tests in CI
DeepEval
Langfuse or Phoenix for production traces
Product is mostly retrieval (RAG)
Ragas metrics, run through DeepEval or Langfuse
A tracing platform for live sampling
Frequent prompt and model comparisons, any language
Promptfoo
A tracing platform for production
Built on LangChain or LangGraph
LangSmith
agentevals for agent trajectories
Data must stay on your own infrastructure
Langfuse or Phoenix, self-hosted
DeepEval or Promptfoo in CI
Engineers and product managers review results together
Braintrust or LangSmith
Code checks in CI for hard gates
Currently on OpenAI hosted Evals
Promptfoo, per OpenAI’s migration guidance
Tracing for production
By team size. One or two engineers do best with a single open-source library in CI and a spreadsheet of human labels; a platform at this stage mostly adds setup. Teams of roughly five to twenty usually add a tracing platform once production traffic is meaningful, because sampling live traffic by hand stops scaling. Larger or regulated organizations need role-based access, audit trails, and often self-hosting, which pushes them toward Enterprise plans or self-hosted open-source.
By data residency. If prompts or outputs contain personal, financial, or health data, find out early whether traces may leave your infrastructure. Langfuse and Phoenix self-host on their free tiers; LangSmith, Braintrust, and the Confident AI platform offer self-hosting on Enterprise plans only. Judge models count too: an LLM judge sends every scored output to its provider, so a self-hosted dashboard does not by itself keep data in-house.
When you do not need a platform. If you have one LLM feature, modest traffic, and a team that already lives in CI, a library plus a golden dataset in git covers most of what a platform would. Add a platform when production sampling, review queues, or non-engineers’ access become real needs.
The tool choice is also easier to reverse than it looks, provided the golden dataset, rubrics, and thresholds live in your repository in a plain format. Those carry over to any tool; dashboards and stored traces usually do not.
Common LLM Evaluation Mistakes
1. Running evaluation once. A launch-week evaluation covers the launch version only, and the next prompt edit, the provider’s next model update, or last month’s new knowledge-base documents can each undo the result. Evaluation that is not in CI and not sampling production goes stale within weeks.
2. Trusting an uncalibrated judge. An LLM judge produces confident, consistent-looking scores whether or not they match human judgment. Without the calibration routine from the judge step, a team can optimize a prompt for months toward a number that does not track what users experience.
3. Letting averages hide failing slices. Say overall faithfulness is 0.92. That average can include a Spanish-language slice at 0.70 or a refund-question slice that fails one time in five. Tag your golden dataset, report every metric per slice, and gate on the worst slice as well as the average.
4. No production feedback loop. If real failures never make it back into the golden dataset, the dataset slowly drifts away from what users ask. The test suite keeps passing while complaints rise. A weekly triage that turns production failures into new test cases is the cheapest fix on this list.
5. Testing only the happy path. A dataset built from clean, well-formed questions misses what breaks LLM features in practice: ambiguous requests, out-of-scope questions, prompt injection, very long inputs, and users who switch language mid-conversation. Aim for at least a fifth of each high-risk dataset to be edge and adversarial cases.
How QAwerk Builds and Runs LLM Evaluation
Most teams come to us at one of two moments: before a first LLM feature launches, or after a model swap or prompt change has already caused a visible regression. We start wherever the project is. On an existing product, the first step is usually an audit of what the team already measures, followed by a golden dataset built from real traffic and the high-risk use cases.
From there, our QA engineers set up the six parts described above:
- Risk-tiered use cases and written evaluation goals, agreed with your product owner
- A versioned golden dataset with slice tags and adversarial cases
- Metrics and evaluators matched to each goal, with LLM judges calibrated against human labels
- Evaluation runs wired into your CI pipeline, with hard and soft release gates
- Production sampling and a weekly failure triage that keeps the dataset current
The engagement works as an extension of your team: we use your repository, your CI, and your chosen tools, so nothing has to be migrated when we step back. For retrieval-heavy products, the same setup extends into dedicated RAG testing of the retriever, chunking, and grounding.
If you want an evaluation framework built and run for you, our QA engineers can set up your golden dataset, metrics, calibrated judges, and CI gates, then keep them current as your product changes. Tell us about your LLM product and we will suggest where to start.
FAQ
What are the top 5 LLM evaluation tools?
For most teams, the five worth shortlisting are DeepEval, Ragas, Promptfoo, LangSmith, and Langfuse. DeepEval suits Python teams writing evals as tests, Ragas specializes in RAG metrics, Promptfoo is strongest for prompt and model comparison and red teaming, LangSmith fits LangChain-based apps, and Langfuse is the main open-source option for self-hosted tracing plus evaluation.
How is an LLM evaluation done?
You run a fixed set of test inputs (a golden dataset) through the LLM feature, score each output with metrics such as faithfulness, relevancy, or task completion, and compare the scores to agreed thresholds or to the current production version. Scoring combines code checks, LLM-as-a-judge evaluators calibrated against human labels, and human review of a sample.
What are the 6 steps of the evaluation framework?
The six steps of an LLM evaluation framework are: define use cases and risk tiers, build a golden dataset, choose metrics, choose evaluators and calibrate judges, wire evaluations into CI with release gates, and monitor production while feeding failures back into the dataset.
What is an LLM framework?
“LLM framework” usually means a library for building LLM applications, such as LangChain or LlamaIndex, which handles prompts, retrieval, and tool calls. An LLM evaluation framework is different: it is the process and tooling for measuring whether those applications produce good outputs. Most products need both.
Is DeepEval free?
Yes, the DeepEval library is free and open source under the Apache 2.0 license, and you can run it locally or in CI at no cost beyond the judge-model API calls its metrics make. Confident AI, the company behind it, sells a hosted platform for test history and collaboration, which has a limited free tier and paid plans.
Framework or platform: which do I need?
Every team needs a framework, meaning the goals, dataset, metrics, and thresholds. Whether you also need a platform depends on scale: one LLM feature with modest traffic runs well on an open-source library in CI, while production tracing, human review queues, and access for non-engineers are the usual reasons to add a platform.
See how we built and maintained 1,100+ test cases for Granola, an AI notepad, and automated 76% of its regression suite