AI Engineer · Published 2025-07-01

[Evals Workshop] Mastering AI Evaluation: From Playground to Production

Open on YouTube ↗

Summary

Overview

  • Speaker: Doug Guthrie and Carlos Esteban
  • Channel: AI Engineer
  • Main topic: AI System Evaluation and Observability with Braintrust
  • Purpose: To educate AI engineers on how to build robust testing, evaluation, and observability frameworks for LLM applications using Braintrust. This hands-on workshop led by solutions engineers from Braintrust covers the comprehensive lifecycle of evaluating AI and LLM systems. It introduces core concepts like prompt engineering, offline and online evaluations, datasets, scorers (code-based and LLM-as-a-judge), and human-in-the-loop workflows. Through practical activities, attendees learn how to use Braintrust's UI and TypeScript SDK to run evaluations, track performance regressions, set up online logging and scoring, and close the feedback loop for continuous improvement.

Topic Map

Introduction to Evals

  • Explanation: Explains why evaluations are critical for production AI systems, citing high hallucination rates, performance degradation over time, and prompt drift.
  • Key claims:
    • LLMs cannot guarantee consistent performance without observability and testing.
    • Writing evals is becoming a core skill for product managers and AI engineers.
    • Evals help answer questions around user experience, cost efficiency, brand consistency, and regression detection.
  • Examples:
    • In 2023 testing, major LLMs had a 91.4% hallucination rate in certain domains.
    • Top LLM code-success rates dropped by 80% over 3 months due to provider updates.
  • Terminology:
    • evals
    • hallucination rate
    • performance degradation
    • prompt drift
  • Why it matters: Without evals, teams push changes to production blindly, risking broken workflows and poor user experiences.

Core Concepts of Braintrust

  • Explanation: Outlines the three pillars of Braintrust: prompt engineering (IDEs and playgrounds), evals (measuring improvement/regression), and AI observability (production logging).
  • Key claims:
    • Effective AI development requires cycling between prompt engineering, structured evals, and production observability.
    • Evals provide a performance score from 0-100% across test scenarios.
  • Examples:
    • Using playgrounds for rapid prototyping before locking in prompt versions.
  • Terminology:
    • prompt engineering
    • evals
    • AI observability
    • ground truth
  • Why it matters: Establishes a mental model for how developers should build, test, and monitor AI applications.

Ingredients of an Eval

  • Explanation: Breaks down an evaluation into three core components: Task, Dataset, and Scorer.
  • Key claims:
    • A task is the code or prompt being evaluated, requiring an input and output.
    • A dataset is a collection of real-world or synthetic test cases.
    • A scorer is the logic (LLM-as-a-judge or code function) that grades output on a 0-1 scale.
  • Examples:
    • Using code-based exact match functions alongside GPT-4 as an LLM judge.
  • Terminology:
    • task
    • dataset
    • scorer
    • LLM-as-a-judge
    • code function
  • Why it matters: Provides a clear modular framework for structuring any AI evaluation.

Offline vs Online Evals

  • Explanation: Contrasts offline evals (done in development via playgrounds and SDKs to catch issues early) with online evals (monitoring real production traffic and user feedback).
  • Key claims:
    • Offline evals proactively identify issues before deployment using predefined datasets.
    • Online evals provide real-time monitoring, tracing, and user feedback capture in production.
  • Examples:
    • Running experiments in the Braintrust UI versus streaming production logs via proxy or SDK.
  • Terminology:
    • offline evals
    • online evals
    • tracing
    • proxy SDK
  • Why it matters: Development needs structured test suites, while production needs continuous monitoring and regression alerts.

Moving into Production and Human-in-the-Loop

  • Explanation: Discusses why logging production traces, running online scoring rules, and incorporating human review are essential for closing the feedback loop.
  • Key claims:
    • Production logging allows debugging issues in minutes rather than hours.
    • Human review establishes ground truth and aligns AI models with business compliance and user expectations.
  • Examples:
    • Adding thumbs-up/thumbs-down feedback scores in web applications to filter low-performing traces.
  • Terminology:
    • logging
    • online scoring
    • human-in-the-loop
    • HITL
    • ground truth
  • Why it matters: Closes the gap between lab testing and real-world usage through continuous learning and refinement.

Key Points

Evals cut dev time and reduce costs

  • Explanation: Automating test reviews replaces manual QA, allowing faster iteration and safer releases.
  • Evidence: Customer examples like Zapier and Coda saw 5x to 20x increases in feature delivery and productivity.
  • Practical implication: Teams can iterate on prompts and models with high confidence without manual bottlenecking.

Two mental models for evals: Offline and Online

  • Explanation: Offline evals test changes during development; online evals monitor production traffic and capture real user feedback.
  • Evidence: Braintrust supports both playground experiments and SDK/proxy-based production tracing.
  • Practical implication: Engineers must test rigorously before shipping and continuously monitor after deployment.

Combine code-based and LLM-as-a-judge scorers

  • Explanation: Code scorers handle deterministic binary checks, while LLM judges evaluate subjective criteria like tone, style, and completeness.
  • Evidence: Workshops demonstrated setting up both accuracy scorers (LLM) and formatting scorers (TypeScript).
  • Practical implication: Using both types provides a balanced evaluation of both strict constraints and nuanced quality.

Frameworks, Models & Processes

Braintrust Eval Framework

  • How it works: Combines a task function, a test dataset, and one or more scorers to evaluate LLM outputs programmatically or via UI.
  • Components:
    • Task
    • Dataset
    • Scorer
  • When to use: Whenever testing new prompts, model swaps, or agentic workflows.

Examples & Case Studies

Building a changelog generation app and evaluating it against historical git commits.

  • Illustrates: How to define inputs, expected outputs, prompts, and custom scorers for text summarization tasks.
  • Lesson: Structured datasets and multi-metric scoring (accuracy, formatting, completeness) give granular insight into prompt performance.

Actionable Takeaways

  • Immediate:
    • Start small with synthetic datasets and iterate.
    • Use Braintrust Playground for rapid prompt prototyping and A/B testing models.
    • Wrap LLM API clients with Braintrust SDK loggers to capture production traces effortlessly.
  • Strategic:
    • Treat prompt engineering and evaluation as a core engineering workflow, not an afterthought.
    • Incorporate human-in-the-loop review to establish ground truth and catch nuanced failures.
    • Feed production logs back into evaluation datasets to continuously expand test coverage.
  • Questions to investigate:
    • How can we balance deterministic code-based assertions with stochastic LLM-as-a-judge scorers?
    • What is the optimal sampling rate for online scoring in high-throughput production environments?

Claims Worth Verifying

  • In 2023 testing, major LLMs contained factual errors or fabrications up to 91.4% of the time in certain domains. (statistic)
  • Over 3 months, top LLM's code-success rate dropped from 52% to 10% an 80% decline after a routine update. (statistic)

Notable Quotes

"Writing evals is going to become a core skill for product managers. It is such a critical part of making a good product with AI." "An Eval (short for evaluation) is a structured test that checks how well your AI system performs."

Compressed Summary

  • Evals ensure LLM reliability, prevent regressions, and catch hallucinations.
  • Every eval requires three ingredients: Task, Dataset, and Scorer.
  • Offline evals test in development; online evals monitor production logs and user feedback.
  • Braintrust provides playgrounds, experiments, SDK tracing, and online scoring to streamline the LLM lifecycle.
  • Keywords: evals, llm, observability, prompt-engineering, braintrust
  • Core insight: Systematic evaluation using structured tasks, datasets, and scorers is essential for moving LLM applications reliably from playground experimentation to production.

Core insights

6
Failure Modemedium noveltyweak evidence

Because model behavior is a function of a mutable third-party dependency, a production LLM system can regress with zero code changes; therefore evals must be a repeated/scheduled discipline (re-run on provider updates) rather than a one-time pre-launch test.

Why it matters

It reframes evals from a launch gate to a continuous monitoring loop owned by engineering, and makes model/prompt version pinning and re-validation a release requirement.

Generalization

Any system whose behavior depends on externally mutated services (hosted models, third-party APIs, managed retrievers) needs scheduled re-validation against frozen test suites, not just pre-merge tests.

Top LLM code-success rates dropped by 80% over 3 months due to provider updates.
Open source video
LLMs cannot guarantee consistent performance without observability and testing.
Open source video
prompt drift
Open source video
Architecturelow noveltystrong evidence

An eval is factored into a three-part contract — Task (the prompt/code under test with input and output), Dataset (real or synthetic cases), and Scorer (0-1 grading logic) — which decouples the artifact under test from the test corpus and the grading function.

Why it matters

This factorization is what allows swapping a model or prompt while holding the test fixed, making model/prompt changes diffable and comparable across runs.

Generalization

Separating 'system under test', 'fixture corpus', and 'assertion/grading logic' is the same interface discipline as unit testing, and it is what makes evaluation composable and CI-able.

Breaks down an evaluation into three core components: Task, Dataset, and Scorer.
Open source video
A task is the code or prompt being evaluated, requiring an input and output.
Open source video
A scorer is the logic (LLM-as-a-judge or code function) that grades output on a 0-1 scale.
Open source video
Mental Modellow noveltystrong evidence

Evaluation splits into two distinct systems with different feedback latencies: offline evals on predefined datasets during development, and online evals over live production traffic with tracing and user feedback capture.

Why it matters

They have different data sources, cost profiles, and consumers (engineers pre-merge vs. operators post-deploy), so treating them as one pipeline leads to either untested releases or unmonitored production.

Generalization

Mirrors the classic offline-training/online-serving split; any adaptive AI system likely needs both a controlled replay harness and a live telemetry loop.

Offline evals proactively identify issues before deployment using predefined datasets.
Open source video
Online evals provide real-time monitoring, tracing, and user feedback capture in production.
Open source video
Running experiments in the Braintrust UI versus streaming production logs via proxy or SDK.
Open source video
Mechanismmedium noveltymoderate evidence

Production traces are not just diagnostics — they are fed back into evaluation datasets, so the test corpus is a continuously growing artifact derived from real usage rather than a static fixture set.

Why it matters

It converts observability telemetry into test coverage, closing the loop between field failures and regression suites, and implies the eval set needs curation, sampling, and privacy handling rather than write-once authoring.

Generalization

This is a data flywheel pattern: production telemetry becomes the training/eval corpus, requiring a defined path from log to curated fixture.

Feed production logs back into evaluation datasets to continuously expand test coverage.
Open source video
Human review establishes ground truth and aligns AI models with business compliance and user expectations.
Open source video
Adding thumbs-up/thumbs-down feedback scores in web applications to filter low-performing traces.
Open source video
Practicelow noveltystrong evidence

Scoring is deliberately hybrid: deterministic code scorers enforce binary/format constraints while LLM-as-a-judge scorers grade subjective dimensions like tone, style, and completeness, and the two are treated as complementary rather than substitutable.

Why it matters

Single-scorer designs systematically blind-spot either hard constraints (a judge will pass malformed output) or nuanced quality (an exact-match check rejects acceptable paraphrases).

Generalization

Layered verification — deterministic guardrails plus probabilistic quality graders — is the general pattern for evaluating open-ended generative output.

Code scorers handle deterministic binary checks, while LLM judges evaluate subjective criteria like tone, style, and completeness.
Open source video
Using code-based exact match functions alongside GPT-4 as an LLM judge.
Open source video
Using both types provides a balanced evaluation of both strict constraints and nuanced quality.
Open source video
Mechanismmedium noveltymoderate evidence

Observability is attached at the LLM client boundary (SDK wrapper or proxy) rather than instrumented inside application logic, so traces are captured without application code changes.

Why it matters

It reduces the marginal cost of adding tracing to existing services and keeps instrumentation orthogonal to business logic, which matters for adoption and for not coupling the app to a vendor.

Generalization

Interposition at the transport/client layer is a reusable strategy for cross-cutting concerns (tracing, cost accounting, rate limiting, caching) across heterogeneous LLM call sites.

Wrap LLM API clients with Braintrust SDK loggers to capture production traces effortlessly.
Open source video
streaming production logs via proxy or SDK
Open source video

Deep dives

5

Scheduled re-validation against mutable model providers

Research question

What run cadence and alerting threshold minimize time-to-detection of provider-side LLM regressions per unit eval cost?

Why

If behavior can change without code changes, pre-launch evals are insufficient; teams need a scheduled sentinel and version-pinning policy.

Top LLM code-success rates dropped by 80% over 3 months due to provider updates.
Open source video
LLMs cannot guarantee consistent performance without observability and testing.
Open source video
prompt drift
Open source video
Source video

Aggregating deterministic and probabilistic scorers

Research question

How should deterministic code scorers and probabilistic LLM judges be combined into a single pass/fail signal without one class masking the other?

Why

A single scorer either passes malformed output or rejects acceptable paraphrase; composition policy determines regression sensitivity.

Code scorers handle deterministic binary checks, while LLM judges evaluate subjective criteria like tone, style, and completeness.
Open source video
Using code-based exact match functions alongside GPT-4 as an LLM judge.
Open source video
Using both types provides a balanced evaluation of both strict constraints and nuanced quality.
Open source video
Source video

Judge validation and calibration over time

Research question

How is an LLM judge itself validated against human labels and re-calibrated as judge models or prompts change?

Why

A drifting judge silently changes the meaning of every score it produces, corrupting regression comparisons.

Human review establishes ground truth and aligns AI models with business compliance and user expectations.
Open source video
Using code-based exact match functions alongside GPT-4 as an LLM judge.
Open source video
Source video

Trace selection for eval dataset promotion

Research question

Which trace-selection policy maximizes regression-detection power per unit of curation effort?

Why

Promoting production logs into datasets requires sampling, deduplication, and failure prioritization; random promotion may overpay for low-signal examples.

Feed production logs back into evaluation datasets to continuously expand test coverage.
Open source video
Adding thumbs-up/thumbs-down feedback scores in web applications to filter low-performing traces.
Open source video
Source video

Client-boundary instrumentation for LLM observability

Research question

Does interposing tracing at the LLM client wrapper/proxy achieve equivalent coverage to application-level instrumentation with lower integration cost and business-logic coupling?

Why

Instrumentation placement determines adoption cost, vendor lock-in, and data-egress surface for production tracing.

Wrap LLM API clients with Braintrust SDK loggers to capture production traces effortlessly.
Open source video
streaming production logs via proxy or SDK
Open source video
Source video

Article ideas

4

Your evals are stale the moment your model provider ships

Pre-launch evals are a false safety net for systems built on mutable third-party models; scheduled re-validation against pinned versions must become the default release discipline.

Angle

Failure-mode argument with concrete detection/cadence consequences

Source video

Task, Dataset, Scorer: the eval triple that makes model swaps diffable

Treating evals as a three-part contract is what turns prompt/model changes into comparable experiments and CI-gateable artifacts, rather than playground impressions.

Angle

Architecture and interface discipline

Source video

Stop choosing between code scorers and LLM judges

Single-scorer eval designs systematically blind-spot either hard constraints or nuanced quality; production evals need layered verification with deterministic gates plus probabilistic judges.

Angle

Scoring design anti-pattern

Source video

From production traces to test coverage: the missing curation pipeline

Feeding traces into eval datasets converts observability into coverage, but only if sampling, PII handling, and labeling queues are treated as first-class operational plumbing.

Angle

Data flywheel operations

Source video

Project ideas

4

Provider Regression Sentinel

beyond-evals

Scheduled eval runs against pinned model versions will detect provider-side behavioral regressions within 24 hours, while pre-merge-only evals will miss them entirely.

Proof of concept

Frozen dataset and hybrid scorers run on a cron; alert on score drop beyond threshold; log model/prompt versions per run.

Measurement

Time-to-detection, false-positive rate, cost per detected regression.

Source video

Judge Calibration Harness

beyond-evals

A labeled holdout set can measure LLM-judge agreement with human labels and detect judge drift before it corrupts eval comparisons.

Proof of concept

Run judge versions against human-labeled fixtures; track agreement rate and calibration curve over time.

Measurement

Judge-human agreement rate, drift detection latency, score stability across judge versions.

Source video

Trace-to-Eval Promotion Pipeline

beyond-evals

Prioritizing thumbs-down and low-scored production traces for promotion yields higher regression-detection power per curated example than random trace sampling.

Proof of concept

Ingest production traces, filter by feedback/score, sample into dataset, run evals against baseline.

Measurement

Regression detection power per curation hour, coverage delta, false-positive promotion rate.

Source video

LLM Client Observability Interposer

new

Wrapping LLM API clients with a tracing SDK/proxy captures production trace coverage equivalent to application-level logging with lower integration effort and no business-logic changes.

Proof of concept

Interpose a wrapper/proxy across heterogeneous LLM call sites and compare captured traces against baseline app instrumentation.

Measurement

Trace coverage percentage, integration time, runtime overhead, number of app-code changes.

Source video

Architectural implications

3

Eval assets become portable, versioned artifacts instead of ad-hoc playground sessions.

Before

Prompts prototyped in a playground and validated by manual eyeballing.

After

Task + dataset + scorer defined as a reusable unit runnable programmatically or via UI.

Consequence

Model swaps and prompt edits become diffable experiments and can be gated in CI, shifting eval ownership into the engineering workflow.

Source video

Tracing responsibility moves from application code to the LLM client wrapper.

Before

Manual logging calls scattered through application logic.

After

LLM API clients wrapped with an observability SDK/proxy that emits traces automatically.

Consequence

Tracing becomes vendor-adjacent infrastructure rather than app concern; lowers adoption cost but introduces a client-layer dependency and a data-egress surface.

Source video

The evaluation dataset becomes a downstream consumer of the production logging pipeline.

Before

Static, hand-authored test set created before launch.

After

Production traces sampled, human-labeled, and promoted into the dataset.

Consequence

Requires new plumbing (sampling, PII scrubbing, labeling queues) and turns eval-set growth into an ongoing operational process rather than a one-time task.

Source video

Tradeoffs and failure modes

4

LLM-as-a-judge scoring

Benefit

Can grade subjective criteria such as tone, style, and completeness that code scorers cannot express.

Cost or risk

Probabilistic and non-deterministic, so scores need calibration and are weaker evidence than deterministic checks for hard constraints.

Code scorers handle deterministic binary checks, while LLM judges evaluate subjective criteria like tone, style, and completeness.
Open source video
Source video

Human-in-the-loop review

Benefit

Establishes ground truth and aligns model behavior with business compliance and user expectations.

Cost or risk

Introduces human latency and cost into the iteration loop, so it cannot be the primary gate for high-frequency prompt/model changes.

Human review establishes ground truth and aligns AI models with business compliance and user expectations.
Open source video
Source video

Synthetic-first dataset bootstrapping

Benefit

Lets teams start evaluating immediately without waiting for production traffic.

Cost or risk

Synthetic cases may not match the real input distribution, producing optimistic scores that do not transfer to production behavior.

Start small with synthetic datasets and iterate.
Open source video
Source video

Continuous production logging

Benefit

Cuts debugging of field issues from hours to minutes by retaining trace context.

Cost or risk

Persisting every LLM call creates storage cost and stores potentially sensitive prompt/output content, requiring retention and redaction policy.

Production logging allows debugging issues in minutes rather than hours.
Open source video
Source video

Open questions

4

How should deterministic code scorers and probabilistic LLM judges be combined into a single pass/fail signal?

Why unresolved

The summary raises this explicitly but is truncated at 'How can we balance deterministic' and provides no aggregation policy, weighting, or threshold guidance.

Research direction

Prototype scoring-composition policies (hard-gate on code scorers, weighted composite with judge) and measure agreement/regression sensitivity across prompt versions.

Source video

How is an LLM judge itself validated and kept calibrated over time?

Why unresolved

The summary presents LLM-as-a-judge as a component but gives no evidence about judge reliability, drift, or agreement with human labels.

Research direction

Build a judge-validation suite: measure judge-human agreement on a labeled holdout set and re-check it as judge models or prompts change.

Source video

How should production traces be selected for promotion into eval datasets?

Why unresolved

The summary states logs are fed back into datasets but specifies no sampling, deduplication, or failure-prioritization mechanism.

Research direction

Compare selection strategies (random sample vs. low-scored traces vs. thumbs-down filtered) for regression-detection power per unit of curation effort.

Source video

How frequently must eval suites be re-run to catch silent provider-side regressions?

Why unresolved

The summary reports an 80% code-success drop over 3 months but gives no cadence, alerting threshold, or detection-latency data.

Research direction

Set up scheduled eval runs against pinned model versions and measure time-to-detection versus run frequency and cost.

Source video

Key claims

8
factualVerification needed

Major LLMs exhibited a 91.4% hallucination rate in certain domains in 2023 testing.

Evidence

In 2023 testing, major LLMs had a 91.4% hallucination rate in certain domains.

Question

Which benchmark/domain produced the 91.4% figure, and how was hallucination operationalized?

Source video
causalVerification needed

Top LLM code-success rates dropped by 80% over 3 months due to provider updates.

Evidence

Top LLM code-success rates dropped by 80% over 3 months due to provider updates.

Question

Which models, benchmark, and date range produced this drop, and was the cause isolated to provider updates?

Source video
comparativeVerification needed

Teams using eval tooling achieved 5x to 20x increases in feature delivery and productivity.

Evidence

Customer examples like Zapier and Coda saw 5x to 20x increases in feature delivery and productivity.

Question

How were these multiples measured, and are they vendor-reported rather than independently audited?

Source video
comparativeVerification not requested

Offline evals proactively identify issues before deployment using predefined datasets, whereas online evals monitor real production traffic.

Evidence

Offline evals proactively identify issues before deployment using predefined datasets.

Source video
causalVerification needed

Human review establishes ground truth and aligns AI models with business compliance and user expectations.

Evidence

Human review establishes ground truth and aligns AI models with business compliance and user expectations.

Question

Does human labeling measurably improve alignment or compliance outcomes, or only increase annotation cost?

Source video
opinionVerification not requested

Feed production logs back into evaluation datasets to continuously expand test coverage.

Evidence

Feed production logs back into evaluation datasets to continuously expand test coverage.

Source video
comparativeVerification needed

Production logging reduces debugging time from hours to minutes.

Evidence

Production logging allows debugging issues in minutes rather than hours.

Question

What measurement produced the hours-to-minutes comparison, and does it hold outside the vendor's own users?

Source video
factualVerification not requested

A scorer grades output on a 0-1 scale, using either an LLM-as-a-judge or a code function.

Evidence

A scorer is the logic (LLM-as-a-judge or code function) that grades output on a 0-1 scale.

Source video

Connections

4