Skip to main content

How to Design Human Escalation for AI Agents with Agent Bricks, MLflow Judges and Teams

Summary

  • LLM judges: score confidence and escalate uncertain decisions to Teams or Slack for automatic resumption.
  • Hybrid automation: approves high-confidence decisions instantly while routing uncertain cases for expert review.
  • MLflow tracking: enables threshold tuning and expert routing based on escalation timing and feedback.

How to Design Human Escalation for AI Agents with Agent Bricks, MLflow Judges and Teams

Watch: How to Design Human Escalation for AI Agents with Agent Bricks, MLflow Judges and Teams
Talk by Tony Aug, CEO, Nimble Gravity
To require human approval before an AI agent acts, have the agent score its own output with an LLM judge, escalate only the uncertain cases to a person in a tool they already use such as Microsoft Teams or Slack, and resume automatically once the answer comes back. This video builds that human-in-the-loop pattern with Agent Bricks as the orchestrator and custom MLflow LLM judges deciding when to escalate, demonstrated on a baggage-delay insurance claim where a high-confidence claim is approved automatically and an unclear one goes to a human.
Tony Aug of Nimble Gravity walks through a live insurance-claim demo: a baggage-delay claim PDF is read and reasoned over, a custom MLflow LLM judge scores the decision, a high-confidence claim is approved automatically with zero human involvement, and an unclear claim triggers a question to a Teams bot. The reviewer's rejection is logged in MLflow with timing and feedback. He also covers routing to the right experts, parallel routing when someone is offline, statistics for tuning escalation thresholds, and why expecting 100% accuracy is an illusion.
Sponsored by Nimble Gravity.

Chapters

FAQs

How do I require human approval for AI decisions?

Use an LLM judge to score the agent's confidence in its output. If confidence is high, auto-approve; if uncertain, escalate to a person in Microsoft Teams or Slack. The agent resumes automatically once they respond.

What's an LLM judge in MLflow?

A custom LLM judge evaluates whether the agent's decision is confident enough to approve automatically. This video shows an insurance claim example where the judge routes high-confidence approvals to auto-approval and uncertain claims to a human.

Can I route questions to different experts?

Yes—the pattern covers routing to the right experts, parallel routing when someone is offline, and statistics for tuning escalation thresholds so you can optimize who handles which types of decisions.

Why shouldn't I expect 100% accuracy?

Expecting perfect AI accuracy is an illusion. This video explains why human-in-the-loop systems work better: they let AI handle high-confidence decisions fast while humans handle edge cases that need judgment.

Full transcript

00:00 Introduction

OK. Well, thank you for coming. I'm Tony Hawk. I'm from a company called Nimble Gravity. We provide consulting in the field of data and AI. And today I want to talk to you a little bit about the concept of "man in the cycle." We have implemented a number of data-related programs and projects that include a human component. We have learned some lessons and today I want to share with you what we have learned. So, let's start with a high-level definition of "a person in a cycle."
In a typical system, and today I'll take insurance claims as an example, you deal with certain processes. You have a decision-making process for an insurance claim. Do you approve of her? Are you rejecting it? So in this example, to demonstrate, I'm saying, if we can approve an insurance claim using AI, it goes to the left— auto-approval. If we can deny the insurance claim, it goes in the middle—an automatic denial. And if the "judge" (I'll come back to this later) can't decide whether to approve or deny, we send it to the right to notify the expert - a human who will verify the insurance claim.

00:46 Human-in-the-loop decisions: the insurance claim example

Then the person makes a decision, and we feed it back to the system when the AI couldn't decide. This is a classic, textbook example of a "man in a cycle." So, what are the problems with the " man in the cycle"? First, people probably don't like going into data tools every day to do their work. Usually, a “ person in a cycle” is some kind of additional process. It's hard to understand exactly how people want to view information or what they actually do.

01:36 Problems with keeping a human in the loop

Different types of problems require different subject matter expertise. So in my hypothetical example, imagine a claim for baggage insurance, or perhaps a claim due to a flight delay. They may require two different approaches. Reviewers often have a full-time job during the day, not just doing reviews. And so on. I won't list the rest , but this is a conceptual list of problems. We have encountered many of them in real-life projects with the "man in the loop."
So to solve these problems, we started using Microsoft Teams as a triage tool or as a “person in the loop” solution. So you see, for today's demo, I'm just going to use the chat in the Playground environment as an interface. The agent uses an LLM -judge to decide whether to approve an insurance claim. We register everything in the Unity Catalog. In this case, we also take insurance requirements from Unity Catalog. We log everything in MLflow.

02:51 Microsoft Teams as the escalation channel

So you get typical traces and so on. What happens if we can't decide whether to approve or deny an insurance claim? Instead of a person logging into some Databricks tool, we send this into Microsoft Teams, and use that as a way to engage the person through a tool that they probably log into every day, and we'll do a demo of that. And then the person decides whether they want to approve or reject the insurance claim? And this returns, closing the cycle, therefore, the person is in the cycle.
So this uses Agent Bricks as an orchestrator. We use Delta tables to store results. We use special LLM judges to make decisions about whether to engage, approve, or reject a person. And then, sorry, MLflow tracks experiments. We use the typical Databricks model maintenance to serve them, and Unity Catalog tracks all the results. So if you haven't used custom LLM judges yet , this is the feature to create your judge. Databricks has built-in referees to do, you know, typical refereeing.

04:07 Custom LLM judges in MLflow decide when to escalate

This is how you summon a special judge. You give it a name, instructions, description, and model. This is how you provide a special judge. And then at the end you get a grade. We decide: to pass or not to pass. And if we do involve a person, you will see this escalation and interviewing of the person in a loop. And it returns the answer whether the person approved or rejected, and what the reasons were. So, this is like a structure, and now I'm going to show you this in a demo.
I hope the rules of the demo work today and everything works out. This is usually the most interesting part. So, first of all, this is our agent. So I said it again: Nimble Gravity, demo at Data AI Summit, and that's the end point. And you 'll see a typical picture—these are service endpoints . This is what allows us to submit our insurance claim to get a result. And what we're doing here, just to clarify, is we have a volume of our PDF documents, our baggage delay requirements.

05:28 Live demo of the escalation agent

These are fictional demo applications, there is information about the fact that the luggage was not delivered on time, how much the delay cost, etc. So, we're going to process this with our tool. We will do this using our endpoint in the playground environment. And we implement this through Microsoft Teams. So, we created a bot in Teams . And if I open this bot, I'll just say hello to let the system know I'm online. Obviously, this isn't exactly the way you would use it in real work.
He simply replies, "I'm not here to talk to you." But let's get started. Now I will use the tool in the playground. And now I will do this : baggage sorting application Excuse me, baggage delay application 001. pdf, please. I always say " please". You never know what might happen. So, the server process is starting now, so it might take a second. It will generate a response. I hope the demo works today. I have two examples.

08:09 Auto-approving a claim with an LLM judge

This one, theoretically, should pass automatically. Let's give him a second. That's all. He found baggage claim number one. He analyzes the document. We use the AI ​​parse document tool, which is really great. If you have n't used it yet, this is one of those DataBricks features that makes my job a lot easier. And now he's thinking about it. It calls a function that asks, "What should we do with this ? Should we approve or reject the application?"
And he returned the answer: "The decision is automatic approval with a confidence level of 90%." So, the AI ​​said, "This is a good application for travel baggage insurance. We'll approve it." The LLM judge approved it with a high score. And if I look at the execution of the ML flow, you'll see right here, at the bottom, the creation of certain artifacts. Here below are the indicators. You will see all the confidence ratings and so on.
And you will see that the judge assessed with great accuracy. And now, for greater curiosity, I will sort out another application. It should not be a good insurance claim. And you'll notice on the right that at some point a pop-up window should appear. This is a simple system we created in Teams to get it started. That's all. So you see, AI has emerged - the summary of what it is . You will see that the sorting decision is left to a human.

10:00 Escalating an unclear claim to a human in Teams

We are only 50% sure that this is a valid travel insurance claim. And it's not entirely clear what the date was. The travel period was before this date. And it says that my suitcase has not arrived. So I decline this request. Now, for demonstration purposes, I am acting as a human expert. I declined this request. And on the left, the process of receiving a response from a person in Teams takes place. And on the left I hope to see a return to my service endpoint.
That's all. So, the automated check is complete here. The decision to pass the request to a human was made with very low confidence. The AI ​​thought it was probably worth rejecting it. And then the person in the process responded to him. I was the one checking. And you see we rejected it, and again, I have an MLflow endpoint. I can scroll down and see what the person's response was. I can also see what the result of the sort was .
You get all the usual cool features of MLflow. But you also get this final verdict where the person has rejected the request. And this is what you then feed back to your AI agent to take advantage of the entire history of human decisions. How to make it smarter next time and so on. That's how it works, and at the same time what happened is that we also recorded the result. So here I will run my query. We have created a table of processed insurance cases.

12:09 Logging timing and human feedback for improvement

And you'll see here at the end of the process with human participation, I hope. That's all. So this is baggage claim #2, and for claim #1 you see that the human involvement was zero because it was approved automatically . And you'll see that this one was manually rejected because I clicked the " reject" button. This completes the cycle. This is how a person can be part of the process, just like with automatic approval.
This is very convenient when people do some work manually. Maybe they don't really like it. Maybe they could spend their time on something more useful. But they still have to solve some of the AI ​​tasks, since AI can't always do it on its own. This is one way we've found to engage human experts so they don't have to switch to another tool. You've seen that it works in Teams out of the box. We find this an interesting approach and are using it more and more often.
While working on these projects, we took into account several nuances that probably shouldn't be shown today due to lack of time. First, imagine that you have a diagram of which experts in the company to contact if necessary. This could be Department A, Department B, or specialized specialists on a specific topic. You can configure the routing of requests so that they receive responses . We also have a feature—it's hard to demonstrate— where multiple agents or specialists receive the same notification at the same time.

14:03 Routing questions to the right experts

So if someone is offline, the request doesn't go unanswered. This is parallel routing. And if someone doesn't respond often, their priority in the queue may be dropping. Another option is a task queue, as constant interruptions can be inconvenient for workers. Therefore, if someone has to do this often, you can create a task queue. Ultimately, the bot owner or project manager needs statistics to understand whether we are delegating too many tasks to humans, whether we should change the threshold or improve the AI ​​logic.
So, I believe that the person in the system should remain in their usual work cycle. Let them stay in Teams, Slack, or whatever other tools they use every day. Uh-huh . One of the obstacles to implementing AI projects is the illusion that you will achieve 100% accuracy or some ideal indicator that you strive for. It is unlikely that you will ever achieve this. Engaging people is one way to reach 80% or close the gap, as you can send tasks to people to keep doing what they are experts at in their jobs.

15:27 Why 100% accuracy is an illusion

So, they get a message from a virtual colleague: "Can you please review this application?" Or, you know: "Tell me what to do with this order." And they stay in place, and then, you know, the LLM estimators and the machine learning streams—if you're not using these tools, they're extremely powerful. This is a great way, especially if you don't have reference data to test, you can use LLM as a judge. You can even use a different LLM model if you want a less biased answer .
This is a great way to test your machine learning or artificial intelligence without using reference data. That's all I wanted to say today on the topic of involving people in the process. The wonderful people at DataBricks wanted to remind you that they value your feedback in surveys. Thank you for that. The Nimo Gravity team is waiting for you at booth 560 if anyone wants to chat in more detail or has any questions about what we do.
Thank you for that, I hope you all have a wonderful day. Thank you.

Learn more about the Databricks Data and AI platform.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.