AI Engineer World's Fair 2025
Evals 101 — Doug Guthrie, Braintrust
Read the talk
Evals 101: From a Baseline to Production Feedback
Build evaluations from tasks, datasets, and focused scorers, then use experiments, production traces, and human review to improve the same application.
From a talk by Doug Guthrie
Before you start: Basic familiarity with LLM prompts, model APIs, and Python functions is helpful; no prior evaluation experience is required.
Did that change make the application better?
When you change an application's model or prompt, how do you know whether its output improved? That question connects the development and production workflows in this workshop. Doug Guthrie introduces himself as a solutions engineer at Braintrust, where the platform UI and SDK connect local development, evaluations, production logging, and human feedback. He traces the company's origin to Ankur Goyal building similar infrastructure at two previous workplaces, and describes customers already using Braintrust for evaluations and generative-AI observability.
LLM outputs are nondeterministic, so a prompt edit or model substitution needs more scrutiny than looking at one appealing response. Evaluations make those changes comparable and help detect regressions. Guthrie recounts Goyal's framing that evals let developers “play offense”: they support deliberate exploration of better application behavior as well as guarding against breakage.
The useful unit is a feedback loop, not an isolated test run. Filter production logs, select relevant spans, add them to a dataset, and use those cases in the next offline evaluation. Guthrie attributes faster development, more shipped AI features, and better application quality to customers using this workflow, without giving numerical outcomes here. In that loop, the playground supports prompt prototyping, evaluations measure changes, and observability exposes what happens with real users—including their feedback and the records humans need to review.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
A task, a dataset, and a scorer
An evaluation is a structured test of an AI system's quality, reliability, or correctness. It needs three ingredients:
| Ingredient | Responsibility |
|---|---|
| Task | Produce an output from an input |
| Dataset | Supply the examples the task runs against |
| Scorer | Assess the resulting behavior |
The task can be a single prompt or an entire workflow that calls tools. Its complexity does not change the basic input/output contract. The dataset supplies realistic cases; the scorer supplies the logic that makes their results interpretable.
A code-based scorer can check a binary condition or compute a heuristic measure. An LLM judge receives the output and assessment criteria, then returns a judgment that maps to a numerical score. Guthrie gives labels such as excellent, fair, and poor, with score values such as 0, 0.5, and 1. The rubric must specify what those labels mean and how they map to scores.
| Mode | What it examines | Why it matters |
|---|---|---|
| Offline | Defined tasks run on test cases | Find problems and compare changes before deployment |
| Online | Records of actual application use | Monitor quality and diagnose production failures |
Tracing records model inputs, outputs, intermediate steps, and tool calls; scoring assesses those records. Depending on instrumentation, traces also expose tokens, cost, latency, and duration. Keeping these responsibilities distinct matters: collecting a trace gives you evidence of behavior, but it does not by itself judge whether that behavior was good.
Start with a baseline you can improve. Waiting for a perfect golden dataset delays the first useful comparison. Once you have a baseline, compare your own assessment of the output with the score:
| Observed output | Score | Where to investigate |
|---|---|---|
| Good | Low | Evaluation criteria or scorer |
| Bad | High | Evaluation criteria or scorer |
Both mismatches indicate that the measurement needs attention. A high score is only useful when it tracks the behavior you actually want.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Build the task and its test cases
A prompt in the platform starts with an underlying model and a system prompt. Mustache templates supply variables such as the user's question, chat history, or metadata. Metadata also gives you fields to filter later when inspecting logs. Additional system, assistant, user, and tool messages let the prompt represent a multi-turn interaction.
Tools extend the task beyond text generation: a prompt might retrieve documents in a RAG workflow or search the web. The prompt needs access to the tool it is instructed to use. Guthrie then introduces prompt chaining, which was in beta at recording time: one prompt's output becomes the next prompt's input, and each step can have different tools. That makes a sequence of tool-assisted steps available for evaluation as a larger workflow.
The dataset defines what that workflow will encounter. Only input is required. An optional expected value enables comparisons between the generated output and a reference; Guthrie names Levenshtein as a way to measure string differences. Optional metadata supports filtering, including when loading the dataset into an application codebase.
A small initial dataset can grow from production evidence. Reviewers filter logs to meaningful cases, inspect them, and select spans or traces to add to the offline dataset. This turns a problem encountered by a real user into a case the next application change can be tested against.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Give each scorer a focused job
Code-based scorers can be written in Python or TypeScript, either in the UI or in a codebase and then pushed to Braintrust. Publishing makes them available to colleagues who do not work in that codebase. LLM judges instead use a criteria prompt: for example, a rubric can explicitly assign 1 to good output and 0 to bad output. Both kinds of scorer can serve offline and online evaluation.
AutoEvals supplies ready-made code-based scorers and LLM judges. Guthrie suggests that even a simple Levenshtein comparison can establish a low-effort baseline, while acknowledging that it is unsuitable for many tasks. The baseline gives you something concrete to inspect and replace with a more task-specific measure.
Guthrie reports customers using higher-quality models as judges even when the application itself uses a cheaper model. He then introduces the running example: generating a changelog from commits. Instead of asking one judge to assess accuracy, formatting, and correctness together, give each dimension its own scorer. A formatting failure then remains distinguishable from a content failure.
For a concrete Python formatting check, suppose the chosen rule requires a changelog heading followed by at least one bullet. This narrow rule can be expressed without involving a model:
python
def changelog_format_score(output: str) -> float:
lines = [line.strip() for line in output.splitlines() if line.strip()]
if len(lines) < 2 or lines[0] != "## Changelog":
return 0.0
return float(
all(line.startswith("- ") and line[2:].strip() for line in lines[1:])
)
changelog = "## Changelog\n- Fix login timeout."
score = changelog_format_score(changelog)
That checks only the stated format; it cannot tell whether the commits support the claim about a login fix. A separate content scorer needs the relevant commits and generated text. For LLM judges, test the criteria prompt in the playground and avoid burying the actual input and output under unrelated context.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Compare changelog models in the playground
The playground brings a prompt or agent together with a dataset and selected scorers. Running it evaluates the task across those cases. This shared interface lets developers and product managers participate; Guthrie also describes doctors at a healthcare customer using playgrounds and human review. Experiments preserve evaluation snapshots so changes can be compared over time. Both the UI and SDK can produce those runs.
The live application takes a GitHub repository URL, fetches recent commits, and generates a changelog. After generation, the user can provide feedback. Guthrie has already created two prompts, a dataset, and scorers in code and pushed them into Braintrust. Those shared assets become the ingredients for the comparison.
The playground procedure is straightforward:
- Create a playground and load the existing prompt.
- Duplicate the prompt and change the duplicate's model to GPT-4.1.
- Attach the dataset and configured changelog scorers.
- Run the tasks across the dataset; cases execute in parallel.
- Open the summary layout to compare the base and comparison tasks.
The dataset and scorers are essential to the comparison: changing a model alone does not define what improved performance would mean.
Guthrie reports that the base task scored better on average completeness but worse on accuracy than the comparison task. Both changelog variants scored 0% on formatting under the demo's configured scorer and dataset. Those separate dimensions reveal a tradeoff and a shared formatting problem; they do not identify an unqualified winner.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Use evaluation results to guide a prompt edit
Guthrie next opens Loop, which he says was released that day. Its Cursor-like interface accepts a request to optimize a prompt. The crucial input is the existing evaluation results: Loop can inspect them, propose a prompt change, rerun the evaluation, and compare the new scores with the old ones. That makes the evaluation criteria part of the editing process.
In the demonstration, Loop fetches results and produces a proposed diff. Accepting the change is supposed to trigger another evaluation, but the rerun does not complete; Guthrie suspects an issue with his Anthropic API keys. The visible proposal therefore does not establish a successful optimization result.
Saving runs as experiments preserves the comparisons beyond the current playground session. You can inspect the latest change against the preceding run or look across a longer development history. The minimum remains a task, a dataset, and at least one scorer; experiments make the results of that combination available for later inspection.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Publish assets and run evaluations from code
The same workflow can start in a codebase. Guthrie describes Python and TypeScript as the most-used SDKs and also names Go, Java, and Kotlin. His Python demonstration first defines a prompt, then a scorer and dataset. Code-defined assets can live in source control; prompts created in the UI are version controlled as well.
There are two distinct SDK operations:
| Operation | What you define | Platform result |
|---|---|---|
| Publish assets | Prompts, scorers, datasets | Reusable library assets |
| Run an evaluation | Dataset, task, scorers | An experiment |
In the recording, braintrust push publishes the assets. Current function deployment documentation uses bt functions push; the recording's command belongs to its historical workflow. Defining an evaluation is a separate step: it combines the dataset—including one stored in Braintrust—with the task and scorers, then runs it to produce an experiment visible in the platform.
Publishing scorers also makes them available for online scoring, so production behavior can be assessed against criteria used during development. Evaluations can run in CI/CD to check whether configured scores improve or regress. Guthrie points to a GitHub Action integration for incorporating that comparison into the development workflow.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Instrument the behavior you need to inspect
Moving into production starts with logging the application and its tool calls. This lets you measure quality on live traffic and find cases the original dataset missed. A low user-feedback score or a comment can identify a record worth reviewing; selected records can then return to the offline dataset.
Instrumentation can grow in layers:
- Initialize a logger. Authenticate and select a project. A project groups the prompts, scorers, and datasets for a feature, while allowing assets to be used across projects.
- Wrap the model client. Guthrie shows wrapping an OpenAI client to capture metrics such as tokens, duration, and cost.
- Trace functions. A trace decorator records operations such as tool calls.
- Define custom spans. Lower-level span APIs let you choose the input, output, and metadata to record.
Start with the client wrapper, then add detail where the application needs diagnosis.
Online scoring applies configured scorers to incoming records. Guthrie gives 10% and 20% as example sampling rates, so teams need not score every log. Automations can alert when a score falls below a threshold. Custom views then filter the rich log stream into a manageable set of cases for human review.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Keep production spans compatible with evaluation cases
The production code demonstration wraps a Vercel AI SDK model to capture metrics, then explicitly defines span inputs and outputs. The span's data shape should match the offline dataset's data shape. If the logged record already has the structure the task expects, selecting it for a dataset does not require reconstructing the request from unrelated trace fields.
Guthrie then configures live scoring:
- Open the configuration pane and choose Online scoring.
- Create a rule and select the desired scorers.
- Set a sampling rate; the demonstration uses 100% so incoming changelog records will be scored.
- Choose the span the rule should evaluate.
A rule can target an individual span rather than the root span. In a RAG workflow, for example, a scorer could assess whether retrieved material is relevant to the user's query. That is a different question from whether the final generated answer is good.
Running the changelog application again produces new logs and online scores. This connects the offline criteria to actual application usage: the team can inspect how the same dimensions behave over time in production and identify where another development iteration is needed.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Turn feedback into a review queue
The changelog application's feedback control offers thumbs up, thumbs down, and an optional comment. The resulting user-feedback score and comment appear in Braintrust alongside the log. Guthrie filters for feedback equal to 0 and saves that filter as a view. The live demonstration initially has no matching rows, but the saved view defines where reviewers can find future negative-feedback cases.
Pressing R, or using the review button, opens a pared-down human review pane. It pairs the record's input and output with configurable review fields. Those fields can include free text and custom scores, so reviewers assess the dimensions the team has chosen rather than merely leaving an unstructured impression.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Find the step that caused the bad answer
The changelog trace exposes more than the final model call. It shows the application finding the latest GitHub release, fetching commits since that release, and generating the changelog. Instrumenting these operations makes the workflow inspectable at the level where a failure may actually occur.
Guthrie switches to a conversational analytics application to show why intermediate scoring matters. Before returning data, the application rephrases the user's question using chat history. If that rephrasing loses the user's meaning, later steps may answer the wrong question even if they execute correctly. A dedicated span scorer can assess the rephrased question; another can assess the inferred intent. Those checks can run both offline and online.
Someone still needs to supply and maintain the human judgment behind these assessments. Guthrie recounts Sarah Sachs's Notion workshop, describing a review role that combines product-management judgment with LLM expertise. In smaller organizations, engineers may do this work. Human assessment grounds the quality and reliability checks that automation applies at scale.
Internal review and user feedback contribute different evidence. Internal reviewers inspect logs and apply configured scoring criteria. Users respond from inside the application, often through a rating or comment. Feedback-based views route those experiences to reviewers, who can decide which cases should influence the next offline evaluation.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Curate cases and calibrate the evaluators
The audience first asks how feedback and log data can reveal intent and improve model performance. Guthrie answers through dataset curation: filter to meaningful records, select individual rows or all relevant rows, and add them to the dataset used for offline evaluations. The demonstrated bridge is the transfer of reviewed cases into future tests; it does not automatically modify the model or extract intent from feedback.
For comparing multiple models in production, Guthrie assumes the application serves or swaps among the models. Scores can then be grouped by model and inspected in comparative views. This supports analysis of production variants, although the demonstration does not show how traffic is allocated among them.
Human reviewers can disagree just as automated scorers can misjudge. Asked whether individual reviewers' scoring can be compared, Guthrie recommends starting with a shared rubric and clear guidelines. The platform shows who scored a record; he is unsure whether those reviewer scores can be extracted as a dataset for disagreement analysis. The immediate intervention is to make the expected judgment explicit before inconsistent criteria spread through the review process.
Another question distinguishes relative judgments on a fixed test set from standalone judgments about new production samples. Guthrie confirms online use of LLM judges and recommends evaluating the judges themselves: inspect their rationales and test whether their assessments are sound. He again references a process described at Notion. This gives a direction for checking judge quality, but does not establish an absolute calibration method for a single new answer.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Use evaluation evidence before launch and beyond the platform
A participant working with a government organization needs to demonstrate accuracy before deployment. Subject-matter experts already have thousands of questions. Guthrie identifies this as an offline-evaluation use case: use the existing questions and configured measures to establish a baseline before exposing the application to production traffic.
The resulting score history can help stakeholders judge progress. Guthrie's hypothetical progression from 20% to 30% to 40% illustrates improvement across iterations, not measured accuracy or a launch threshold. The purpose is to make the application's development visible enough that confidence rests on evidence people can inspect.
The final question comes from a team building an ML platform that wants monitoring data in a unified dashboard. Guthrie says experiments and datasets can be retrieved through the SDK, and describes a customer building its own UI from logged data and experiments. The evaluation workflow can therefore supply a team's existing operational interface as well as Braintrust's own views.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
From the talk
Python and TypeScript scoring library with LLM judges, reference comparisons, and heuristic checks.
Further reading
Official GitHub Action for incorporating Braintrust evaluations into CI workflows.
Updates since the talk
Current guide to preserving evaluation runs and running experiments through code, the UI, or CI/CD.
Configure production scoring automations and select the traces, spans, or groups they evaluate.
Current instructions for publishing, invoking, and versioning reusable functions and scorers.
Use Braintrust's assistant to analyze logs, optimize prompts, and build evaluation datasets and scorers.
Read the complete timestamped transcript
- 0:00
[upbeat music] Hey, everybody.
- 0:17
My name is Doug Guthrie. Uh, I'm a solutions engineer at Braintrust. Um, as you can see here, we're an end-to-end developer platform for building AI products. We do evals.
- 0:28
If you, if you watched the, the keynote this morning, you saw our founding engineer jumping up and down on stage yelling, "Evals." I am not gonna do that. I'm not as, uh, as funny or cool as him, but, uh, we should all be very excited about evals here.
- 0:43
Very brief agenda of, of what we'll cover today in this sort of, uh, this intro. Uh, very, very brief company overview. Uh, give you an intro to evals. Why you-- why would you even, uh, start thinking about using them?
- 0:56
What are they? Uh, what are the different components that you need to create an eval? Um, some more Braintrust-specific things via, uh, running evals via our SDK. You'll see, uh, in the examples, um, that you can run evals both, uh, in the platform itself as well as the SDK.
- 1:14
I think it's, it's a really kind of cool thing that we can connect, uh, maybe the local development that we're, that we're doing with what we're doing within the platform.
- 1:23
Uh, and then how we then move to production. Uh, this is, uh, maybe human review. This is online scoring. So how well is our, our application performing, uh, in production?
- 1:33
And then lastly, a little bit of human-in-the-loop, uh, getting user feedback from your users. How do we now, uh, take some of these, uh, these production logs and feed them into the datasets that we're using in our evals, uh, creating this really great flywheel effect?
- 1:51
Cool. Quick, quick company overview. Um, you see up there, maybe in the top right, uh, some of our fu-- uh, excuse me, some of our investors. Uh, maybe a quick call-out on the, on the leadership side.
- 2:03
Ankur Goyal is our CEO. Uh, maybe the, the reason to call out that is, uh, Ankur in the last, uh, two, two stops, he, he essentially built Brain-- uh, Braintrust, uh, from scratch the last two places and, and this is really where he found the, the idea to like, like maybe this is actually a, a thing that,
- 2:22
that people need and, and really like the origination story of Braintrust. Uh, the other thing to call out here is like we already have a lot of companies using Braintrust in production today.
- 2:34
This is just a, a few of, uh, the, the companies that are, that are utilizing us for, for evals, for, uh, for observability of their, their gen AI applications.
- 2:45
So I won't bore you too much with, with that, but, uh, let's jump into this. If you're at the keynote, you probably saw a, a similar slide here. I didn't, I didn't take it out, but, uh, uh, you see like the, the tech luminaries here, I think as, as Manu referenced them, talking about evals and the importance
- 3:00
of them. I think this is a, you know, obviously this is an intro to evals, uh, track, and what better way to start this out with, uh, some, some really, um, you know, influential people in the space talking about evals and, and why they are so important.
- 3:15
So why would you think about evals, right? They, they, they help you answer questions. So here's, here's a few of them. Um, when I change the underlying model to my application, is it, is it getting better or is it getting worse?
- 3:29
When I change my prompt, right, or when I change, uh, certain, certain things about the application, is it getting better or is it getting worse? We wanna get away from, uh, not having a, a rigorous sort of process around building with large language models which, as you all know, right, the non-deterministic outputs, uh, creates somewhat of a
- 3:47
challenge. And without, uh, evals in place, becomes really, really hard to, uh, to create a good application that we can put into production. Maybe some other ones, like obviously being able to, uh, uh, detect regressions within the, within the code.
- 4:02
I think the other, the other thing that Ankur mentioned, uh, to me when I first started, which I didn't really mention this, but, uh, this is my, my third week at, at Braintrust as a solutions engineer.
- 4:10
But one of the things that he mentioned to me that I thought re-really resonated was, uh, evals are a really great way-- I think people think of them as almost like unit tests for, uh, for, you know, our applications.
- 4:22
But he kinda described it another way of like this is a really great way for us to play offense, uh, as opposed to just playing defense, where I think maybe unit tests are, are, are kind of used for.
- 4:31
This can actually be used as a tool to, to really help, uh, create a lot of rigor around us building and developing these applications and ensuring that we actually build, uh, things that we can put into production.
- 4:44
Maybe from like a business perspective, uh, why would you think about running evals or using evals? Uh, here's a few here. Uh, if you have, um, evals running both offline and online, you create the-- this feedback loop or this flywheel effect I think Manu mentioned in the, in the keyno- the keynote, excuse me.
- 5:03
Um, and this flywheel effect allows us to, you know, uh, cut dev time, allows us to enhance the quality of this application that we're putting out into production. If you're able to connect the things that are happening in, in real life with your users in production and being able to, uh, filter those logs down, add those spa-
- 5:21
spans to datasets, inform what you're doing in an offline way, creates, uh, that, that flywheel effect that becomes really powerful from a development perspective.
- 5:32
Uh, again, a little bit more on the, on the customer side. Here's a few of our customers and some of the outcomes that they've, that they've seen using Braintrust, whether it's, uh, moving a little bit faster, pushing more AI features into production, or just increasing the quality of, of the applications that they have.
- 5:48
Here's a few of the, the outcomes that we've seen or that they have seen.
- 5:52
So let's, let's start talking a little bit about the, the core concepts of, of Braintrust. Obviously, we're here to talk about evals. Uh- The, the, the things that I think, um, you see like these arrow, these arrows going, uh, one way and, and the other, this again is that, that flywheel effect that, that I described earlier.
- 6:11
Um, there's the, the prompt engineering aspect of this. Uh, in Braintrust, think of, uh, th- this playground that we have as an IDE for LLM outputs. Uh, the playgrounds allow for that rapid prototyping.
- 6:23
As we make those changes, as we change the underlying model, what is the impact to that, to that, uh, particular, uh, task or that application? Then those evals allow us to understand the improvement or the regression of those changes, and then the observability aspect, right?
- 6:37
This is the, the logs that we're generating in production, the, the ability to, uh, uh, have a human review those logs in a really easy, uh, intuitive interface, and then have user feedback from actual users be logged into the application as well.
- 6:52
So, what is an eval? Yeah, you probably, uh, heard this, uh, several times y- today and throughout the week if you stopped by the booth. But sort of our definition here is that structured test that checks how well your AI system performs, right?
- 7:04
It helps you measure these things that are important, quality, reliability, uh, correctness.
- 7:13
So, what are the ingredients in an eval? Right? I've been talking a little bit about task, right? This is the thing, uh, the code or the prompt that we want to, uh, evaluate.
- 7:21
The, the really cool thing about Braintrust is that this can be as simple as a, as a sim-- uh, excuse me, a single prompt, or it could be this, this full sort of a- agentic workflow where we're, uh, calling out to tools.
- 7:32
There's no sort of limit onto the, uh, the, the complexity that we put into this task. The only thing it requires is an input and an output. The second thing is a dataset.
- 7:41
This is our, uh, real world examples. This is, uh, essentially what we're gonna run the task against to understand how well, uh, our application is performing. And how we do that is via scorers.
- 7:53
So, the scorer is really the, the logic behind your evals. There's, there's a couple different ways to think about this. There's the LLM-as-a-judge type scorer. So, uh, you give it the, the output and some criteria, and it is able to assess, uh, like say, "I want, uh, based on this output, is this excellent?
- 8:11
Is this fair? Is this poor?" And then those outputs then correspond to, you know, zero, point five, or one. Uh, you also have code-based scorers, right? These are maybe a little bit more heuristic or binary, but, uh, we can use both of these to really aid in the development of that, of that eval and ensuring that we're
- 8:28
building a really good application. Uh, I think I just sort of mentioned this here as well, but like the, the two mental models here of, of evals, there's, there's offline and online.
- 8:40
Offline is pre-production. This is us actually doing that, that iteration. It's, uh, identifying and resolving issues before deployment. Uh, this is where we're defining those tasks. It's where we're defining those scorers.
- 8:53
Uh, online evals, this is that real-time tracing of, of the application in production. It's logging the model inputs and the outputs, uh, the intermediate steps, the tool calls, everything that's happening.
- 9:04
It allows us to diagnose performance and reliability issues, latency. Uh, based on how you instrument your, your application with Braintrust, we can pull back lots of different metrics related to cost and tokens and duration, and all of these things be-- help inform, uh, how we build this application.
- 9:23
Um, I'll, I'll jump into a little bit more of like how we can instrument our app, uh, for online evals. Uh, we're gonna first, I think, talk a little bit more of the offline.
- 9:33
Before doing that, uh, maybe just like level set on how to improve. I, I think one of the, the, the, the things that I've seen, uh, in the last few days here, the conversations that I've had, it's like almost how do I get started, or what do I do if X, or, you know, those types of questions.
- 9:51
Another thing I heard from Ankur, uh, very early on is that like just get started. Create that baseline that you can then iterate and build from. Uh, I think a lot of people get caught in like creating this, this golden dataset of test cases, uh, that they, they can then like iterate from.
- 10:07
Start-- You, you don't necessarily have to do that. Start and build that, uh, that baseline. Establish that foundation that you can then improve upon. But this is a really good sort of matrix of like, uh, if I have good output but a low score, what do I do, right?
- 10:21
Improve your evals. If I have bad output and a high score, improve your, your evals or your scoring. But really good kind of like high level, uh, understanding of, of where to start to target your, your efforts when you are building these apps and you're, and you're creating evals.
- 10:39
So, let's jump into the actual components that I just, that I just talked about. So, within the Braintrust platform, we have a task. Uh, again, this could be a prompt.
- 10:47
This could be like this full agentic workflow. Uh, very basic. You, you see that, that GIF running. This is a prompt within the platform. You, uh, specify an underlying model that you want it to use.
- 10:57
You give it a, a system prompt. You can also, uh, give it access to tools. It has access to musta- mustache templating, so you can pass in variables like user questions or, um, the, you know, the input from the user, its chat history, or metadata, right?
- 11:11
So, when we actually go and wanna parse through these logs, the metadata becomes actually beneficial, uh, enabling us to do that in a really easy way. Um, going forward, uh, maybe we have a multi-turn sort of chat type scenario where we wanna add, uh, additional messages for the system and the assistant and the user, uh, and our
- 11:31
tool calls as well. The, uh, the, the platform allows for that just via this, uh, plus-- this messages, uh, button, and then you're able to add those different messages to the prompt.
- 11:43
Um, also, we can add tools. So, oftentimes, the, the, the prompt will, will need access to, to something, right? Maybe it's a, it's a RAG-type workflow. Maybe it's doing web search.
- 11:52
Whatever it is, we can now use those tools a- as part of that prompt, right? And so when you, you sort of encode in that prompt, like make sure you use X tool, uh, this prompt has access to that tool while it's running.
- 12:07
Uh, the last one, this is actually a feature that is in beta right now. Uh, it's actually creating more of that agentic-type workflow within your, uh, within the Braintrust platform itself.
- 12:17
So it's, it's a way right now at least to chain together prompts where the, the output of one now becomes the input of the other. But if you think back maybe to, to this slide, if I have sort of, um, this prompt that has access to tools, you, you create a pretty powerful system here where you're able
- 12:33
to go from, uh, maybe that first step that has acc-access to a certain tool, and we get some output from that. We can then go to that next step that has access to maybe some other tools, right?
- 12:44
This sort of like maybe multi-agent type of workflow we can create with the underlying tools within those prompts.
- 12:52
The second thing that I talked about is datasets, right? These are our test cases that we want to give to the, the task to run, so we can sort of iterate over that.
- 13:01
We can get the output and then going down a little bit further, actually score that. But this is, um, obviously really important when we're, when we're running our evals and then when we are, uh, trying to pull from production, right, the, the actual logs that are happening, we can add those, those, uh, spans, those traces to the
- 13:18
datasets in a really easy way, and I can show you what that looks like. But, uh, if you look there at the bottom, the only thing that's required is the, the input.
- 13:25
Uh, you also have the ability to add, uh, expected. So what is the expected output for that input, right? You can sort of like, uh, create some sort of scorer that looks at the output with the expected.
- 13:36
There's a, a scorer called Levenshtein that allows you to, you know, measure the, the, the difference between those two. So you can do some different things based on what you provide to that dataset.
- 13:45
You also have metadata as well, again, being able to filter down different things, pulling the dataset maybe into your own code base, and I want to filter by, again, X, Y, or Z via the metadata.
- 13:54
That's all possible. Uh, I mentioned this a little bit ago, but just start small and iterate, right? You don't have to create this golden dataset to, to get started here.
- 14:04
Um, just re- just start and then, uh, then continue to iterate and build from that baseline. Uh, the human review portion also becomes really powerful. Again, when we have stuff, uh, being logged within production, having humans actually go through those logs, a-and, you know, there's lots of different ways to filter it down to the things that they
- 14:23
should be looking at, and then we can now decide to add those things to certain datasets that then inform, uh, the offline evals that we're running.
- 14:34
Uh, the last thing, the last ingredient here that we need for our, [clears throat] excuse me, uh, for our evals are our scores. We have both code-based scores, right? Again, this is like more of those binary-type conditions.
- 14:46
But you can actually, uh, code TypeScript or Python. You can do that within the UI, as you see over there on the bottom left, or you can, within your own code base, create that scorer and then push it into Braintrust, so we can use it in the platform.
- 14:58
Other users who maybe aren't in the code base can use that scorer as well. The other scorer that we have access to is called LLM-as-a-Judge. So this allows us to use an LLM to sort of judge the output.
- 15:10
We can give it the, the set of criteria that indicates what a good or a fair or a bad score or whatever it is. You, you get to decide, uh, what that looks like.
- 15:19
So you give it that criteria, and it says, "If it's good, uh, I wanna do a one. If it's bad, I wanna do a zero." But this starts to create the scores, uh, that we can use in that offline and that online sense.
- 15:31
The other thing to call out here is that we have, um, internally built a package called AutoEvals. So this is something that you can now pull into your project.
- 15:40
These are out-of-the-box scorers that are both LLM-as-a-Judge as well as code base. And so it just allows you to get started very, very quickly. Another thing I heard Ankur mention is, um, maybe starting with Levenshtein, maybe not the best scorer in, in a lot of cases, but again, it establishes a baseline.
- 15:57
Very, very little development work for, for, uh, our users, but it creates that thing that we can then build from. And now you have, uh, a direction, a direction to go in to go build maybe that more custom score.
- 16:11
Some of the things that we've heard from our customers, uh, some tips that, um, that, you know, important to think about.
- 16:18
A lot of our customers are using higher quality models for scoring, uh, even if the prompt uses, uh, a cheaper model. Just, just makes a lot of sense, like, while we're running that application to use the cheaper model but use the, the more expensive one to actually go out and score it.
- 16:32
Um, also break your scoring into, uh, very focused areas. So, uh, the example that I'll show is a, an application that, that generates a change log from a series of commits.
- 16:43
So I could create a scorer that says, "Assess my accuracy, my formatting, and my correctness." Uh, or I could create three different scorers that assess accuracy and then formatting and then correctness.
- 16:54
So have your scorers be very targeted to the thing, uh, that they're supposed to be doing.
- 17:00
Uh, test your scorer pom-- excuse me, prompts in the playground before use, and then avoi-avoid overloading the scorer or prompt with context. Uh, focus it on the relevant input and the output.
- 17:14
A couple things here. Here's where, uh, over on the left we have our playgrounds. This is where we do that, that sort of like rapid iteration where we can pull in those prompts, we can pull in those agents, add our datasets, and add our scorers, and we can click Run, and it will go out and sort of
- 17:28
churn through that dataset that we've defined and will give you a sense for how well your task is performing against the dataset with the scorers that we defined. But this is the place where, uh, developers, uh, PMs, uh, we even have, uh, a healthcare company that has doctors coming into the platform and interacting with the playground and
- 17:45
even doing human review as well. Uh, depends a little bit obviously on, on the organization. The thing on the right is our experiments. This is our sort of like snapshot in time of those evals.
- 17:56
So imagine now, like, as we are doing this development and we're trying to understand, uh, like the last, you know, the last month or so, are, are we getting better, right?
- 18:04
The, the, the changes that we are making, the model changes, whatever it is, are we improving our, our application? And the experiments is a really great way to, to understand that
- 18:15
Uh, really important maybe to call out as well, you can see in the bottom right, the evals can happen from, uh, the application, right, the, the Braintrust platform, as well as via the SDK. [clears throat]
- 18:26
Cool. Maybe just really quick because, uh, nobody likes looking at, at slides all the time. I, I certainly don't. Uh, maybe if you haven't seen Braintrust yet, th-this is maybe a good, a good quick demo.
- 18:37
Uh, so again, like the, the, uh, the idea here is I have this, this application. I'll just give you-- I'll show you over here. Uh, you give it a GitHub repository URL.
- 18:47
It, uh, grabs the most recent commits and then creates a change log from there. And then once this completes, you can even provide some user feedback. But this is the thing that we want to, uh, evaluate.
- 18:59
So what I can do, uh, I'll go into my, my playground. Right? This is the place where I can start to, uh, run those, those, uh, those experiments, or I can start to iterate on that prompt that I have.
- 19:10
From my project, I've actually loaded in two different, uh, two different prompts. So maybe I'll-- Before going into the playground, I've actually created these two prompts within my code base, and I've pushed them into the Braintrust platform.
- 19:23
I've also created a dataset in that code base, and I've also created some scorers. Right? These are the ingredients that we need to run our evals.
- 19:32
So now when we have, we have those, we have those different components, now we're able to start to iterate here. So I'm gonna actually create a net new playground,
- 19:41
and I will load in one of these prompts.
- 19:47
So again, here's my first prompt. Uh, my first prompt has a, a model associated with it. What becomes really cool here is the ability to, to like, to iterate on the underlying model.
- 19:56
Right? I think a lot of us are-- we have access to a lot of underlying providers, and we wanna be able to understand if I change this or if I, you know, a, a provider a-adds a, a new model, what is the impact to my application?
- 20:09
So I can duplicate this prompt and maybe change this to GPT four one. I can run this. Oops.
- 20:19
Before I run it, I have to add all of my components. So I'll add my, my dataset, and then I can add my different scores that I've, uh, that I've configured here for my change log.
- 20:29
And so I can click Run, and then now we'll understand here what is the effect of changing the model, uh, for this particular task with the scores that I've configured against this dataset.
- 20:39
So this will churn through all of these in, in parallel, and we'll start to get some results back. Uh, lots of different ways to actually start to look at this data.
- 20:47
I always like coming over to the summary layout because I, I can understand, like, um, you can see over here, this is my base task right here, and then my comparison task.
- 20:54
So I can understand, uh, looks like, you know, on average, uh, the, the base is performing a little bit better than my, uh, comparison task on my completeness score.
- 21:05
Uh, it's faring a little bit worse on my accuracy score. Uh, both of them are, you know, zero percent on my formatting, so probably have some work to do there.
- 21:12
But you can start to see how you can use this type of interface to iterate very quickly. Right? Now, uh, the other thing that, um, maybe shouldn't do, but, uh, I can't resist because we just released this today, is this new loop feature.
- 21:27
So imagine you are, uh, you know, you're a user within Braintrust, and before this, you would sort of manually iterate here, creating net new prompts, uh, making modifications, changing the model.
- 21:38
What if you could now, uh, utilize AI to go and do that for you? So any sort of like cursor-like, uh, interface, we can ask it to optimize a prompt.
- 21:48
And I think the really unique thing here is it has access to those, uh, those evaluation results. And so when it goes to go, uh, change that prompt, it understands that-- It changes the prompt, it runs the evaluation, it understands if it got better relative to the scores that we defined.
- 22:04
So you can see it, it's gonna go through here. It'll fetch some eval results. Uh, you'll probably see a diff here very, very soon. If we don't, I won't, I won't hang out here too long.
- 22:12
But I do wanna highlight one of the things that we are releasing that really enables our users to iterate in a really, uh, really fast way. So here's my, my change.
- 22:22
We can click Accept, and then it'll actually go out and run that eval again. Or it would. Uh, I think I, I have an issue with my Anthropic API keys.
- 22:31
But the idea here again is, like, we can create that very rapid, uh, iterative feedback loop here within the playground.
- 22:39
The other thing here is, uh, we can run these as experiments. So this is, um, this is where we can start to s- create those snapshots in time of that eval, and again, see as I make these changes to that, that application, how has it sort of performed over time?
- 22:54
I wanna make sure I don't-- I don't wanna go down. I don't wanna like, uh, decrease the performance of my scores relative to obviously the last time it ran, but, uh, looking out over the last month, six months, whatever it is that we're tracking.
- 23:09
Cool. So that was very, very, uh, brief sort of intro to like evals via the UI. Right? Again, like just to summarize, we need a task, we need a dataset, and we need at least one scorer.
- 23:24
We can pull those into the playground, and now we can start to iterate. We can save these via experiments, uh, and now we c- we have a way in which we can understand how well this application is performing.
- 23:35
Right? This is no longer like qualitative. Right? This isn't like, "Hey, I think this got better. That output looks better." There is actual rigor behind this now. Um, customers oftentimes ask though, like, "I don't really wanna use," or, "I'm not gonna use the, the platform as much.
- 23:50
I'd rather use this from my, my code base. Is that possible?" Uh, and it is. Uh, so, uh, we have a Python SDK. We have a TypeScript SDK. There, there are some other ones as well: Go, Java, Kotlin.
- 24:02
Uh, for the most part, most of our users are using, uh, Python or TypeScript. Here's a just couple examples of what this might look like [clears throat] from an SDK perspective.
- 24:11
Um, actually, if you all aren't, uh, opposed to looking at, uh, some code Here's just a, a really basic example of, uh, defining a prompt within my, my code base and then pushing it into Braintrust.
- 24:24
So just leveraging that, that Python SDK. Uh, another example, actually come over here,
- 24:31
creating a score. So you give it sort of like the, the things that it's looking for, but now I've sort of defined this score within my code base. Uh, it's version controlled.
- 24:40
Um, also the, the prompts that you create within the UI are version controlled as well. Um, but this is just another way to start to interact with, with Braintrust.
- 24:48
So again, scores, we could do datasets, uh, and then you can even do, uh, prompts up here as well, I believe. So here's my eval dataset, here's my ch- changelog to prompt.
- 24:57
Again, being able to start from the code base and actually push them into the platform is possible, just depends on the organization where they wanna start. The, the other thing here is, like, this is more on the, like, the, the components of the eval side.
- 25:09
So that's that top portion. Define those assets in code, run that Braintrust push, and now you have access to that in that Braintrust library. The other one is actually, like, defining the evals in code, right?
- 25:19
So what that looks like is, is slightly different. Um, come over here. So we have our eval, but this is just a class that's coming from our Braintrust SDK.
- 25:29
Again, it's looking for the exact same things that I just described, right? A dataset that we can use from, uh, Braintrust itself, uh, the task that we want to invoke, and then the scores.
- 25:38
So again, defining this here within, uh, within your code base, certainly possible, and then I can run, you know, a command
- 25:47
that actually runs that eval within Braintrust. So from here, go into Braintrust, see the eval running. This is now experiment that I can view over time. So again, like, you saw two different types of workflows here, uh, again, catering to maybe two different personas or, again, the way in which, uh, organizations wanna work.
- 26:06
It's up to them. Braintrust is very flexible in how we allow our users to, uh, to consume or use the platform.
- 26:22
Uh, probably jumped ahead a little bit, but y- this is sort of a recap of what I just showed you. Again, from your code, you, you create your prompts, your scores, your datasets.
- 26:31
You can push them in there. Uh, maybe just importantly to-- important to highlight here of, like, why you would do this. Uh, you wanna source control your, your prompts.
- 26:40
Uh, the big one here to call out is the online scoring. Uh, uh, I have a section in a little bit diving a little bit deeper into that. Uh, but if you want to use those scores that we define in the dataset, we should push them into Braintrust so that we can create online scores.
- 26:53
We can understand how our application is performing in production relative to those scores that we want or that we're using within our offline evals.
- 27:02
What I just showed you, maybe another, uh, another variation of that, that eval within our code, again, defining that dataset, defining that task, defining those scores, becomes very, very easy to now connect these two things.
- 27:13
It's just, again, up to you to decide where you o- where you wanna do this. The other thing to call out here is that this can be run via CI/CD.
- 27:20
We do have some customers that, that wanna run their evals as part of the CI process. So understanding in a more automated way, right, the, the score for A, B, and C, whatever they've configured.
- 27:30
Has it gotten better? Has it gotten worse? This becomes maybe a check as part of CI. There is, uh, if you look within our documentation, there's a, a GitHub Action example that shows you how you could set this up.
- 27:43
Cool. Let's, let's move to production. Moving to production i- entails setting up logging, right? It entails instrumenting our application with, uh, with Braintrust, um, code. Uh, being able to, like, say, "I wanna wrap this, this, uh, LLM client.
- 28:02
I wanna wrap this particular function when it goes to call that tool," becomes very, very easy to do that. But so, so why should you do it? Um, I think I've probably said it, said it numerous times here, but we wanna measure quality on live traffic, right?
- 28:14
We actually wanna understand how well our application is performing with those scores. Really great to use during offline evals, becomes, uh, our aid in ensuring that we, that we build really good applications, that we're not creating regressions, but also really important to monitor that live traffic.
- 28:30
The other really important thing to call out, I think, is that, that flywheel effect that it creates. So we have these datasets that we use to inform our offline evals.
- 28:40
It's very, very easy now to take the, the logs that are generated within production and add those back to datasets. This also, um, speaks to some of that human review component, where we want to now bring those humans in.
- 28:53
They can start to review some of the logs that are relevant. Like, maybe there's user feedback equals zero. Maybe there's a comment or whatever it is. But, like, they can filter down to those particular things, and as they find really interesting maybe test cases, very, very easy to add those, uh, back to the dataset that we use
- 29:09
in our offline evals. So I think the, the feedback loop or the flywheel effect that this, that this creates is one of the really, uh, fundamental value props of, of the platform.
- 29:20
So how do we do this? Uh, there, there's a couple different ways. We're, we're first gonna initialize a logger. This is just gonna authenticate us into Braintrust and point us to a project.
- 29:29
Uh, you may have seen when I opened up the platform, I had numerous projects inside of there. You can almost think of a, a project as a, as a container for that feature, right?
- 29:38
So you probably have multiple AI features that you're building. I wanna have a container for feature A for those prompts, those scores, those datasets. You could certainly utilize those things across projects, but it becomes a really good sort of way to, uh, containerize the things that are important for that feature.
- 29:53
Then you can start really basic, right? You can wrap a, a- an LLM client. Uh, so when you saw those, some of those metrics with, like, tokens and L- and duration and costs, uh, just very basically within the, the s- uh, the script or, excuse me, the, the code here, I just wrapped that OpenAI client, and now
- 30:11
I'm just sort of ingesting all of that, those metrics into my logs. That's the easiest way to get started. You obviously probably want to, uh, do a little bit more.
- 30:20
Again, maybe you want to, uh, understand when, you know, that LLM invokes a tool. So I wanna trace, uh... I can add a trace decorator on top of a function.
- 30:30
Uh, I can even use some of the, like, the, the Braintrust low-level, like, span elements to create custom logs, and I wanna customize the input, and I wanna customize the output and the metadata that we, that we log to that span.
- 30:42
So again, you can s- you can start very basic with wrapping a client and then go down to, like, the individual span itself, specifying that input and that output.
- 30:54
This leads us to online scoring, right? This is-- I talked a little bit about this, right? This is where, like, when our logs are coming in, we can actually configure within the platform those scores that we want to run, and we can specify sort of a sampling rate, so we don't necessarily run that score across every single
- 31:09
log that comes in. Maybe it's ten percent, twenty percent, so on. Um, but it, but it creates that really tight feedback loop that, that I've been talking about. Uh, I'll also-- maybe just important to mention, the early regression alerts.
- 31:22
So we can create automations within the Braintrust platform. If my score drops below a certain threshold, let's create an alert, uh, with it, with our automation feature.
- 31:33
This is just a-- And I can maybe walk through what this looks like instead of showing you here. Uh, the custom views, this is where, like, there's a lot of really rich information within these logs, and it becomes really important, I think, again, for the human review component to, like, filter these down to the things that they
- 31:51
care about or the things that anybody cares about. So we can create custom views within Braintrust with the appropriate filters, uh, and then it's very easy for that human to go into what we call human review mode within Braintrust and sort of parse through those logs, uh, the ones that are the, the ones that are gonna be
- 32:07
most meaningful to them. Let me, uh, let me connect some of those, those dots there. So
- 32:19
again, showing you some code, may be good, may be bad, but, um, I'm guessing there's some technical people in the room that, that don't mind here.
- 32:27
So if I look for, um, the... Uh, you may have si-seen in one of those slides there is a, you know, the Ver-Vercel AI SDK. I wanna wrap this AI SDK model.
- 32:40
Uh, again, this allows us f- to just create all of those metrics within Braintrust with just zero lift from us as a developer. This becomes really easy to do.
- 32:49
Uh, you can also see where I have specified that span itself, right? I actually wanna define the inputs and the outputs of that. The, the reason you would do that is because you have a specific dataset with a structure that you want to ensure maps to that.
- 33:03
So, like, when you are within those logs parsing through them, becomes really easy to add those spans back to that dataset. So ensuring that that data structure is sort of, uh, consistent across offline and online becomes really important, again, to create that feedback loop.
- 33:17
So this is, you know, very high level of, like, how we can start to create those spans.
- 33:21
Um, now that we do, right, we can now go in, uh, the platform and start to configure our online scoring. So this is here just within this configuration pane.
- 33:29
I can click Online scoring. I'll just delete-- I'll create a new rule.
- 33:36
Uh, so my new rule, and here's where we can add different scores, right? Obviously, I have a few here that I've been using for the offline evals. I don't necessarily need to select all of them, but I certainly can.
- 33:50
And then I want to, uh, apply a sampling rate. So I wanna actually give you an example of what this looks like, so I'm gonna do a hundred percent.
- 33:57
The other thing to call out here is that you can apply these to the individual spans themselves and not the entire root span. So where this becomes beneficial is, like, when you are invoking maybe tool calls.
- 34:08
You're invoking, like, a, a RAG workflow, and you actually wanna create a score on whether or not the thing that it gave back, uh, is actually relevant to the user's query.
- 34:19
So we can actually create a score specifically for that and highlight what that span is here. So again, very, very, uh, flexible in how you apply these scores to the things that are happening online.
- 34:32
Now, when I come back here to the application,
- 34:35
and we'll just run this again, uh, creating that change log.
- 34:41
You'll now start to see here within, uh, the logs,
- 34:45
this will start to show up, and then you'll start to see these scores be generated. Right. Again, this is where, like, you can now start to understand over time in production, how are these things doing?
- 34:55
How are they faring? Where can we get better? Uh, again, now we can connect again, like, the things that are happening in our offline evals with the things that are happening with online.
- 35:03
The other thing to, to call out here is the, uh, the feedback mechanism, right? Uh, w-we certainly have, uh, the ability to do, like, human review, but oftentimes you want your users to pro-provide feedback as well.
- 35:15
And so this is just a basic example of a thumbs up, thumbs down, and you can even provide a comment here.
- 35:23
This can now be logged to Braintrust. So I should see over here my user feedback. So here's my, my comment, and then I have my user feedback score. But now I can also do something like this.
- 35:36
So again, maybe I want to filter my logs down to where user feedback is zero. So click that button. I'm gonna change this to zero.
- 35:50
Right. I don't have any rows yet like that, but now I can save this as a view, and people who are now using this as human review can filter this down to where user feedback equals zero, and we can figure out what's going on, right?
- 36:02
What are the things that, that fell down here within this application that we need to go fix? The other thing I'll highlight here is our sort of human review component.
- 36:11
Uh, actually, um, y-you click that, that button, or you can hit just R, and it opens up this, this different pane of your log. So it's a paired-down version of what you just saw there.
- 36:22
It's a little bit easier for a human to go through and actually, uh, look at that, that, that input and that output. But you, as a, as a user of Braintrust, can configure the human review scores that you would like to, uh, to, to use.
- 36:35
So I have this add something here, so maybe this is a little bit more free text. I have a better score. Again, these are the things that, that you can add to your platform that map to the, the, the, the review-- excuse me, the scores that you want your, your humans to, to add to those logs.
- 36:55
Um, just really quick, I'll, I'll highlight some of these things here. Um, this is what it starts to look like when you instrument your, uh, your application with those different, um, wrappers or those different trace functions.
- 37:08
Um, I'm able to understand at a very granular level, excuse me, granular level, the things that it's doing, right? So I essentially have these tool calls where it's going out and it's grabbing the commits from GitHub.
- 37:18
It's understanding what the latest release is, and it's fetching the commits from that latest release, and now I can generate that change log. But again, the, the really unique thing here, and maybe a, a different example of this,
- 37:30
is I can start to score those individual things that are happening. So this is a different, uh, application with a, uh... Nope.
- 37:39
With this example. So if I open this up, I have these, uh, this conversational analytics application. So a user can ask a question, it can, uh, return back some data.
- 37:49
But this application goes through these various steps. Like, the first step is to rephrase the question that the user asked. So imagine, like, there's this chat history that we can load in as input, and the LLM needs to rephrase that user question.
- 38:01
If the LLM does a really bad job of rephrasing this question, everything as a result of this will fall down. Probably not gonna get a right, a right answer.
- 38:09
So what I can do is create a scorer specifically for that span to understand how well the LLM did in rephrasing that question. Can also understand the intent that I was able to derive or the LLM was able to derive from that question.
- 38:23
Is that right? But you start to think of, like, these- these more complex type of applications that you build, you need to be able to understand the individual steps that are happening, and Braintrust allows for that very, very easily via these scorers, and then being able to apply them not only again while you're in offline eval kind
- 38:38
of mode, but also online, right? We wanna, uh, understand these logs and be able to apply these scores at the individual span level. This becomes pretty powerful as well.
- 38:51
Um, I think I actually stole from my, my next section,
- 38:55
my human-in-the-loop. Kind of walked through this, uh, a little bit. Um, maybe just another, a call-out. If, if you happen to be at one of our workshops on Tuesday, um, Sarah from Notion, uh, who's a, a Braintrust customer, talked a little bit about how they think about human-in-the-loop.
- 39:10
And I think it's, it's important to consider, like, the, the size of her organization, a-and what they're doing. Um,
- 39:17
she mentioned that, like, she has a special type of role that they use for human-in-the-loop type of interaction, right? There is-- It's almost like a product manager mixed with an LLM specialist.
- 39:28
Uh, they're the people that are going through and doing those human reviews. Smaller organizations, she ma-- she, uh, made a comment that was-- it actually makes a lot of sense for the engineers, some engineers to actually go through and do this as well.
- 39:39
Becomes really powerful to pair, like, the automation with the human component of this. Like, this is not gonna go away. I think it, it, it adds value to the process.
- 39:50
Um, again, I think I just stole from myself, like, why, why this matters, right? This is really critical for the, the quality and the reliability of your application. Uh, it provides that, that ground truth for, for what you're, for what you're doing.
- 40:05
Two types of human-in-the-loop, uh, interactions here. I, I walked you through that human review. Um, give me one second. I'll, and I'll call you. Yeah. Uh, the, the two, the-- Excuse me.
- 40:15
The two types, the human review, uh, being able to, like, create that, that, uh, interface within Braintrust that allows that user to kind of parse through the logs in a really easy manner, as well as configuring scorers that allow them to add the, the relevant scores to that particular log.
- 40:29
And then the user feedback. This is actually coming from our users in the application. Again, being able to create sort of, uh, views on top of that feedback that then power, uh, maybe the human review and then creates that flywheel effect, uh, that we, that we, that we want.
- 40:43
That's all I have today. Uh, appreciate you all coming out here and, and listening to me. But yeah, you had a question. [applause]
- 40:50
Thanks.
- 40:52
Looking at the, the human-in-the-loop, uh, aspect, uh, user feedback as well as human eval component, how are you handling the, the feedback that you get from your customers or even internally when it comes to taking that log data and identifying or, or extracting the intent and using that to modify the models or the different models or the
- 41:15
actual model performance?
- 41:16
Yeah. The, the question is around, like, how are we using, uh, human review in, like, some of the logs and informing the, the offline eval portion of this. Largely that?
- 41:26
Cool. Uh, yeah, one thing I maybe I didn't highlight here is, so maybe back within Braintrust.
- 41:33
I'm gonna go back to my initial project.
- 41:39
So imagine now, like, we have, we have all of these logs. We've filtered it down to a particular-- Oh.
- 41:48
Are we still showing on the screen?
- 41:59
There you go.
- 42:00
Awesome. Thank you. Um, yeah. So imagine, like, we, we have this, uh, this, this process now, right? Where we're, we're doing that human review. We filtered it down to the records that, uh, are meaningful for whatever reason.
- 42:11
It becomes really easy again to connect what's happening within production. So I-- maybe I select all of these rows, or I select individual rows, but I can add these back to the dataset that we're using within those offline evals.
- 42:22
I, I think I've said this, like, a hundred times, uh, over this conference, this flywheel effect. This is, like, I think what's missing oftentimes when we're building these, these AI applications and what Braintrust allows for really seamlessly.
- 42:35
Yeah.
- 42:35
Uh, [clears throat] I have two questions. Uh, the first one is about production. Uh, is it possible to have multiple models in production and compare how they behave?
- 42:47
Yeah. I, I don't see why not. Like, my, my guess is in the underlying application, you're swapping them out.
- 42:53
Like, uh, having like A/B tests, you know. I can have like two or three or four and easily compare.
- 42:59
Absolutely. Yeah. Um, let's see if I have an example here
- 43:04
You're able to, to group some of these scores. Uh, maybe this is sort of an example of, of what you're talking about. So like maybe within production we have different models running.
- 43:12
Uh, this, this sort of view here allows us to understand like the, the models that we're using under the hood. Uh, and this is just, you know, you could do this within production as well and sort of do that AB testing.
- 43:24
Cool. Uh, my, my second question is about humans in the loop.
- 43:28
Mm-hmm.
- 43:28
Right? Um, le- let's suppose that I have multiple humans and, um, they behave, uh, slightly different as a scorer, as scorers. Do you have anything or what, what is the vision to do with that?
- 43:44
Like, is there a way that I can actually compare how they're scoring or something like that, or not really?
- 43:51
So different users can maybe have different sort of criteria for scoring. Maybe, yeah, the, the first thing I would say to that is like there, there should be like maybe a rubric for your users who are interacting with human review, so you're not creating that.
- 44:04
Uh, you certainly have the ability to see like who is scoring different things within the platform. Um, I'm not sure if you're able to pull that as like a data set to like assess the differences there, but maybe like before it gets to that place, like have a rubric, have a guideline of, of what scoring looks like
- 44:20
for your humans.
- 44:22
Okay.
- 44:22
Yeah.
- 44:22
Thank you.
- 44:23
Yeah, of course.
- 44:27
Hi. Um, so the scorers I'm used to working with for like LLM-as-a-judge-
- 44:31
Mm-hmm
- 44:32
... are like, they're relativistic, right? So they can't tell you is the answer relevancy good or bad for a single run, but it can tell you how it care, compares to previous iteration of like the same test set, for example.
- 44:50
Um, do you guys use LLM-as-a-judge scorers for online, or-
- 44:56
Yeah
- 44:56
... is... And like, how, uh, are, are they relativistic like that, or do you have some way to be like, "This is a good answer, you know, in and of itself for this sample," or, because it's all, you have new data coming in, right?
- 45:12
Yeah. I think a lot of our customers who are, are thinking about this are, are like almost doing evals on their evals, like trying to understand did the LLM-as-a-judge actually do a good job there.
- 45:21
So like when that actually runs, there's a rationale behind it, and so you can sort of run an eval of those LLMs as a judge. Uh, I think Sarah from Notion in our workshop described sort of a process like that within Notion, but I think that's, that's sort of like where I would aim you.
- 45:37
Okay.
- 45:38
Yeah.
- 45:38
Cool. Thanks.
- 45:39
Cool. Awesome.
- 45:43
Okay. Are any of your customers doing evals before they launch? Like, I'm working with a government. [laughs]
- 45:55
They don't wanna launch until we show some accuracy levels.
- 46:01
Yeah.
- 46:01
So we're getting our subject matter experts to enter in all the questions that they have-
- 46:07
Mm-hmm
- 46:07
... right? And they have huge data sets of thousands of questions-
- 46:11
Sure
- 46:11
... believe me, as a government. Um, and then we're using measures like you're talking about.
- 46:21
I- do you have a way to do that? Like, I guess it, I guess it's the same, is it?
- 46:28
So what you're describing is what we call offline evals, right? This is development.
- 46:33
Right.
- 46:34
Um, we can actually do this testing before we get into production. This is what I was talking about, like establish that baseline-
- 46:42
Right
- 46:42
... using those scores, using that, that data set that you've already, um, created, but this all happens before we get into production, right? And then you can, like one of the things that I heard from, from somebody earlier is like, one of my challenging things of building this AI application is, uh, establishing trust or creating that trust
- 47:01
in this thing.
- 47:03
Yes.
- 47:03
That's part of what this is, right? It's like, it's showing the, showing, uh, those people the scores of that application. So you start to iterate on this thing. Maybe it starts at 20%, then it goes to 30, then to 40, and so on.
- 47:15
That, to me, is the thing that you use to create that trust and, uh, create that like groundswell to push it into production.
- 47:21
Okay. Yeah. That's what it... That is what we're trying to do.
- 47:23
Yeah.
- 47:23
So, but I wondered if, I can see the tool does that. Thank you.
- 47:27
Yeah, of course. Yeah. Time for one more.
- 47:31
Okay. Thanks. Um, quick question. I love the CI/CD po- components. Um, we're trying to build a lot of, um, we're trying to build like ML as a, as a platform for our team, um, so we can get into evals and stuff like that.
- 47:43
So how much of, how much of the monitoring dashboard you have in Braintrust can actually be like take the data taken out and post it in a unified dashboard somewhere else?
- 47:53
Yeah. All of this is available via SDK. Right? You can pull down experiments, you can pull down data sets. Uh, so you're able to, you know, pull this down.
- 48:02
Like we have, we have a customer that is actually building their own UI on top of like the, the SDK itself. Like, so they built their own sort of like components utilizing the SDK and pulling the, the sort of things that we've logged, the experiments that we have in the application into, into their own UI.
- 48:19
So certainly possible.
- 48:20
Awesome. Oh, great.
- 48:20
Yeah.
- 48:21
Thanks.
- 48:21
All right, cool. Thanks, everybody. [audience applauds] [upbeat music]