How to Know When an AI Agent Can Work Unsupervised — Evan Kormos, Coinbase
AI Engineer · 17 min · 142 sentences · from YouTube's caption track
Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.
- 00:12Hi everyone.
- 00:13My name is Evan Cormos.
- 00:15I've been delivering, designing, building software for 20 years.
- 00:19The last 15 in enterprise financial services.
- 00:23I am a player coach at Coinbase.
- 00:27And we're here today to talk about trusting agents in policy-driven workflows.
- 00:38So, let's start with the policy and it's pretty boring.
- 00:42Um, I'm going to go over here for my notes.
- 00:46So, our starting point center centers around the policy and this sets the rules for how work gets done within the organization and including especially risk and compliance.
- 01:00Think of policy as the original institutional intent or the original system prompt.
- 01:07So, ideally we have this written down.
- 01:09Um, it's a little bit boring, so stick with me.
- 01:13Um, using language like must, may, and should.
- 01:17And the again, these help define the rules and decisions about how the system operates in the organization.
- 01:25Separate from policy, we have the actual running system.
- 01:32So, the first thing we're going to do is separate these two uh these two both the build state and the run state in two different moments in time.
- 01:41So, typically we're either defining or chaining changing our policy but this the system is constantly running and it's constantly moving and changing.
- 01:53So, we could then sort of imagine a compilation event that Oops, sorry.
- 01:59I'm skipping ahead there.
- 02:01It's constantly changing.
- 02:03So, it's evolving quickly with these product-driven changes.
- 02:08So, everything is expected to still be roughly bound by the policy, but ultimately um we separate this from the run state and the build state.
- 02:20So, inside the system, what does it look like?
- 02:23We have a familiar model if we have any enterprise uh folks in the in the room here.
- 02:29Um people, process, and technology.
- 02:32But, where really do agents fit into this model?
- 02:37Um so, I see them as an operational model cutting across all three.
- 02:42They work with people, execute parts of the process themselves, and they use and are made up of technology.
- 02:52So, for our talk today, we're going to be focusing here where agents meet process.
- 02:59What work we give them, what boundaries we set, and how we build trust in their outputs.
- 03:11So, let's dive into your workflow.
- 03:15And it's high-level and seems basic, but if you haven't, there are good reasons to map this out.
- 03:23So, maybe a change has to be approved before it goes live, or a customer goes through has to go through verification before their account is opened.
- 03:33We expect work to flow in a specific and gated direction.
- 03:39So, I believe it makes it agents make it worth revisiting what we can do in parallel.
- 03:48So, previously some work used to cost too much or be too complex to coordinate in this way.
- 03:54But now we can run independent reviews alongside each other, bring the results together, but keep the required checks in place.
- 04:05So this is a directed acyclic graph or a DAG.
- 04:09It is a way to represent this workflow or process, the steps, the dependencies for a flow that moves forward without looping back on itself.
- 04:20Apache Airflow, if you're familiar, is an example of open source software that represents workflows, their dependencies as DAGs in Python code.
- 04:39So this Python code, this these DAGs can be used to define and manage a number of policy driven processes like, for example, commercial lending.
- 04:53We could also use a DAG to represent the workflow to list a token on the exchange in a specific region, if you're into that.
- 05:03Or we could use a DAG to represent a regulated flow of delivering software, which is a hot topic.
- 05:10And one we'll spend a little bit of time on, I think that we've seen a lot of adoption within agents, within software delivery, and ultimately we're looking to leverage that same
- 05:21efficiency and scale in other areas of the business and close that the the adoption gap.
- 05:31So let's stick with the software delivery example for a little bit.
- 05:37What happens inside one of these nodes of the process?
- 05:40And I'll give you a hint, it's a loop.
- 05:51I'm oversimplified, but we have a basic version of what's happening within the Let's Let's say this is a code review process, right?
- 06:00So, we're going to essentially do a number of steps and essentially once we realize the work we recognize that the work is good enough, we're going to allow it to pass on to the next step.
- 06:13And that's essentially the function of the code review node.
- 06:19The work doesn't always uh end up okay.
- 06:22So, sometimes we have to take the feedback from the code review and iterate on it um until the work is a good enough to pass.
- 06:36So, this is a representation of a directed cyclic graph or DCG.
- 06:42So, as far as open source software, uh something like LangChain LangGraph would be what I would um say is helpful to manage the state of DCGs.
- 06:56Um and this is an oversimpli- an oversimplification.
- 06:59These graphs can be very complex.
- 07:04So, zooming back out, the inner flow um of the node, we have people and agents working together.
- 07:11On the outer flow, we have a policy boundary.
- 07:16But not everything goes to plan.
- 07:19Um so, we have to handle exception flows.
- 07:21We don't want the work to get stuff stuck, and we don't want to design for every edge case, either.
- 07:27Um the exception flows will monitor and see kind of what happens if you're shipping code that gets canceled or doesn't meet security standards, that's something you would should want to know about.
- 07:42Volume shifts across the flow once we start to add agents into the mix and we've seen this with software delivery and we'll see it in other processes as we bring agents into those processes as well where now all of a sudden if you're
- 07:56reviewing code faster you need to design it quicker or you need to do the security scan that's faster.
- 08:03So we see the volume shift across the flow.
- 08:08And this is where it's really important that we have visibility into the process overall from a a metric standpoint because as we start to supercharge and and parallelize and add more efficiency to the process we start to develop more and more bottlenecks
- 08:23and so the operational visibility of the process is extremely important much more important than the authoring and the building of your workflow tool.
- 08:33Um so we want to visualize the process.
- 08:38So we want to add parallel capacity by still keeping the controls and so this is where we'll add more additional capacity.
- 08:51Okay.
- 08:52So we're doing some work we're checking it we're using the feedback again to refine it until the work is good enough to move on.
- 08:59But why is that hard?
- 09:01Oh it seems like a pretty easy thing to do.
- 09:03But as I mentioned before these graphs get actually pretty complex and we'll dive a little bit more into why this is difficult.
- 09:14And if you're familiar one challenge with AI engineering is the variability of inputs and outputs and I believe that higher quality inputs will result in better outputs at a lower compute cost.
- 09:31But what are quality inputs?
- 09:41So, we would generally speak to it as context model maybe.
- 09:46We can nitpick that, but this isn't our area of focus today.
- 09:50We're going to focus more on outputs.
- 09:52But, we can't really talk about quality of outputs without the quality of without talking about the quality of inputs.
- 10:01So, ideally we've established a trusted context for our agent.
- 10:05Um and there's some references on that, but one thing we can do in this model is inject the DAG state into our agent and let it know kind of where it fits into the bigger picture.
- 10:20Okay, so now we've added even long time horizon goals and that's emphasizes the need to optimize the cost and efficiency of this loop.
- 10:38So, the check is where we decide whether the work is good enough to move forward.
- 10:43We need to define what good looks like.
- 10:45That's the hard part.
- 10:47And we need to have a reliable way to evaluate it.
- 10:50Otherwise, more passes don't necessarily uh mean better results.
- 10:55The loop is really only as trustworthy as the check.
- 10:59So, if we want to talk about quality, let's talk about the check and let's talk about quality.
- 11:06Okay, um I think building with AI is an opportunity to improve product quality overall.
- 11:13I like some of the conversation about durable software.
- 11:16Um So, I'm a believer in quality and in traditional software um we we built confidence mechanisms in place uh to give us confidence that the software is of high quality.
- 11:32And that's done with a variety of uh mechanisms, but primarily systematically with test cases, unit tests, um checking these as a part of our delivery flow to ensure that when we make code changes, mistakes aren't made that break other things, right?
- 11:47So, this is a confidence mechanism that we've put in place with traditional software.
- 11:55The agents are probabilistic, and so the same request can produce different answers.
- 12:02More than one answer may be acceptable.
- 12:06And we still need evidence, but exact output uh comparisons alone really aren't good enough.
- 12:13Uh we need to build a representative data sets and evaluate them um and define what good looks like.
- 12:21We need to run uh ev- these evaluations in repeated uh series, and this is a statistical analysis, right?
- 12:29Um where we actually look at the outputs uh and in volume and not just as a direct comparison.
- 12:38So, in combining with evals is sort of your run time logs of what happened, or sorry, traces, uh wh- which are sort of your run time logs of what happens.
- 12:48Um we've built this confidence mechanism to complement um traditional software.
- 12:57And ultimately, this is what we're going to be talking about a little bit more in in terms of driving confidence in the output, not only putting this mechanism in place, but how do we begin to turn it on?
- 13:12So, where does the agent belong?
- 13:15Um back to the lending example, like we can do KYC, financials in parallel and sequence like credit memo, risk review, documentation, decision, all these things in our our DAG.
- 13:27Um looking at each node, we want to ask some certain questions like how valuable would it be to have an agent drive this node versus a human drive this node?
- 13:37Um and we can sort of look at some of these basic questions like can we check it against the policy easily?
- 13:43Can it run in a bounded loop?
- 13:45Can we trace it?
- 13:46Can we fall back to a human?
- 13:48Um if we can answer yes to these type of questions, and we we can kind of have a good idea going in that this particular node may be better suited for automation.
- 13:57Um but throughout the DAG, we should look to drive agent assistance.
- 14:02So, what we're really talking about is not whether or not AI is involved, but whether or not AI we expect to take over at some point.
- 14:14On the decision, you would probably agree that we probably need that to be human-driven.
- 14:18This is essentially the check against the policy.
- 14:21Um so, this is going to be a little bit more difficult, I think, to hill climb.
- 14:29But what do we mean by hill climb?
- 14:31All right, how do we turn this on?
- 14:34So, day one, um we start supervised and as we have agents and humans working together as a part of the process, we can um manually um verify the output to ensure that it is high high quality.
- 14:51Um this is where we refine our data sets and ensure that we have the right confidence mechanisms in place.
- 14:58We've defined what good looks like with the domain subject matter experts and that they're beginning to verify it.
- 15:07When measured confidence reaches a policy threshold, we can move towards sampling.
- 15:12And what that means is humans are looking at a slice of the output and not necessarily all of it.
- 15:18Um we begin systematic more systematic evaluation through traces Um in order to ensure that what we're what the humans aren't seeing is still meeting the quality bar.
- 15:31And then finally, once we clear the confidence threshold, humans handle more of the exceptions of the process, but still acting as participants in refining the data sets and ensuring the quality outputs.
- 15:48Okay, so a few takeaways from this.
- 15:52Um DAG and DCG, basic graph theory, but ultimately, how do we build these processes that exist today and where people are working them and bring agents into the mix.
- 16:04And the recipe really is to keep it deterministic on the outside and make it adaptive on the inside.
- 16:17The next is quality through evaluation.
- 16:20And this is really establishing a complementary confidence mechanism.
- 16:26So, it's not a feeling about a model.
- 16:29We can actually provide research and statistics about the quality of our agents.
- 16:39So, this builds confidence and inherently trusts output.
- 16:46Quality is a team sport.
- 16:49AI engineers own the pipeline to taking product signals from all directions and deliver applications that are well built and utilize ML operations behind the scenes.
- 17:06Finally, agents accelerate across the operating model.
- 17:15I've included some references on the final slide of things that I've spoken about today.
- 17:21This concludes my presentation.
- 17:23Thank you very much.
- 17:25[applause]