Functional AI is coming soon. Join the waitlist for early access.

// blog

7 min read

What is an LLM evaluation platform?

An LLM evaluation platform runs automated quality checks on AI outputs—offline in CI and online in production—to catch regressions before they reach users.

An LLM evaluation platform is a system that automatically scores AI outputs against defined quality criteria—before you deploy and while you're live in production. It's the test suite for your AI feature, except instead of asserting exact strings, it grades outputs on correctness, faithfulness, relevance, and safety. Pass the gate, the version ships. Fail it, the pipeline blocks.

Why assertEqual doesn't work for AI

Traditional unit tests assume determinism: same input, same output. LLMs are non-deterministic by design—temperature, sampling, and model updates mean identical inputs can produce different outputs across runs. Exact-match assertions fail because LLM outputs are semantically equivalent without being lexically identical.

This creates a real problem for product engineers. You can't write expect(output).toEqual("Sacramento is the capital of California") and call it tested. You need scorers that handle variation: field-level matching for structured output, semantic similarity for free-text, LLM-as-judge rubrics for subjective quality.

What an LLM evaluation platform actually does

Five capabilities define the category:

1. Offline evaluation against a golden dataset. Before any version deploys, run it against a curated set of inputs with known-good expected outputs. A production golden set typically contains 100–300 representative examples covering common cases and known edge cases—enough for statistical significance without excessive CI overhead. Score each output; block the deploy if the aggregate falls below threshold.

2. CI/CD gate. Pull requests that would reduce quality below thresholds fail automatically, preventing regressions from reaching production. Because fn eval exits non-zero on failure, the CI gate is a single step—no separate service, no custom webhook.

3. LLM-as-judge scoring. For free-text output, LLM-as-judge uses a second LLM to score the primary model's output against a rubric. It handles quality dimensions that exact-match can't: did the summary include all key points? Did the agent follow the constraint? Treat judge scores as a signal, not ground truth—LLM judges carry positional and self-preference bias, so a human review cadence stays the calibration layer.

4. Online evaluation. Offline evaluation runs against curated datasets during development to catch regressions before deployment. Online evaluation scores real-world production traffic in real-time to detect quality drift. Model updates, prompt decay, and distribution shift all show up in production before they appear in your golden set. Online eval catches the gap.

5. Dataset management. Failed production traces become new test cases. The golden set grows over time, closing the loop from production failures back to pre-deploy gates.

Offline vs. online: when to run which

OfflineOnline
WhenPre-deploy, in CIPost-deploy, live traffic
DatasetCurated golden setSampled production traces
GoalBlock regressions before shipDetect drift after ship
ResultPass/fail gateAlert + investigate

Evaluation runs across most of the AI engineering loop: you score live traces in production, turn interesting examples into datasets, run experiments to compare changes, and judge results with manual or automated evaluators. Offline and online stages are the same discipline applied at different points in the lifecycle.

The problem with standalone eval platforms

The major platforms—LangSmith, Braintrust, DeepEval, Evidently—each solve part of this problem. They're useful tools. But they're all separate systems you connect to your deploy workflow. You maintain the integration, the dataset storage, the CI configuration, and the threshold logic. The platform doesn't know which version of your AI function just shipped unless you wire it that way. That ownership ends up somewhere between DevOps and whoever last touched the eval job.

When the eval platform is a separate concern, it becomes a separate team's job. The engineer who changes the prompt doesn't own the eval result—someone else does.

How an AI Function Runtime embeds eval into the function

fnAI is an AI Function Runtime. Each prompt, agent, or multi-agent workflow runs as a versioned, callable function. Evaluation isn't a separate platform bolted on; it's a built-in gate on the function version itself.

You define a dataset and threshold in the eval command:

fn eval classify --dataset golden/classify.jsonl --threshold 0.95

The runtime scores each case field-by-field, reports the aggregate, and exits non-zero below threshold. Because it exits non-zero, the CI gate is one step:

- name: Evaluate function
  run: fn eval classify --dataset golden/classify.jsonl --threshold 0.95

If classify@v4 passes, it's ready to promote. If it doesn't, the deploy never runs. No additional platform to maintain. No configuration outside the function.

Every eval is automatically compared to the last recorded run for that function. A quiet 2% regression between v3 and v4 shows up in the diff output, not in a user complaint:

fn eval classify@v4 --dataset golden/classify.jsonl --threshold 0.95

classify@v4 vs classify@v3
  score:     0.963 vs 0.961  +0.2% ▲
  cost/call: $0.0015 vs $0.0017  -12% ▼
  consistency: 5/5 runs identical
  status: PASS — ready to promote

For free-text output, fn supports model-graded scoring. Scores are tracked per version, so grade drift is visible across the version history—not just the latest run. This matters when a model update shifts your judge's scoring behavior: you see the trend before it reaches production.

The ownership model this enables: the engineer who changes the prompt runs fn eval and owns the result. There's no separate dashboard to log into, no CI job to check. The function is the unit of evaluation.

What this doesn't replace

The eval gate in an AI Function Runtime is designed for pre-deploy quality control on versioned functions. Online evaluation—scoring live production traffic continuously—is a complement, not something the gate replaces. For production monitoring at scale, observability platforms like Langfuse or LangSmith provide the tracing infrastructure. The runtime gate and the observability layer solve different parts of the problem; you want both.

FAQ

What is an LLM evaluation platform? An LLM evaluation platform runs automated quality checks on AI outputs against defined criteria before deployment and in production. It replaces manual spot-checking with scored, version-tracked pipelines that block deploys when quality drops below threshold.

What is the difference between offline and online LLM evaluation? Offline evaluation runs against a curated golden dataset in CI, before deployment—it gates the release. Online evaluation scores live production traffic after deployment—it detects quality drift from model updates or distribution shift.

What is LLM-as-judge? LLM-as-judge uses a second LLM to score the output of your primary model against a rubric. It handles subjective quality dimensions—relevance, completeness, tone adherence—that exact-match or semantic similarity can't measure reliably. Scores should be treated as signal, calibrated against human review.

How many examples should a golden eval dataset have? A production golden set typically contains 100–300 diverse examples covering common cases and known edge cases. This provides enough statistical signal to detect regressions without adding excessive compute cost to every CI run.

What is the difference between an LLM evaluation platform and an AI Function Runtime? A standalone LLM evaluation platform is a separate system you connect to your deploy workflow. An AI Function Runtime embeds evaluation into the function definition—the eval gate and the deploy gate are the same gate, owned by the engineer who changes the function.

Does fn support evaluation of agents, not just prompts? Yes. fnAI treats each prompt, agent, and multi-agent workflow as a function. The same fn eval command and threshold model applies whether the function is a single-turn classifier or a multi-step agent workflow.


fnAI is currently in private beta. If you're building AI features and want evaluation built into the function rather than maintained as a separate platform, join the waitlist at fnai.dev.