How to Write Your First AI Eval - SallyAnn DeLucia, Arize AI https://www.youtube.com/watch?v=gv4w23xYj-0 AI Engineer · 35 min · 418 sentences · sentence-level transcript from YouTube's caption track; each line begins at the time shown [00:01] [music] [00:12] Um, before we get started, I just wanted to introduce myself. [00:15] I'm Sally Ann, and I'm head of product at Arize. [00:18] Uh, been at Arize for like 4 years now. [00:20] Um, one of the first projects that I owned actually was building our AI agent Alex into our platform. [00:25] So, I've been dealing evals for a little while now, and uh, even building a lot of our evals product. [00:31] And so, I think the way that I think about evals is that they're our primary signal for our agents. [00:37] Um, and that includes all of our evals at Arize. [00:41] So, my goal today is you'll leave with three things. [00:44] Um, a clear definition of what an eval is and what it isn't. [00:48] Uh, being able to write your own criteria. [00:50] So, I'm hopefully going to be able to provide you with like a little bit of a recipe uh, for how you can think about evals and how you can apply that for any of your real agent scenarios. [01:00] And then we're actually going to build a working judge in Arize. [01:02] Um, and I'll show you a little bit about the life cycle there and how you can think about improving your evals over time. [01:09] So, this is a bit of our agenda. [01:11] So, again, I'm going to give you a little bit of context. [01:12] I don't want to spend too much time in slides, but I want to make sure everyone has a really solid foundation for what an eval is and how you should think about it. [01:20] Um, we're going to explore some data in Arize together, um, write our criteria, and then we'll actually go build our eval. [01:26] That's the main part of our workshop today. [01:28] Um, and then I'll give you a little bit of like where you could take this for what's next. [01:32] Um, I love it to kind of have some like working sessions so people can collaborate together. [01:36] I'll try to like walk around the room, help folks out. [01:39] Um, and then I will show kind of like a one-pager that's in Notion that you can kind of open and follow along as well. [01:47] So, just check the room a little bit. [01:48] Who here has either like shipped a chatbot or an agent, ever written an eval, or even just opened the Arize product today? [01:55] Anyone here? [01:57] All right, we got a a few folks here. [01:59] So, I think this is going to be great for folks who maybe haven't done any of this and even if you have, I think today should still be pretty helpful. [02:06] So, going to start off the context with like why I don't think vibe checks actually scale. [02:11] So, this is the vibes problem as I see it. [02:15] You know, you have Monday, you maybe change something to your prompt, you ship it. [02:18] It overall feels better. [02:20] You don't really have a way to know, but overall things are looking good. [02:24] You know, Tuesday ship it, a week later now that use case that you shipped a fix for is broken. [02:29] And then next week, as the problem continues to get worse and worse, there's no way for anybody to prove whether something was fixed or that it's actually failing. [02:37] have vibes to go off of. [02:41] What you can't do without evals is you can't detect regressions when you change a prompt. [02:46] You can't objectively compare prompt or even different model versions. [02:52] You don't know if a new model is any better for your use case and you can't actually put any official quality gates into CI as you're shipping your agent. [03:00] So, without evals it's you can imagine it's it's pretty hard to actually know how your agent is performing. [03:08] A question I commonly get is is an eval just a unit test? [03:13] I think that there's a lot of comparison of AI evals to like kind of traditional software tests and I do think that they're a little bit different. [03:21] Cuz first off, with a test you kind of just have like one input and there's one correct output. [03:26] You can also read all of the logic in the code. [03:29] With an AI agent, you actually cannot read any of that logic. [03:33] That actually comes out after in the form of traces. [03:36] And so, you kind of need to have this AI eval where you can look at like the day-by-day itinerary in this travel planner example I have here, the budget breakdown or [03:46] multiple criteria basically. [03:48] So, there's these many valid outputs that you just can't have, you know, a more traditional unit test on like you can with software. [03:56] So, basically how I like to think about this is traces are the logs for AI Um, evals are actual tests. [04:03] And I always say that uh uh I used to have a meme, I didn't include it today, but the hard pill is you kind of need traces, you need observability [04:10] to actually do your evals. [04:13] So, this is an example here for why agents make this harder. [04:17] So, this is just a sample example of what like a trace could look like. [04:21] And for anybody in the room who's maybe not familiar with what a trace is, um essentially it is all of the steps that an AI agent took to be able to get an answer back to a response. [04:31] So, a user says something and then what I'm showing here in all of those spans is all the individual steps the agent took uh to get that answer. [04:37] So, in this example, there's like a research agent that's going to go perform some research, uh maybe even do like some tool calls there. [04:45] You have, you know, your local agent that's maybe retrieving something from a knowledge base. [04:48] So, lots of back and forth are happening. [04:51] And this is where I mean you can see the logic of your agent. [04:54] Um, and we're going to explore some traces in the Arize UI just a little bit. [04:58] Um, so you can see there's lots of LM calls, lots of things composed together. [05:03] And so, you can imagine just having one single unit test like in software not really going to accurately capture all the complexity that's in an agent and be able to tell us how it's performing. [05:15] There's actually lots of different types of evals. [05:17] Today, we're going to focus on LM as a judge. [05:20] Um, LM as a judge is where we take a secondary LLM and we ask it to grade some aspect of our agent. [05:26] Um, and so, there can be things like QA, summarization, relevance, and then you get a label and an explanation out of that. [05:34] Explanations are really helpful. [05:35] Explanations are kind of like the the reasoning or the thinking behind providing a label. [05:39] It gives you a little bit of understanding and not just have to take a label at face value. [05:43] But, there's lots of different types of evals. [05:46] I want to call out decision models. [05:48] Uh this is something that's pretty new. [05:50] Uh if anybody kind of took or was a part of the the Jevas a Job storm that happened about 2 weeks ago and OpenAI just last week released their decision model API. [05:59] So, I think decision models are going to be a huge part of evals in the future. [06:03] Um, those are pretty cheap and fast and it's uh more like a question answer and you just get like a probability and an output whether it's like a true or false or a label. [06:11] So, you don't get that explanation that you get with Elements of AI Judge. [06:15] The other type of eval is code. [06:17] Uh, these are really great for any deterministic tests. [06:20] So, maybe you have some eval criteria that's like checking if a word is in an output or making sure that something's in JSON. [06:29] Uh, that's going to be really great for code-based evals. [06:32] There's also things like Rouge and Blue scores that are popular code evals. [06:36] Um, annotations I do see as a form of evaluation. [06:39] This is where we're having uh you know, golden truths on golden datasets. [06:43] Um, sometimes they're synthetic as well. [06:45] Um, agent as a judge is a newer type of eval that we've seen maybe over the last 6 months. [06:51] Um, that's where we're going to take a full agent and evaluate something in a different agent. [06:55] I think this is really good for super complex um like success criteria. [07:00] Um, then we have user feedback and business metrics and those three at the end are going to be more for your production use cases. [07:05] But, you'll notice the first four are something that you want to use across your life cycle in development and production. [07:12] Um, and that's pretty important because you want this to be able to evolve with your use case and you don't want to like put a lot of investment in something you're using in development and just throw it away. [07:20] Those evals can grow with you over time and it gives you that consistent um performance. [07:29] All right, let's go ahead and look a little bit at the data. [07:32] Um, so we're going to pause here on this slide give everyone a few minutes to go and get started. [07:37] That QR code is going to be for the one-pager which has all of the instructions for our workshop today. [07:44] Um, but I want everyone here to go ahead to go to you know, app.arise.com. [07:48] Uh, we want to log into AX. [07:50] So, if you don't have an account um encourage you to make a free um account today. [07:55] Um, and then I'll go over the steps from there in just a second. [07:59] Um, and for anybody who already I guess might have an arise account, the next step is going to be getting an API key from um a model provider. [08:05] So, I'll pause there uh walk around make sure nobody has any issues logging into the platform. [08:11] The question was, can you do you have to use like can you use a custom endpoint? [08:14] Do you have to use a a common provider for step two? [08:18] No, feel free to set up whatever LLM provider you want. [08:21] We'll just want something that we can make LLM calls to so we can test our eval out. [08:25] But yeah, step two basically go to your Anthropic console, your OpenAI console, whatever provider of your choosing. [08:32] You can find your AI providers under settings in the product and we're just going to want to go ahead and add that API key in. [08:39] So, let me go to my laptop here and show you all a little bit of how to do this. [08:46] So, settings here in the nav. [08:49] You're going to go click into that and then under your account settings, let me try to Cool. [08:58] You're going to come to AI providers. [09:02] And you can see here we have a whole bunch of different providers. [09:04] So, just choose one that is your favorite to use, Anthropic, OpenAI, Gemini, doesn't matter. [09:09] Just something that we can use to make API calls with. [09:20] And I encourage you to use the test integration button when you're doing that just so we can make sure we have a working API key. [09:28] Yeah, for for folks you'll find the demo project. [09:30] Sorry, I'll go back. [09:31] Just trying to make sure everyone has time to to catch up, but you can access the demo project that we're going to use in one of two ways. [09:40] The first is on from this when you go to this tracing page here, you'll see see demo project. [09:47] I have the LLM agent. [09:48] I know some folks might have our older demo model there. [09:51] Does not matter which one you have, you should be able to do our exercise today. [09:54] So, we just want to be able to look at some traces. [09:58] And you know, you can expand the time if you want to see a little bit more data there, but give everyone a few more minutes cuz I only saw [10:07] a handful of hands that got the AI provider. [10:10] and to see what I can do to see if I can get one that we can share really quickly, too. [10:16] All right, so if you have that travel agent demo project opened, this is a travel planning agent. [10:22] It takes a request from a user and then can it make follow-up questions, call tools, and basically returns a plan. [10:31] What I think good looks like in product terms is it answers the follow-up questions the user asked for and respects the trip's days and budget. [10:38] So, this is generally what a user request looks like. [10:40] You can see the destination, how long they want to go, what their budget is, and what their kind of general travel style looks like. [10:48] And that's an example of what we might see from a user who goes to this travel agent. [10:52] So, I'd love for everyone to take a a few minutes. [10:55] We want to look at the traces. [10:57] We kind of want to just take inventory. [10:59] What are users asking for? [11:00] What did the agent tool do? [11:02] What tools, what are the answers? [11:05] And then just kind of make note, was this an answer that you would share? [11:07] So, just want to kind of explore the data and get familiar with it. [11:15] As yeah, open one or two traces and maybe start thinking a little bit about what you'd want to measure as you're you're looking through the data here. [11:23] So, as an example, let me hop on over to the product. [11:27] I explained mine to last day. [11:29] Let's go ahead and take a look at one of these traces. [11:31] So, you can see here, this destination is for Prague, Czech Republic, for 3 days, $800 budget. [11:40] The user asked for an option that feels more local, less touristy. [11:45] We have some kind of our ideas here and then we can start to view the plan that the the trip planning agent created. [11:52] So, you have a detailed day one, day two, day three. [11:57] And if you want to see any additional, you know, attributes, any additional data that we have, you can see that in attributes. [12:03] And so, a little bit of how to navigate our product here. [12:08] So, again, this is the trace tree. [12:10] This is every individual step. [12:12] If you want to see the data that was passed in for a step, like for example, we want to see the data that went into OpenAI to process our request, [12:20] we can switch to that span and then look at the input and output. [12:24] So, we're going to get to this in a little while, but we want to pay attention to where the data lives and what data we think might be needed to do any of our evals. [12:33] So, we'll spend a few minutes here just exploring and seeing what kind of insights we find. [12:40] Getting some questions about where to find the actual data here, so let me just show that one more time. [12:47] A lot of times in the new spaces it can be a little hidden, but didn't want folks to spend too much time tracing today when we're here to talk about evals. [12:54] So, you'll just want to click the traces option on the nav here. [12:59] This will kind of prompt you to get started with the rise, but we're just going to go to see demo project and then you can see it in recently viewed from there. [13:08] And you can always expand the time to see a little bit more data there. [13:13] Has everyone generally had time to like find the project, take a a quick look? [13:20] See if you had nods, we'll give I know. [13:25] Like fix that. [13:29] All right. [13:29] So, basically what I want folks to do now before we get into the the next part of of this, is just like look at the agent and think about how you would measure this agent [13:41] or success for this agent. [13:42] Think of yourself as the product person, engineer, any real stakeholder of this project and look at the traces, look at how users are interacting with it, how it's responding, [13:52] and start making kind of like mental note of what the things are that you would measure. [13:57] In the next part of the workshop, we're actually going to start defining what that criteria would be, but high-level as you're going through, think about some of those things that you would measure. [14:06] Yes, so the question was like how we should think about reading a a trace here. [14:09] So, again for for anyone who may be just not familiar, a trace is essentially a collection of all the steps an agent took to answer a user's question. [14:19] So, let's go ahead and open this one here. [14:21] So, at the top we call that our root span. [14:25] Like the technical definition of that is parent ID equals null. [14:28] This means that this span here doesn't have anything ahead of it. [14:31] It just sits at the top. [14:33] And this is usually where the input and final output live. [14:37] And then from there we have our individual spans. [14:39] So, each of these is what we call a span. [14:42] I like to think of it as a unit of work. [14:44] So, let's take a look at this first collection of spans here. [14:48] So, from the root span the first thing that this agent did along with calling some other agents it looks like called the research agent. [14:56] So, this is a what we call a multi-agent system where there's multiple agents doing different tasks on behalf of the bigger agent. [15:04] So, in this first one we have the research agent and that is going to go ahead and call a tool. [15:09] So, each of these has like a type you can see it different icons. [15:13] This is an agent span. [15:14] This is a tool span. [15:16] Tool span that's going to be for getting external data. [15:19] So, you can imagine like in this one research there's some essential info that we have to grab like things like weather or sites or adequate things like that. [15:29] And then from there we're going to use an LLM. [15:33] You can see here all of the inputs and outputs that actually went into the LLM. [15:37] So, this is your concise travel agent. [15:41] And this is using that information from that tool to actually summarize that we can use it in a later step here. [15:48] And so you can just go down the trace tree just like that like one step at a time. [15:52] You can see how they all connect but each of these is going to be doing a step or unit of work so that it can go ahead and answer. [16:01] So, again the goal of this application is to look at a user's request for a trip and plan it for them. [16:08] Give them an itinerary of things that they can do, places they can stay all in accordance with their kind of preferences. [16:15] And so each of these spans is the units that were done to ultimately get this final kind of itinerary. [16:23] Any questions on that? [16:24] Happy to answer some questions about tracing while we're we're going through this. [16:28] Yeah, so the question is is like there's two LLM spans. [16:32] Yeah, so sometimes it's I'll go back and look at the exact trace of what happened there. [16:36] Sometimes it's instrumentation of showing the the different like the LLM like choosing the tool to use and then actually like passing that information to the tool. [16:46] So let's go ahead and take a look at what happened here. [16:54] And some of this is just kind of part of instrumentation here. [16:58] So this looks like here this way and I think the first LLM call chose the tool and then I think in this second LLM call that's where the actual data of the tool was passed to the LLM to summarize. [17:12] So here it's kind of hard sometimes you have to go down the trace to come back up. [17:17] So this LLM span chose this tool and then this LLM span summarized the output of the tool. [17:23] So that tool went and grabbed that like temperature data, destination data and then the second LLM basically summarized it so that we can do kind of further work with it. [17:34] Yeah, great question. [17:34] So the question for for everyone in case they couldn't hear it is is that kind of root node making all of the decisions or is there some flexibility with how that works? [17:42] And there's a lot of flexibility. [17:43] It comes down to what your agent kind of infrastructure is. [17:46] So you can have what's known as kind of like a supervisor or an orchestrating agent and a lot of times that will make a plan for the sub agents to follow [17:56] and then sometimes it's just passed kind of to an LLM with a set of tools and each step is goes like one by one. [18:02] So depends a little bit about like what framework you're using, what your infra looks like and the general architecture of your agent. [18:09] In this case here this is a link graph agent I believe. [18:12] So we're not doing any like supervisor architecture really. [18:14] Just we have a a few like modular agents that are responsible for different tasks. [18:20] Great question. [18:20] The question was like what strategic frameworks we support with arise. [18:24] We're agnostic to frameworks. [18:25] We have a bunch of what we call auto instrumenters available through our tracing package open inference. [18:33] We don't have a preference of which framework we want to use. [18:35] Our goal is to be really flexible and provide you with really good observability and evals on top of it. [18:40] So I can link our docs where you can see all the different frameworks that are supported. [18:49] Okay. [18:50] Let's keep going a little bit here. [18:53] Sounds like everyone had some time to take a look at the traces, get themselves familiar with the data here and hopefully was able to spot some things that they would measure [19:02] for the success. [19:03] So the first step of defining what your eval is is defining what good means. [19:10] This is sometimes tricky for folks to do. [19:12] So I've kind of have this little trick here for vague versus concrete criteria. [19:19] I generally like to just write down what good means but with really specific criteria. [19:26] So instead of just being like helpful, accurate, good response, you want to get a little bit more specific. [19:32] So answer that follows the user's follow-ups, matches the requested number of days, keeps totals within the stated budget. [19:39] For this application those are all really concrete criteria for what success looks like. [19:45] And I encourage you you know if you're ever building this for your application, you know, sit down and and kind of think about what that criteria is. [19:53] Another helpful hint that I have is judge one quality per eval. [19:58] There's some exceptions to this. [20:00] I like to point out that for especially the decision models and agent as a judge, you can really get away with you know doing multiple criteria in one. [20:08] But for LM as a judge, there's lots of research that shows that it really only does well with handling one criteria at a time. [20:15] So I think it's good practice to just think of one of them and then add more evals over time. [20:21] Building evals sets iterative thing. [20:23] You don't just build your evals and then like set it and forget and you're set for the life of the application. [20:27] You kind of have to iterate and so um you know, when we're defining like what success looks like, I usually write down a handful um and then kind of start to build those and then over time [20:37] we can add more and more. [20:39] Um I mentioned I worked on Alex, our AI agent um that lives in Arize and when I first built evals, I had a very simple set. [20:46] It was like QA correctness. [20:49] I think I had some like user frustration, and of course like jailbreak toxicity, those types of safety evals. [20:56] Um and now we have 32 evals that run um on Alex. [20:59] So you can see how you want to start with something small um and then as your application gets usage, you can ground that in real production data and then evolve your evals to see what else you might need to define success. [21:11] I see some questions over there. [21:13] Yeah, so the question for the the group is is a generic eval better than a more specific one? [21:19] I think it really depends. [21:20] I think generally speaking, I say building a specific eval for your use case is better. [21:24] But what I would say is an eval is better than no eval at all. [21:27] So a lot of folks like at Arize, for example, when they're getting started, we have an eval hub with a bunch of out-of-the-box templates in it and they're really great for starting. [21:35] We have things like QA correctness, hallucination, uh session coherence, all sorts of different evals and I think they're great for getting started, but the the key is and we'll go through this a little bit today, [21:45] is to kind of align that to your use case um and then create more specific ones over time. [21:50] So I think basic ones and reusing them, especially across an org, are great because it's better to have some evals, but then just make them more specific. [22:02] All right, so start with one, add more evals later. [22:05] Um I think in pairs or whoever the group of around you, um I would like to kind of have y'all jot down some ideas. [22:12] Um basically, there is six things we want to write down. [22:15] This is going to be really helpful for us actually building our eval. [22:19] Um so first, it's going to be the task. [22:21] Like what do you want this eval uh to be going off of, uh what success looks like, what failure looks like, um, what they're judging, like what the evals are actually supposed to judge here in this evaluation, [22:35] and then, you know, basically three bullets on what pass would look like, um, and what fail looks like. [22:41] And remember from this slide over here, the more specific and concrete you can be, the better your eval will be. [22:46] So, we're going to use all of this, uh, all these notes that you're writing to actually build our eval in the next step. [22:51] So, the more specific we can be, um, the better. [22:55] And so, yeah, I think it's a great opportunity to kind of chat with folks around you, see what you're thinking, what they noticed in the traces, and I'll walk around and let me know if you have any questions. [23:04] I got a question over here that was like, um, the the way that the data looks on the trace for this application is pretty specific. [23:11] It has all like the request info. [23:13] Um, and the question was like, does that come out of the box, or do I have to like build that specific to my use case, right? [23:18] That was the just guy, make sure. [23:20] Um, and the question is is with our out-of-the-box instrumentation, we kind of abstract kind of all of the tracing best practices for you. [23:27] So, there's a lot of common attributes that we send in. [23:29] So, things like input down value, or the input messages that we send to the LLM, that's pretty standard, but what you can do is called, um, you know, manual instrumentation or hybrid, which allows you to customize. [23:39] So, uh, tracing is really flexible. [23:41] We want to make sure it's tailored and you get the information you need for your use case, but we try to make it easy at the same time. [23:47] Um, and if you have, um, you know, your own applications that you want to trace, on that kind of starter page was our like MPX evals, that call brings in all of our skills, [23:56] uh, which is the best way to do tracing these days. [23:58] Let your agent figure out how to instrument it, and you can kind of nudge it along. [24:01] So, highly recommend that if you're going to send in your own traces, uh, to evaluate later. [24:07] All right. [24:07] I'm just going to click to the next slide to show you an example of what this could look like, and then I know there were some questions over here [24:12] that I'm going to come to. [24:15] So, just going to show an example, um, here of like what your criteria you generally want it to look like. [24:22] Um, so, this is like the task that we want to judge. [24:24] User sends a follow-up about their trip. [24:27] Uh, the success is answers the follow-up directly using the trip's details. [24:31] Failures is falls back to a generic budget. [24:33] And you can see here, this is the pass and fail. [24:36] Some folks asked me like why we want to have the bullets and why the one-liner's not enough and uh, the reason for that is basically we're going to use this to write um, our LLM prompt to do our LLM as a judge. [24:47] So we want to be really specific so the LLM um, can understand. [24:51] The way that I like to think about this is describing to like a coworker or, you know, a stakeholder like what success looks like. [24:58] You almost want to treat this criteria uh, creation the same. [25:01] So I'm going to answer a few more questions and then we're going to move on to the next step. [25:05] Uh, for folks who want to get a little bit ahead of that, um, you can this is just describing make sure that um, if you have too much in your criteria, you can cut it back, but [25:16] I think for the sake of time I'm going to move here. [25:18] Um, we want to go ahead and start building our eval. [25:22] The first step is you're going to want to go to those traces. [25:24] Let me go there now and you're going to want to select a few um, traces to actually add to your data set. [25:34] Um, so for example, say you wanted to just go ahead and evaluate the input versus the itinerary. [25:40] Like does the itinerary have the general input? [25:43] You would want to save all of these root spans to a data set. [25:47] Um, if you've decided you wanted to maybe test the tool call and see if the tool call returns um, the right information that it was supposed to, you would want to add in all of these [25:57] tools uh, calls to your data set. [25:59] Um, we have filters here. [26:00] It's the best way to identify data. [26:03] Um, so one really great example, if it's like root spans, you could do just parent ID equals null or go off of the default traces. [26:10] Um, and if you wanted to do like a tool call for example that um, I think it was the essential tool, you could also filter by name that way. [26:18] Um, and then you would just want to grab these or go from the span view to, you know, select those and add to a new data set. [26:27] So um, that's kind of the the next step and then we're going to head on over um, to our playground to actually build and test our eval. [26:34] So, folks can head over there while I answer some questions. [26:39] And let me know if there any that come up for adding to the data set and how you should think about filtering. [26:44] I want to show some folks kind of the next steps here for time cuz I know we don't have that much left here. [26:52] So, everybody hopefully has been able to go through, write their criteria, identify some spans for what they're building. [27:02] And then this is essentially kind of the first pass is what you probably saw, which I'm going to do now live for everyone to kind of follow along with. [27:11] But we wanted to filter the spans you're judging. [27:13] That's what we just walked through. [27:14] So, look through the traces, identify what span you need to evaluate, build your filter, add those to a data set. [27:22] And now what we're going to do is go into our prompt playground. [27:25] That's my favorite place to go to actually test out our prompts here. [27:29] So, you can go to the playground. [27:31] I already have one set up, but I'm going to go ahead and create a new one. [27:34] We have two types of playgrounds in our product. [27:38] We're going to use the prompt playground. [27:40] That's great for testing eval prompts or you know any LLM prompts for your agent. [27:45] We do also have an agent playground. [27:47] That's for testing kind of your agent end to end here. [27:49] So, not so relevant for today. [27:52] So, just give it a name. [27:54] I'm going to do AI engine evals. [27:59] And then we can go ahead and create it. [28:00] So, if you were in our eval hub, you were over here and you created an eval, you kind of have a slide over that looks like this. [28:10] You can go ahead in the playground, just add that from the drop down here. [28:15] So, you'll see your eval pop up here. [28:18] For anybody who's just starting the eval process, we're just going to do blank eval. [28:22] And you can actually just start writing your template here. [28:25] So, what you're going to basically do is take all that criteria and turn that into a prompt. [28:30] A lot of it should be like paste. [28:31] You can paste in those like bullets that you had as criteria, but um um a lot of times you want to first give it kind of an intro, like you aren't eval agent [28:42] or an eval LLM uh looking at the output accuracy for your application. [28:48] Let me actually just load this one in. [28:52] Okay, perfect. [28:53] Um so, I like to start my evals with an example of what the LLM is supposed to do. [28:59] I I always kind of center it in its job. [29:01] You're evaluating whether an assistant's output actually accurately captures the details requested um or input in the or provided in the input. [29:10] Um you then want to provide the data. [29:12] So, this is really important. [29:14] When we're looking at those traces, there's probably uh attributes that you want to identify. [29:21] You don't really need to worry about writing the specific names in your eval prompt. [29:24] We do something called variable mapping um that allows you to connect it to your exact data. [29:29] Uh the benefit of that is that your evals can be flexible. [29:31] Like, if you've running on a data set calls it one thing, and then your traces call it something different, rather than you need to update every eval, you can just update the task where it's being used. [29:40] So, don't worry too much about the name of the variable. [29:44] Um and then this is an example of what I have written for mine. [29:48] Um these are the check-in particulars. [29:50] Those are things like those three bullet points for pass and fail. [29:55] Um and then here I have mark only correct if, you know, the output is consistent with the input, incorrect if there's a wrong destination, property type, whatever it is, that's going to be incorrect. [30:06] Um and under params here, you'll see if you set it up in the task, that's where we have the labels. [30:11] This one here is just correct or incorrect, but you can have, you know, a multi-label problem. [30:16] Maybe you do correct, incorrect, partially correct. [30:19] I have use cases in Alex where it's actually relevant to me to know when something is somewhat correct, but not fully. [30:25] Um you can also do things like not applicable. [30:28] Um so, lots of flexibility. [30:29] The eval will return only one label, um and then you have some things here around the optimization direction, which says like is good or is correct the good thing or [30:42] is a lower score a good thing and then explanations. [30:45] Again, those are kind of the reasoning for why the template or by the eval gave a certain response. [30:53] And then what you're going to want to do is load in your data set. [30:57] So those spans that you created and saved your data set, you can load them in. [31:01] And now what we're in the spot to do is actually start testing our eval. [31:04] We have all those inputs and outputs that are here. [31:08] If you need to map them to different variables, mine happen to be the same, but you can do that here. [31:14] And so now what you can do is actually start to run. [31:17] I'm going to run with 41 mini, that seems good to me. [31:21] And we'll actually start to see the output of our eval right here in the playground. [31:25] And this is a great spot to just start iterating on your eval template. [31:30] Look at the response, you know, kind of see if there's something that you agree with or disagree and then you can adjust the prompt and then continue to run it over time. [31:39] So that's going to be what we do for the next little bit here is try to get to a template in a good spot. [31:45] And then what you can do is save that off here in this little button here, save evaluator, and then that will be available to use across the platform for either our demo project [31:56] or for any application that you build and bring into our eyes after. [31:59] So I'm going to walk around, help some folks write their templates and then I have just, you know, one or two slides here to to close us out. [32:08] I did want to kind of point out that we do have some tools to help you. [32:12] I had everybody write out their criteria and write their eval and test it, but we do have Alex in the platform that can help you with that. [32:18] So I definitely recommend helping or having Alex help you, especially after you've done kind of your initial eval pass. [32:25] It can actually run the playground for you, look at the results, update the prompt and repeat. [32:30] So that's really helpful for when you're writing evals. [32:33] Um pulling out a little bit of the the remainder of the loop here. [32:38] So we spent a lot of time on the second loop our second step today, um where you instrument, you write your eval, um but then what the rest of the loop looks like is we have things like signal. [32:48] That's our managed agent in the platform that is able to look at your traces, find issues for you, even make fixes. [32:55] Um so this becomes signal that our managed agents can then consume and ultimately help improve your application. [33:02] Um these are some things I think good teams do next, alignment. [33:06] Um alignment is going to be the process of like annotating all of those examples that we added to our data set, and then going to run that eval and seeing if [33:16] um it matches the human feedback. [33:18] Um online evals will be essentially us putting that into a task and have it running continuously over our traces. [33:24] So what that means in our eyes, every time you send in a trace, we'll evaluate it according to all your evals, and then that automatically gets posted, and then you can use that to actually monitor [33:34] your application. [33:36] Um a key everybody to walk away here with is that every stakeholder evaluates the agent. [33:41] This is not just one kind of role's job. [33:44] You really want to get everybody in the room who has some kind of stake in the agent and have them basically define what success looks like according to their outcomes. [33:52] So uh product, eng, support, um experts, um security, those are all folks. [33:58] And then um the key differences between like an metric and an eval is like a metric tells you that something might be broken, but evals tell you what the actual failure mode is. [34:08] So you really want to use both there. [34:11] Um and then I think what might be fun to try next is we do have all these new decision judges. [34:16] Um and so I think it's always interesting to take your elements as a judge, you know, convert it to a decision judge question, um and then maybe compare the performance there, uh see which one might be better. [34:25] Um and yeah. [34:28] And then again, start small, 20 traces maybe, one dimension, one judge, you know, read the explanations, iterate over it, and then you can expand to more and more evals. [34:39] Um and just some resources, we have some docs, um, evaluate your LLM as a judge, your judge docs. [34:44] Uh, we do have some deep dives on like the decision model benchmarking. [34:48] So, I think somebody had a question of like, when should I use LLM as a judge, when should I use judge? [34:53] I think that's a really great use uh, case and uh, yeah, I'll be hanging out for the rest of the day. [34:58] Arize has a booth in the expo starting at I believe 4:00 today. [35:01] So, if you want to learn more about evals, see a little bit more of our product, definitely come find us. [35:06] Um, and if there are any questions, um, happy to answer them and thanks so much for joining me today.