Open Reader

Building the AI Agent Is Easy. Proving It's Safe Isn't - Jonathan Osborne, NatWest

completed 18:01 Nov 04, 2026 Watch on YouTube

Current Status

completed

Video ID

5UgnatzpZ9E

RAG / Chat

Enabled
Building the AI Agent Is Easy. Proving It's Safe Isn't - Jonathan Osborne, NatWest
Description

NatWest lead AI engineer Jonathan Osborne shares how the UK's second-largest retail bank, with 19 million customers and about 100,000 assistant conversations a day, is moving its digital assistant Cora from scripted answers to AI agents. Building the agent was the easy part; proving it was safe was the hard part. He covers the routing funnel that limits what ever reaches a model, why quality is several scores instead of one, human reviews where an 83% pass rate hid a 54-point gap, an LLM judge that scored far higher than humans with almost no correlation, and shadow deployments with feature flags for a safe rollout. Chapters: 0:00 Intro 0:41 NatWest and Cora 1:43 The real risk: blast radius 2:23 Scripted bot vs. AI agent 3:40 Four new ways agents fail 4:52 The routing funnel 6:34 Why one accuracy score isn't enough 7:43 Human reviews: 83% hid a 54-point gap 9:16 LLM judges that grade too kindly 11:06 How scoring runs in production 14:06 Shadow mode and gradual rollout 15:42 Human feedback as a gate 16:48 Lessons for regulated agents Jonathan Osborne https://www.natwest.com Join us in SF for the second annual AIE CODE summit: https://aie.codes our last flagship summit of 2026. Applications live now!

Summary

Generated by gpt-5.6-terra

At-a-Glance

  • Verdict: Watch fully
  • Core thesis: For customer-facing agents in regulated environments, building the agent is comparatively easy; the essential work is constructing a reusable safety, evaluation, observability, and rollout system that can prove behavior is acceptable and rapidly contain failures.
  • Why it matters: NatWest offers a concrete production blueprint for controlling agent blast radius: deterministic routing before AI, multi-dimensional quality metrics, calibrated LLM judges, continuous regression testing, shadow deployment, and instant feature-flag rollback.
  • Best use: Use it as an enterprise agent-production design review, particularly for evaluation architecture, model-change controls, monitoring separation between GenAI and classical ML, and staged release mechanics.

Executive Summary

Jonathan Osborne describes NatWest's effort to move its Quora digital assistant from predominantly scripted flows toward RAG-backed answers and action-taking agents. At NatWest's scale—roughly 19 million retail customers and 100,000 Quora conversations per day—the principal risk is not whether a model can produce plausible answers, but the blast radius when it gives a confident, incorrect, unauthorized, or unhelpful answer about customers' money.

NatWest's answer is to constrain the system before trying to evaluate it. Its routing funnel removes about 20% of routine events with contextual filtering, applies deterministic pre-classification rules, uses gated relevance/rephrasing and an embedding-based intent classifier only for residual traffic, then applies policy rules before an AI backend is reached. This architecture provides access control, auditable and reproducible routing decisions, resilience when models are unavailable, and configuration-based governance without full redeployment.

The team rejects a single accuracy score in favor of a quality vector covering safety, task completion, and customer experience. Human validation exposed why: its payment agent scored 83% overall, yet performance ranged from 97% on happy paths to 43% when customers changed topic. It also exposed evaluator ambiguity: humans agreed 95% on bias/fairness but only 64% on whether the agent understood customer intent.

The strongest operational lesson is that LLM-as-judge must itself be treated as a fallible, versioned production component. In a separate complaints-agent dataset of approximately 14,000 human- and LLM-scored cases, a judge with a 0.97 mean faithfulness score had almost zero correlation with human judgments, making it effectively useless despite looking excellent in aggregate. NatWest therefore uses ongoing judge calibration, a judge from a different model family than the agent, trace-based inspection rather than averages alone, CI/CD regression gates, risk-based sampling, shadow deployment, staged rollout, and granular kill switches. The speaker notes that Quora's customer-facing rollout was still pending, so the full production outcome was not yet proven.

Key Takeaways

  • Claim: Safety starts by shrinking the agent's reachable surface area, not by sending every request through a large language model and attempting to guardrail it afterward. | Evidence: NatWest's routing funnel first applies contextual filtering that removes common events such as button clicks (about 20% of traffic), then deterministic rules using utterance plus metadata; only the remainder reaches gated relevance/rephrasing, an embedding-based neural intent classifier, and final policy rules. | Implication: Design agent systems as constrained routing and authorization layers around narrow AI capabilities; reserve generative behavior for cases that genuinely need it and make every route decision explainable.
  • Claim: A single accuracy or quality score is inadequate for governing customer-facing agents because it conceals materially different failure types and risk levels. | Evidence: NatWest scores each answer separately on safety (potential customer harm), task completion, and experience. In human validation of 111 payment-agent conversations across 37 payment journeys, four brands, and three independent scorers per conversation, the 83% overall pass rate masked 97% on happy paths, 76% on edge cases, and only 43% on topic changes. | Implication: Set independent thresholds, alerts, and owners for harmfulness, successful resolution, and interaction quality; segment results by scenario class, especially digressions and edge cases, before approving release. | Caveat: Two of the largest observed failures were engineering defects rather than model failures, reinforcing that evaluation must cover the whole system rather than attribute every issue to the model.
  • Claim: LLM-as-judge cannot be trusted on aggregate score alone; a generous judge that fails to separate good from bad outputs is a broken measurement instrument. | Evidence: For NatWest's internal complaints-summary agent, about 14,000 cases had both human and LLM judgments. The LLM judge's mean faithfulness score was 0.97 with little spread, while human mean was 0.83 with much wider spread; although average error versus humans was 0.2, correlation was almost zero. | Implication: Evaluate judges using discrimination and correlation across score distributions—not just mean agreement or threshold pass rates—and establish explicit calibration datasets and review criteria before automating governance decisions. | Caveat: Human review is not a perfect ground truth: NatWest found only 64% inter-rater agreement for subjective intent understanding, versus 95% for bias and fairness. Judge calibration therefore needs a defined rubric and allowance for human ambiguity, not naive matching to individual labels.
  • Claim: The judge model is part of the production configuration and can create breaking changes even when the agent, prompts, and inputs remain unchanged. | Evidence: NatWest changed only the model underlying a judge; its margin above a relevant threshold fell from 0.8 to 0.2. The team also moved the judge to a different model family from the agent to reduce shared blind spots. | Implication: Version, regression-test, threshold-calibrate, and approve evaluator-model changes exactly as rigorously as changes to the agent or prompts; avoid using the same model family for actor and judge where independent failure modes matter.
  • Claim: Continuous evaluation belongs in production infrastructure and must use different instruments for generative regressions versus classical-model drift. | Evidence: NatWest captures agent and guardrail traces through OpenTelemetry and OpenInference, randomly samples 5% plus all high-interest conversations such as handoffs, failures, unusually long interactions, and angry users, and performs offline scoring every four hours. Prompt or context changes face hard CI/CD regression gates. Separately, its embedding intent classifier is monitored for input-feature drift, F1 against human labels, and predefined retraining thresholds. | Implication: Build one observability layer that unifies traces, experiments, quality scores, and ML monitoring, while retaining distinct diagnostic and control logic for prompt/model regressions and statistical data drift.
  • Claim: Shadow deployment and granular feature flags convert a high-stakes agent launch from a single approval event into a sequence of reversible decisions. | Evidence: NatWest first lets the new system classify real customer utterances while the existing scripted solution continues answering, allowing production-input observation with near-zero customer risk. It then rolls out brand by brand and by percentage, uses KPI-based go/no-go decisions, and can revert globally or isolate individual backends by dimensions such as brand within seconds. | Implication: Separate permission to observe production traffic from permission to answer or act; require scoped rollout controls and tested, seconds-level rollback paths before enabling customer-facing autonomy. | Caveat: Shadow mode validates behavior on real inputs but does not fully validate the effects of live agent responses or tool actions on customers.
  • Claim: Workflow-enforced human feedback can simultaneously improve operations and create the scarce labeled data needed to calibrate and monitor agents. | Evidence: For its live internal complaints agent, NatWest requires complaint handlers to provide feedback before rerunning an investigation. This produced a dataset of approximately 14,000 colleague labels, far more than the team typically obtains, and surfaced the LLM-judge calibration problem. | Implication: Put feedback capture directly in consequential human workflows rather than relying on optional thumbs-up/down signals; record why a human rejected or reran an agent output, not merely that they did.

Detailed Brief

Failure model and control objectives

  • Claims: Agentic systems introduce failure modes that are largely absent from bounded scripted decision trees: confident hallucination, prompt injection, accurate-but-unhelpful interaction loops, and nondeterministic outputs from the same input.; The operational objective is not merely answer correctness. The system must know when it lacks authority or confidence, stop appropriately, and hand off to a person where needed.; NatWest treats routing decisions as governed artifacts: they must carry a decision code and be reproducible for audit.
  • Evidence: The mortgage example illustrates both value and risk: AI can answer an overpayment question from a knowledge base, but a generic statement that customers may overpay 10% without early repayment charges could be wrong for a specific customer's deal.; The routing architecture was designed for access control, auditability, resilience during model/GenAI unavailability, and versioned configuration changes that do not require redeployment.
  • Caveats: The speaker's central customer-facing Quora rollout was not yet live at the time of the talk; the methodology and internal-project evidence are stronger than the claimed final customer outcome.; The presentation is from a Comet-related event and names Comet as the common observability layer, so its product framing should be separated from the underlying architecture principles.
  • Implications: Treat authorization, fallback behavior, provenance, and escalation policy as first-class control-plane functions rather than prompt instructions.; For high-impact tool actions, a system needs a narrower safety case than for retrieval-only Q&A because an erroneous response can create a direct financial or operational consequence.

Data, privacy, and enterprise evaluation operating model

  • Claims: NatWest's production evaluation stack operates under an air-gapped environment and a zero-tolerance policy for PII leaving its network.; Its evaluation cadence is layered: real-time trace capture, four-hour offline scoring, and pre-merge regression comparison against a known-good baseline.; The reusable enterprise asset is the evaluation spine—not the individual agent implementation.
  • Evidence: The judge model is accessed over a private path via an internal GenAI gateway; Comet is consumed as a signed partner application through AWS.; Each LangGraph node becomes a trace span, allowing engineers to locate slow or failing steps in payment-agent executions.; NatWest uses a shared layer to bring GenAI tracing and conventional ML performance monitoring together rather than maintaining separate evaluation systems.
  • Caveats: Because PII cannot leave NatWest's network, some evaluation occurs without it; this may limit the fidelity of assessments that depend on customer-specific context.
  • Implications: Privacy architecture can materially shape the validity of evaluation datasets; explicitly identify which safety or personalization behaviors cannot be tested once sensitive fields are removed.; Standardize an evaluation spine across agents early so incident learnings, datasets, traces, and controls transfer from internal to customer-facing use cases.

Notable Concepts & Terms

  • Routing funnel: A staged intake architecture that removes routine traffic, applies deterministic routing, then invokes ML/GenAI only where needed, reducing attack surface and improving auditability.
  • Quality vector: NatWest's replacement for a single accuracy metric: independently measured safety, task, and experience dimensions that reveal different failure modes.
  • LLM-as-judge: An LLM used to score agent outputs; the talk emphasizes that it needs calibration, correlation checks, version control, and independent-model design.
  • Shadow deployment: Running the new system on live production inputs while the existing scripted system still responds, allowing realistic evaluation without exposing customers to new behavior.
  • OpenTelemetry (OTEL) and OpenInference: Open tracing standards used to capture detailed agent and guardrail execution data for scoring, investigation, and observability.
  • Feature drift: Change in the distribution of user inputs over time; NatWest uses it as an early warning signal that a classical intent classifier may degrade before F1 visibly falls.
  • Hard regression gate: A CI/CD control that prevents prompt or context changes from being merged until their behavioral impact versus a known-good baseline is understood.
  • Feature flags / kill switches: Granular runtime controls that let NatWest revert to scripted behavior globally or disable an individual backend by brand or other dimension within seconds.

Operator Notes / Why Ken Should Care

  • Create a release checklist requiring: shadow-mode evidence, scenario-segmented safety/task/experience metrics, evaluator calibration results, approved rollback tests, and ownership for each go/no-go KPI.
  • Add a judge-validation suite that reports score distribution, rank/correlation with calibrated human review, false-pass behavior on known failures, and sensitivity to judge-model version changes.
  • Separate agent-change and evaluator-change deployment paths; both should be versioned and protected by baseline regression tests.
  • Instrument every orchestration node and tool call as a trace span, then establish risk-based sampling rules that automatically prioritize failures, handoffs, long sessions, and negative-user-signal interactions.
  • Make structured feedback mandatory at moments where a human reruns, edits, overrides, or rejects agent work; capture the reason taxonomy so labels are operationally actionable.
  • Require routing-policy and authorization checks outside the LLM for any action-taking workflow, with an explicit scripted or human fallback when model services are unavailable.

Source/Metadata

  • Title: Building the AI Agent Is Easy. Proving It's Safe Isn't - Jonathan Osborne, NatWest
  • Transcript words: 7151
  • Duration seconds: 1081
  • Timestamp note: No timestamps or chapters were present in the supplied transcript. The transcript contains substantial duplicated passages.

Transcript

3465 words en Processed in 106.4s

Hi guys, my name is Jonathan Osborne, I am a Lead AI Engineer from NatWest Group. I'll tell you more about what that is in a second. Today I'm going to be talking about taking agents from prototype to production, customer facing that is, in a regulated banking environment. And maybe some spoilers, with the access to coding assistance and tools that we have today, the actual creation of the agent, that's the easy part. The much harder part, I think, is proving that it's safe. So let me tell you a bit about NatWest Group. So NatWest is the second largest retail bank in the UK and currently we have somewhere in the range of 19 million retail customers. 19 million hold on to that number because it's really what makes everything else in this talk matter. Quora is our customer's primary point of contact. So it's our digital assistant and it serves somewhere in the realm of 100,000 conversations a day. And until now, the vast bulk of those answers were scripted. So if a customer comes to us and they ask a conversation, then if we haven't fought the script that, then we're not going to be able to answer. The customer is going to get frustrated, they're probably going to have to queue to speak to a human agent. That's changing. So as of this year, we are now working to bring approximately a third of the journeys within Quora to AI generated answers backed by RAG and our knowledge bases and agents, agents that are able to take action on the behalf of customers. So for example, helping them make a payment or change their address. I guess the scary part here really isn't the model. By and large models are quite good. They provide good answers now. It's the blast radius. So with 19 million customers, if we get a few of these utterances wrong, that isn't a bug ticket, that isn't a funny headline. It's a real customer and they're real money. It's difficult questions from the regulator and it's reputational damage for us as a company. So this talk is about what we had to go through to get the approval to go live. And what it took us to trust some of our own metrics as well. Because the interesting part is not the agent, it's proving and making it safe. Let's maybe make that more concrete by considering an example here. Same question, two very different conversations. Customer comes, they ask, can I overpay my mortgage without being charged? Today in the scripted solution, that's going to recognize that keyword mortgage and we're going to present the customer with a menu. Apply, rates, my mortgage. Customer is going to have to select none of the above. Maybe we'll ask them to rephrase their question, but more than likely game over. This customer is going to have to queue, speak to a human agent, they're going to be frustrated. On the right hand side, a different story. AI has been able to answer that question using our knowledge bases. So you can overpay up to 10% of your balance in a year and no early repayment charges. Shall I check your deal? But then the customer does something which is very normal, but it can be frustrating. So they change their topic. So actually, can I close the account instead? This happens all the time and a traditional decision tree is really bad at this type of digression. It's worth mentioning that digressions are going to come back. The key point though is if we build an agent that can answer any question, it can also answer any question wrong. So that 10%, if that doesn't apply to this particular customer's deal, it's a real customer, it's their real mortgage and it's their real money at stake. So why is it so much harder to make an agentic backend solution safe as opposed to that scripted bot? It's because it reasons, it decides, it generates, and there are at least four failure modes here, which we wouldn't have in that scripted solution. One, it can be confidently wrong. Hallucination against a fictitious source and sound absolutely sure of itself while it does it. Two, it can be talked into things. Prompt injection. The input itself can become adversarial. Three, right but unhelpful. So it can provide accurate on policy answers but go round and around and never actually answer the customer's conversation. Incredibly frustrating. And four, it can be non-deterministic. Same inputs, completely different output. That means that your traditional software engineering assertions just don't really work very well here. And as a consequence of that, regression tests that have been built up over years by the existing core team, they really no longer apply. A scripted system's failure surface is completely bounded. We can write out every situation that might occur. We can test it and we can be really confident it's going to do what we want it to. With an agent, that's really not possible and we can't really traditionally test our way to safety. So how do we deal with this? Well, the first part for us was shrinking the attack surface before we actually then thought about hardening it. Introducing what we call the routing funnel. So every customer conversation comes in at the top here. First, we apply a contextual filter and that allows us to remove common events like button clicks. That's about 20%. Next, we have some deterministic pre-classification rules. So with these rules, we're using the customer's utterance and some metadata to route them to a destination with no ML or AI involved at all at this point. It's only utterances that make it past the first two gates that we then actually start the models on. First, there's a relevancy and rephrasing step. That's gated. It helps with those really detailed multi-context questions. And then our intent classifier. This is actually a neural network over embeddings. This isn't generative AI, which is able to use a customer's utterance to predict the right backend. Finally, there's some policy rules to ensure that this customer should actually be getting into that particular backend. Why do we build it this way? Well, four reasons, a lot of them about being a bank. Firstly, access control. So we need to enforce that to ensure the customer should be getting to this backend. Auditability. So every decision here needs to carry a code. It needs to be fully auditable and reproducible. The regulator ensures this. Resilience. In the case that a model or the GenAI isn't available, we still need to provide the customer an answer. And governance. So all of this is version config. We can make changes to it without a full redeployment. That's really important because it means that we can react fast to changing market conditions. We didn't just take a language model, slap some context into it, and point it at 90 million customers. We first thought really hard about what actually needed a model to solve. This brings us onto the really important question of is this actually working? And the key metric that they looked at in traditional Quora was accuracy. So if I told you this intent classifier is 94% accurate, that probably sounds really good. But does that actually answer the important question? Is it grounded in a real source? Did the customer's question actually get resolved? Did it know when it went out of its depth? When to stop? Bring in a human? You can't embody that with one single score. And that's why we've moved away from a quality score, started treating it more as a vector. Every answer, we score across three different categories. Safety, could it harm the customer? Task, did it actually do its job? Experience, how did it feel to deal with? All of these can be monitored and alarmed independently. And they allow us to differentiate between is it hallucinating versus is it right but just insufferable to deal with? There are different answers and they require different solutions. The key point here is a router that's 94% accurate but 100% confident that 6% of the time it's wrong is way more dangerous than one that's 85% confident and knows it. The first thing we did here before we worried about automating this is what we always do and we started off with some human validation. The numbers that you see here are from June validation that we did on our payment agent, 111 conversations, over 37 different payment journeys, four brands, three independent human scorers per conversation. Headline here, 83% pass rate across the board. But the headline is pretty useless. Let's dig into some of that data. So 97% on the happy pass scenarios, that's great. 76% edge cases, not quite so good. Topic changes like that mortgage example that we discussed earlier, only 43%. So that single 83% score was hiding that 54% spread. The second point on the right is probably more nuanced and less talked about and that's do human validators actually agree with each other? On something objective. Worried about automating this is what we always do and we started off with some human validation. The numbers that you see here are from June validation that we did on our payment agent, 111 conversations, over 37 different payment journeys, four brands, three independent human scorers per conversation. Headline here, 83% pass rate across the board. But as ever, the headline is pretty useless. Let's dig into some of that data. So 97% on the happy pass scenarios, that's great. 76% edge cases, not quite so good. Topic changes like that mortgage example that we discussed earlier, only 43%. So that single 83% score was hiding that 54% spread. The second point on the right is probably more nuanced and less talked about and that's do human validators actually agree with each other? On something objective like bias and fairness, you do actually see a 95% agreement rate, which is great. But on something more subjective, intent understanding, so does the bot actually understand what the user wants, only a 64% agreement rate. The common thing when we start automating this, bringing LLM as a judge is that we want to make our judge match our human validators. But what are they meant to be matching here? There's only a 64% agreement rate between humans. So that can't simply be the target here, essentially. One caveat, by the way, the two biggest causes of failure here actually turned out to be engineering issues, not problem with the model at all. But nevertheless, that proves useful value of the human validation because it caught them. So let's turn to actually automating this then. So LLM as a judge. So core plus that's not live yet. So I'm going to turn to another internal project. So this is an internal complaints agent that we have. Essentially, the goal here is that customers will occasionally complain. This will take the complaint. It has access to a load of tools to then be able to write a summary for complaint handlers to essentially explain why is this particular user complained and how we can help them with it. It went live in February and we've got around 14,000 of these cases which have been scored by both a human validator and an LLM as a judge. If we dive into the data, so this is the faithfulness score here on the right. So you can see upper bar in the red there. That's the LLM of the judge. Mean 0.97 right up at the top. Very little spread. Human mean 0.83. Much, much wider spread. Key point here is that if you look at that average error versus the human, it's 0.2. You might conclude that the judge is doing okay, but the correlation is almost 0. In this case, a judge which doesn't discriminate between the actually good cases and the bad cases is basically worthless. You don't want your judge to be generous and that is what LLMs want to do by default. Maybe one other point to make here is that the amber dotted line that represents the threshold for this particular metric. For this judge model, you can see we're comfortably above that. However, we made a change to that model. It didn't change anything else. Same input, same outputs. Just changed the actual model behind it. And that dropped all the way from 0.8 above to 0.2 above. That means that the judge model itself actually becomes part of your configuration and it can lead to breaking changes. A key point we took here, by the way, is that we moved our judge to a different model family from that of the actual agent. So judged and judged, different blind spots, and that's had to be really effective in putting two scores closer together. Coming back to the core examples. So how does this scoring actually run? So live conversations between the agents and its guardrails, all of those are captured being open source standards like OTEL and Open Inference. All of that detail is then sampled. So by default, we take 5% random sample, but we also want to look at everything interesting. By interesting, I mean conversations that hand off, fail. Those are particularly long. One for the user of angry. We then score these with our LLM as a judge. So that's that raft and dimension of metrics that I talked about earlier. And then absolutely all of this ends up in Comet. So traces, scores, experiments. It's governed by a couple of bank constraints here. So we work in a completely air-gapped environment. So no internet access to anything. So judge model has reached over a private path with an internal GenAI gateway. Comet, a SaaS product, we're consuming that as a signed partner app via AWS. Second around personally identifiable information. We have a zero tolerance policy for any PII leaving our network. So that means a lot of this evaluation happens without that present. Different cadences here. So traces are being captured as they happen. We're doing offline scoring every four hours. And then regression. This is also built into our CI/CD. So if we make changes to prompts or to context, that can have an outsized impact on what the agent is actually responding. So we need to constantly be comparing versus a known good baseline. We do that in CI/CD. They have a hard regression gate. So changes can't be merged in without us understanding exactly what's going to occur. Key point is that continuous evaluation is part of your production infrastructure. It's not a notebook that you run a couple of times when your model goes live. So there's different models here and they've got different failure modes. So on the right hand side, we've got the agents. We've got the generative AI. So generative AI regresses. So as we've just talked about, somebody can make changes to a prompt and that can have outsized impact on the behavior. That's why we have the CI/CD in place. You can see here a real OTEL trace, which is looking from our payment agent. Every node in the LangGraph becomes a different span. And when the agent is slow or is breaking in a particular place, this allows us or an agent to jump in and investigate exactly why. On the classical side, so the intent classifier is traditional ML and thus we've got to monitor it in a more classical way. It drifts over time, right? So human conversation will naturally evolve from the point at which the model was trained. So we need to look at more traditional things like input feature drift, F1 score based off human labels. And then we have RAG thresholds defined as to exactly when we need to trigger retraining for that model. On the right, you can see an NPM data drift chart. I really wouldn't underestimate input feature drift here. It's a really good canary as to when your model is starting to decline before your F1 score does, implying the need for retraining. So two different problems, two different instruments, but what we don't want is two different observability and evaluation frameworks. Comet is a really useful layer because it brings in both OTEL for the Gen AI and NPM model performance monitor for the ML. So one platform. How do we actually deploy this then without breaking the bank and creating a load of headlines? We start off with a shadow deployment. So what I mean by that is we put this live, we use it to start classifying customer utterances, but the existing scripted solution is what will actually respond to the customer. And that means that we can get a sense of the real data, the input space for different customer queries with almost zero risk. I think this shadow mode is one of the more transferable bits of this project for us because often we have this deadlock in a regulated industry where obviously we can't go live and get production data without the approval to do so. But equally to actually enable us to go live in many cases, our model risk colleagues increasingly want to see how our models are going to react to that actual production data. This allows us to break that apart so we can separate observing safely from actually answering customer queries. And it takes one really big decision point, a big bang release into a series of smaller ones which we can make confidently. We then go brand by brand. So we have percentage based rollout within the brand and we have KPIs which allow us to determine go no go at various points along that. Some of those decisions are automated and some of those require manual approval. What makes that possible is that we make a lot of use of feature flagging here. So there's a global flag that we can trigger to send everything back to the scripted solution. But also every single backend can be isolated either globally or on a particular dimension such as brand. And all of that can be done in seconds. Before I wrap up, let me maybe just talk very briefly and pull this back to that complaints project. So just to remind you that was the colleague facing agent which writes investigation summaries for complaint handlers. In that project, human feedback is a gate. It's not a thumbs up. It's not a tick box activity. So if a complaint handler wants to rerun their investigation, they can't do so until they provided human feedback. We want to understand why they felt the automated and some of those require manual approval. And I think some of those require manual approval. What makes that possible is that we make a lot of use of feature flagging here. So there's a global flag that we can trigger to send everything back to the scripted solution. But also every single backend can be isolated either globally or on a particular dimension such as brand. And all of that can be done in seconds. Before I wrap up, let me maybe just talk very briefly and pull this back to that complaints project. So just to remind you, that was the colleague facing agent which writes investigation summaries for complaint handlers. In that project, human feedback is a gate. It's not a thumbs up. It's not a tick box activity. So if a complaint handler wants to rerun their investigation, they can't do so until they provided human feedback. We want to understand why they felt the need to do that rerun. But also it's allowed us to build up this quality dataset of 14,000 customer colleague labels, I guess, in this case. And that's really valuable. In a lot of projects, we struggle to get a tenth of that number. And I think the projects have also traded nicely here. So they found that judge problem in production. We have judge calibration and regression checks because of that. But equally, the architecture that we built, which relies heavily on Comet, they don't use that yet. And they're going to be adopting that for their production monitoring. I guess it's a glimpse inside an enterprise, right? So the agent with the cheap part here, that's code that we can produce to solve the business problem. The evaluation spine is the bit that we can then reuse again and again. So to wrap up, if you are going to be shipping customer facing agents in a regulated environment, then these are probably the points I would give you. I'm not going to go through everything or maybe just pick a couple. So three and four here, they're the points with the actual production judge data, right? So that judge pinned near the top, it's a broken instrument. Your judges are going to want to be overly positive. You need to fight against that. Compare the spans, not just the averages. Ensure the judge is actually matching the human reviewer. Fourth, the judge model itself does become part of that threshold config, right? So if you are going to be making changes to the judge model, then you can introduce a breaking change without knowing it. Comet is obviously absolutely key here. So we have that for both halves, both the generative AI and the traditional ML, which we do still use a little bit. And I guess the final point here is next month I'll find out how much of this is actually true when we go live. So thanks a lot for listening. It was really a pleasure to get to speak to all of you. So I'll be at the Comet booths after this. If you do have any questions, disagreements, etc., I'm really happy to hear them. But thanks a lot for your time. I think, is proving that it's safe. So let me tell you a bit about NatWest Group. So NatWest is the second largest retail bank in the UK and currently we have somewhere in the range of 19 million retail customers. 19 million hold on to that number because it's really what makes everything else in this talk matter. Quora is our customer's primary point of contact. So it's our digital assistant and it serves somewhere in the realm of 100,000 conversations a day. And until now, the vast, vast bulk of those answers were scripted. So if a customer comes to us and they ask a conversation, then if we haven't fought the script that, then we're not going to be able to answer. The customer is going to get frustrated, they're probably going to have to queue to speak to a human agent. That's changing. So as of this year, we are now working to bring approximately a third of the journeys within Quora to AI generated answers backed by RAG and our knowledge bases and agents, agents that are able to take action on the behalf of customers. So for example, helping them make a payment or change their address. I guess the scary part here really isn't the model. Like by and large models are quite good. They provide good answers now. It's the blast radius. So with 19 million customers, if we get a few of these utterances wrong, that isn't a bug ticket, that isn't kind of a maybe a funny headline. It's a real customer and they're real money. It's slightly very difficult questions from the regulator and it's reputational damage for us as a company. So this talk is about what we had to go through to get the approval to go live. And I guess what it took us to maybe trust some of our own metrics as well. Because as I say, the interesting part, it's not the agent, it's proving and making it safe. Let's maybe make that more concrete by considering an example here. So kind of same question, two very different conversations. So customer comes, they ask, can I overpay my mortgage without being charged? Today in the scripted solution, that's going to recognize that keyword mortgage and we're going to present the customer with a menu. So apply, rates, my mortgage customer is going to have to select none of the above. Maybe we'll ask them to rephrase their question, but more than likely game over. This customer is going to have to queue, speak to a human agent, they're going to be frustrated. On the right hand side, bit of a different story. So AI has been able to answer that question using our knowledge bases. So you can overpay up to 10% of your balance in a year and no early repayment charges. Shall I check your deal? But then the customer does something which is very normal, but it can be frustrating. So they change his topic. So actually, can I close the account instead? This happens all the time and a traditional decision tree is really, really bad at this type of digression. It's worth mentioning that digressions are going to come back. So we'll hold on to that point. I guess the key point though is if we build an agent that can answer any question, it can also answer any question wrong. So that 10%, if that doesn't apply to this particular customer's deal, it's a real customer, it's their real mortgage and it's their real money at stake. So why is it so much harder to make an agentic back solution, you know, more, you know, how do we protect against it as opposed to that scripted bot? It's because it reasons, it decides, it generates, and there are at least kind of four failure mode here, which we wouldn't have in that scripted solution. One, it can be confidently wrong. Hallucination against a fictitious source and sound absolutely sure of itself while it does it. One, it can be talked into things. Prompt injection. The input itself can become adversarial. Three, right but unhelpful. So it can provide accurate on policy answers to just go round and around and around and never actually answer the customer's conversation. Incredibly frustrating. And four, it can be non-deterministic. Same inputs, completely different output. That means that your traditional software engineering assertions just don't really work very well here. And as a consequence of that regression tests that have been built up over years by the existing core team, they really no longer apply. A scripted system's failure surface is completely bounded. We can write out every situation that might occur. We can test it and we can be really confident it's going to do what we want it to. With an agent, that's really not possible and we can't really traditionally test our way to safety. So how do we deal with this? Well, the first part for us was shrinking the attack surface before we actually then thought about hardening it. Introducing what we call the routing funnel. So every customer conversation comes in at the top here. First, we apply a contextual filter and that allows us to remove kind of common events like button clicks. That's about 20%. Next, we have some deterministic pre-classification rules. So with these rules, we're kind of using the customer's utterance and some metadata to route them to a destination with no ML or AI involved at all at this point. It's only utterances that make it past the first two gates that we then actually start the models on. First, there's a relevancy and rephrasing step. That's kind of gated. It helps with those really detailed multi-context questions. And then our intent classifier. This is actually a neural network over embeddings. This isn't generative AI, which is able to use a customer's utterance to predict the right backend. Finally, there's some policy rules to ensure that this customer should actually be getting into that particular backend. Why do we build it this way? Well, four reasons, a lot of them about being a bank. Firstly, access control. So we need to enforce that to ensure the customer should be getting to this backend. Auditability. So every decision here needs to carry a code. It needs to be fully auditable and reproducible. The regulator ensures this. Resilience. In the case that a model or the Gen2VI isn't available, we still need to provide the customer an answer. And I guess governance. So all of this is version config. We can make changes to it without a full redeployment. That's really important because it means that we can react fast to changing market conditions. We didn't just take a language model, slap some context into it, and point it at 90 million customers. We first thought really hard about what actually needed a model to solve. This brings us onto the really important question of is this actually working? And the key metric that they looked at in kind of traditional Quora was accuracy when doing this. So if I told you this intent writer is 94% accurate, that probably sounds really good. But does that actually answer the important question? So is it grounded in a real source? Did the customer's question actually get resolved? Did it know when it went out of its depth? When to stop? Bring in a human. You can't embody that with one single score. And that's why we've moved away from quality of the score, started treating it more as a vector. Every score, every kind of answer, we score across three different categories. So safety, could it harm the customer? Task, did it actually do its job? Experience, how did it feel to deal with? All of these can be monitored and alarmed independently. And they allow us to differentiate between is it hallucinating versus is it right but just insufferable to deal with? There are different answers and they require really different solutions. The key point here is a router that's 94% accurate but 100% confident that 6% of the time it's wrong is way more dangerous than one that's 85% confident and knows it. The first thing we did here before we worried about automating this is what we always do and we started off with some human validation. The numbers that you see here are from June validation that we did on our payment agent, 111 conversations, over 37 different payment journeys, four brands, three independent human scorers per conversation. Headline here, 83% pass rate across the board. But as ever, the headline is pretty useless. Let's dig into some of that data. So 97% on the happy pass scenarios, that's great. 76% edge cases, not quite so good. Topic changes like that mortgage example that we discussed earlier, only 43%. So that single 83% score was hiding that 54% spread. The second point on the right is probably more nuanced and less talked about and that's do human validators actually agree with each other? On something objective like bias and fairness, you do actually see a 95% agreement rate, which is great. But on something more subjective, intent understanding, so you know, does the bot actually understand what the user wants, only a 64% agreement rate. The common thing when we start automating this, bringing LLM as a judge is that we want to make our judge match our human validators. But what are they meant to be matching here? There's only a 64% agreement rate between humans. So that can't simply be the target here, essentially. One caveat, by the way, like the two biggest causes of failure here actually turned out to be engineering issues, not problem with the model at all. But nevertheless, that proves useful value of the human validation because it caught them. So let's turn to actually automating this then. So LLM as a judge. So core plus that's not live yet. So I'm going to turn to another internal project. So this is an internal complaints agent that we have. Essentially, the goal here is that customers will occasionally complain. This will take the complaint. It has access to a load of tools to then be able to write a summary for complaint handlers to essentially explain why is this particular user complained and how we can help them with it. It went live in February and we've got around 14,000 of these cases which have been scored by both a human validator and an LLM as a judge. If we dive into the data, so this is the faithfulness score here on the right. So you can see upper bar in the red there. That's the LLM of the judge. Mean 0.97 right up at the top. Very little spread. Human mean 0.83. Much, much wider spread. Key point here is that if you look at that average error versus the human, it's 0.2. You might conclude that the judge is doing okay, but the correlation is almost 0. In this case, like a judge which doesn't discriminate between the actually good cases and the bad cases is basically worthless. You don't want your judge to be generous and that is what LLMs want to do by default. Maybe one other point to make here is that so that amber dotted line that represents the threshold for this particular metric. For this judge model, you can see we're comfortably above that. However, we made a change to that model. It didn't change anything else. Same input, same outputs. Just changed the actual model behind it. And that dropped all the way from 0.8 above to 0.2 above. That means that the judge model itself actually becomes part of your configuration and it can lead to breaking changes. A key point we took here, by the way, is that we moved our judge to a different model family from that of the, you know, the actual agent. So judged and judged, different blind spots, and that's had to be really effective in putting two scores closer together. Coming back to the core examples. So how does this scoring actually run? So live conversations between the agents and its guardrails, all of those are captured being open source standards like OTEL and Open Inference. All of that detail is then sampled. So by default, we take 5% random sample, but we also want to look at everything interesting. By interesting, I mean conversations that hand off, fail. Those are particularly long. One for the user of angry. We then score these with our LLM as a judge. So that's that raft and dimension of metrics that I talked about earlier. And then absolutely all of this ends up in comatopic. So traces, scores, experiments. It's governed by a couple of bank constraints here. So we work in a completely air-gapped environment. So no internet access to anything. So judge model has reached over a private path with an internal GenEI gateway. Comet, a SaaS product, we're consuming that as a signed partner app via AWS. Second around personally identifiable information. We have a zero tolerance policy for any PII leaving our network. So that means a lot of this evaluation happens without that present. Different cadences here. So traces are being captured as they happen. We're doing offline scoring every four hours. And then regression. This is also built into our CI CD. So if we make changes to prompts or to context, that can have like an outsized impact on what the agent is actually responding. So we need to constantly be comparing versus a known good baseline. We do that in CI CD. They have a hard regression gate. So changes can't be merged in without us understanding exactly what's going to occur. I guess key point is that continuous evaluation is part of your production infrastructure. It's not a notebook that you run a couple of times when your model goes live. So there's different models here and they've got different failure modes. So on the right hand side, we've got the agents. We've got the generative AI. So generative AI regresses. So as we've just talked about, somebody can make changes to a prompt and that can have outsized impact on the behavior. That's why we have the CI CD in place. You can see here a real OPEC trace, which is looking from our payment agent. Every node in the land graph becomes a different span. And when the agent is slow or is breaking in a particular place, this allows us or an agent to jump in and investigate exactly why. On the classical side, so the intent classifier is traditional ML and thus we've got to monitor it in a more classical way. It drifts over time, right? So human conversation will naturally evolve from the point at which the model was trained. So we need to look at more traditional things like input feature drift, F1 score based off human scores, sorry, human labels. And then, you know, we have rag thresholds defined as to exactly when we need to trigger retraining for that model. On the right, you can see an NPM data drift chart. I really wouldn't underestimate like input feature drift here. It's a really good canary as to when your model is starting to decline before your F1 score does, implying the need for retraining. So two different problems, two different instruments, but what we don't want is two different observability and evaluation frameworks. Comet is a really useful layer because it brings in both OPIC for the Gen.AI and NPM model performance monitor for the ML. So one platform. How do we actually deploy this then without kind of breaking the bank and creating a load of headlines? We start off with a shadow deployment. So what I mean by that is we put this live, we use it to start classifying cutter utterances, but the existing scripted solution is what will actually respond to the customer. And that means that we can get a sense of the real data, you know, the input, the input space for different customer queries with almost zero risk. I think this shadow mode is like one of the more transferable bits of this project for us because often we have this deadlock in a regulated industry where obviously we can't go live and get production data without the approval to do so. But equally to actually enable us to go live in many cases, our model risk colleagues increasingly want to see how our models are going to react to that actual production data. This allows us to kind of break that apart so we can break apart Observe safely from actually answer customer queries. And it takes one really big decision point, a big bang release into a series of smaller ones which we can make confidently. We then go brand by brand. So we have like percentage based rollout within the brand and we have kind of KPIs which allow us to determine go no go at various points along that. Some of those decisions are automated and some of those require manual approval. And I think that, and yeah, some of those require manual approval. What kind of makes that possible is that we make a lot of use of feature flagging here. So there's like a global flag that we can trigger to send everything back to the scripted solution. But also every single back end can be isolated either globally or on a particular dimension such as brand. And all of that can be done in seconds. Before I wrap up, let me maybe just talk very briefly and pull this back to that complaints project. So just to remind you that was the colleague facing agent which writes investigation summaries for summaries for complaint handlers. In that project, human feedback is a gate. It's not a thumbs up. It's not a tick box activity. So if a complaint handler wants to rerun their investigation, they can't do so until they provided human feedback. We want to understand why they felt the need to do that rerun. But also it's allowed us to build up this quality data set of 14,000 customer of colleague labels, I guess, in this case. And that's really valuable. In a lot of projects, we struggle to get a 10th of that number. And I think the projects have also traded nicely here. So, you know, they found that judge problem production. We have judge calibration and regression checks because of that. But equally, the architecture that we built, which relies heavily in Commodopic, they don't use that yet. And they're going to be adopting that for their production monitoring. I guess it's a glimpse inside an enterprise, right? So the agent with the cheap part here, that's code that we can produce to solve the business problem. The valuation spine is the bit that we can then reuse again and again. So to wrap up, like if you are going to be shipping customer facing agents in a regulated environment, then these are probably the points I would give you. I'm not going to go through everything or maybe just pick a couple. So three and four here, they're the points with the actual production judge data, right? So that judge pinned near the top, it's a broken instrument. Your judges are going to want to be overly positive. You need to fight against that. Compare the spans, not just the averages. Ensure the judge is actually matching the human reviewer. Fourth, the judge model itself does become part of that threshold config, right? So if you are going to be making changes to the judge model, then, you know, you can introduce a breaking change without knowing it. Comet is obviously absolutely key here. So we have that for both halves, both the genitive AI and the traditional ML, which we do still use a little bit. So, and I guess the final point here is next month, I'll find out how much of this is actually true when we go live. So thanks a lot for listening. It was really a pleasure to get to speak to all of you. So I'll be at the Comet booths after this. If you do have any questions, you know, disagreements, etc., really happy to hear them. But thanks a lot for your time.