Production AI Framework for Retail Banking Chatbot

databricks · Finance · 2026 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Retail banking customer support automation

A retail bank needed to turn a failed chatbot POC into a production AI agent that could deflect simple customer calls while remaining observable, measurable, governed, and diagnosable in a regulated environment.

Constraints:

Architecture

The Databricks framework starts with evaluation and observability before model choice. For the retail bank, the team collected 200 real support cases, defined deflection/accuracy/latency targets, built an automated evaluation pipeline with human review below thresholds, instrumented the agent flow with traces, connected APIs and a RAG vector database for policy lookup, then chose the model in week seven of an eight-week POC. The final architecture makes the agent visible, measurable, and accountable before production launch.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  customer-banking-chatbot["Customer banking chatbot"] --> intent-classification-agent["Intent classification agent"]
  intent-classification-agent["Intent classification agent"] --> customer-account-api["Customer account API"]
  intent-classification-agent["Intent classification agent"] --> policy-retrieval-agent["Policy retrieval agent"]
  policy-retrieval-agent["Policy retrieval agent"] --> rag-vector-database["RAG vector database"]
  policy-retrieval-agent["Policy retrieval agent"] --> reasoning-step["Reasoning step"]
  reasoning-step["Reasoning step"] --> guardrail-checks["Guardrail checks"]
  guardrail-checks["Guardrail checks"] --> customer-banking-chatbot["Customer banking chatbot"]
  tracing-system["Tracing system"] --> intent-classification-agent["Intent classification agent"]
  tracing-system["Tracing system"] --> customer-account-api["Customer account API"]
  tracing-system["Tracing system"] --> policy-retrieval-agent["Policy retrieval agent"]
  tracing-system["Tracing system"] --> reasoning-step["Reasoning step"]
  tracing-system["Tracing system"] --> guardrail-checks["Guardrail checks"]
  tracing-system["Tracing system"] --> evaluation-pipeline["Evaluation pipeline"]
  evaluation-pipeline["Evaluation pipeline"] --> evaluation-dataset["Evaluation dataset"]
  evaluation-pipeline["Evaluation pipeline"] --> human-reviewer["Human reviewer"]
  model-selection-step["Model selection step"] --> evaluation-pipeline["Evaluation pipeline"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Customer banking chatbot Customer-facing conversational entry point for retail banking queries. Intent classification agent
Intent classification agent Classifies customer requests such as overdraft-fee waiver questions. Customer banking chatbot, Customer account API, Policy retrieval agent
Customer account API Retrieves customer account details needed for response generation. Intent classification agent
Policy retrieval agent Looks up banking policies from the RAG vector database. Intent classification agent, RAG vector database, Reasoning step
RAG vector database Stores embedded policy documents used to ground answers. Policy retrieval agent
Reasoning step Combines intent, account details, and policy retrieval into an answer decision. Policy retrieval agent, Guardrail checks
Guardrail checks Final safety/governance checks before returning an answer. Reasoning step, Customer banking chatbot
Tracing system Captures decisions, seconds, confidence, API calls, retrieval, and stale-document diagnosis. Intent classification agent, Customer account API, Policy retrieval agent, Reasoning step, Guardrail checks, Evaluation pipeline
Evaluation dataset Golden set of support-agent cases and expected answers. Evaluation pipeline
Evaluation pipeline Compares user questions and agent responses to expected answers, routes low scores to humans, and grows the dataset. Evaluation dataset, Tracing system, Human reviewer
Human reviewer Checks below-threshold responses and contributes fixes/test cases. Evaluation pipeline
Model selection step Runs models against the established evaluation dataset in week seven/eight. Evaluation pipeline

Data flow

A customer asks the banking chatbot about an overdraft fee. The agent performs intent classification, connects to the customer account through an API or database, retrieves relevant overdraft policy documents from a RAG vector database, reasons over the policy and account details, performs final guardrail checks, and responds. Traces capture each decision, timing, confidence, tool/API call, and retrieval step so failures such as stale policy documents can be diagnosed.

3 supporting quotes
“So, the agent does an intent classification, and you all you know about this because you've enabled observability, you're capturing traces”transcript, stated
“It retrieves policy documents. It checks from a rag vector database, um what is uh what is the policy around overdraft”transcript, stated
“then it does some final guardrail checks, and responds to the customer.”transcript, stated

Why this architecture

The team deliberately inverted the normal model-first POC. Evaluation, tracing, data foundations, orchestration, and governance came before model selection so the bank could measure success, diagnose production failures, and assign accountability. The architecture reflects the speaker’s five-pillar framework: evaluation, tracing, data foundation, orchestration, and governance.

3 supporting quotes
“These are the five pillars, and these are absolutely what you need to think about even before starting a project”transcript, stated
“Evaluation is basically specification for your AI system.”transcript, stated
“The key difference in this project that we when we did is that we selected the model in week seven, like in a eight weeks POC.”transcript, stated

Models used: Databricks Agent Bricks · LLM judges · retail banking chatbot model

Scale

Alternatives considered (roads not taken)

Model-first proof of concept

Rejected because: The prior POC failed because the team could not measure, trace, or assign accountability.

“no one knew why things were failing when it was in production”transcript, stated

Static one-time evaluation dataset

Rejected because: The evaluation dataset is treated as a living system that grows with production failures and fixes.

“your evaluation data set is a living system. You start with 200, maybe there is no correct number here, but once you start, as you start building in production, this is a living system.”transcript, stated

Opaque chatbot responses

Rejected because: The bank needed traces showing each decision, confidence, timing, API call, retrieval, and guardrail check.

“if you did not set up a system that helps you look visualize all of these traces, when the customer comes to you and raises a dispute”transcript, stated

Patterns

eval-driven-development (evaluation)

Evaluation is built before model selection and defines business success numerically.

“Before touching any code, before discussing about any models, any features, you have to think about when we build this system, how do we measure?”transcript, stated

observability-tracing (operations)

The system traces every agent decision, timing, confidence, API call, retrieval, and guardrail check.

“Second is how do we trace each and every decision that AI makes.”transcript, stated

rag-retrieval (architecture)

The banking agent retrieves policy documents from a RAG vector database before reasoning.

“It retrieves policy documents. It checks from a rag vector database”transcript, stated

human-in-the-loop-gate (evaluation)

Below-threshold evaluation results are checked by humans and converted into future test cases.

“if the rating is below certain threshold, you get it checked by a human.”transcript, stated

safety-policy-enforcement (governance)

The agent performs final guardrail checks before responding.

“then it does some final guardrail checks, and responds to the customer.”transcript, stated

Tradeoffs

POC sequencing

Chose Evaluation and observability first, model in week seven over Debating and selecting models at the beginning.

Rationale: Once the dataset and metrics existed, model choice became quick and evidence-based.

“Now that we had the evaluation data set, we could run different models on that data set to see the responses, compare them against the expected responses, and calculate a number on on on the accuracy”transcript, stated

Feedback handling

Chose Living evaluation dataset over One-off benchmark.

Rationale: New production failures are converted into test cases so the system catches them next time.

“Once you have done that, you add that test case in the test data set. So, that when it happens next time, the test cases cases catch them.”transcript, stated

Answer grounding

Chose Policy-document RAG plus account API calls over Uncontextualized chatbot responses.

Rationale: The agent needs account details and current policy documents to decide whether a customer claim is legitimate.

“connects to the customer database, gets the account details. It retrieves policy documents. It checks from a rag vector database”transcript, stated

Gotchas (what bit them)

Production failures were invisible without tracing.

Root cause: The failed POC lacked the ability to see why things failed in production.

Resolution: Instrument traces and measurement before launching.

“no one knew why things were failing when it was in production”transcript, stated

Stale retrieval data caused wrong customer answers.

Root cause: A changed policy document was not updated in the vector database, so embeddings did not come through.

Resolution: Use feedback drops plus traces to identify outdated retrieval documents and fix the vector database.

“the agent was looking at a policy policy document that was outdated. So the the new policy document was not updated in the vector database.”transcript, stated

Governance gaps create unclear accountability.

Root cause: Teams had not defined who owns failures, data assets, or customer-facing AI nonsense.

Resolution: Make governance one of the five production pillars before deployment.

“Who's accountable? Who do I go to when something happens at 3:00 a.m. in the morning, right?”transcript, stated

Evaluation

The rebuilt POC used a 200-case evaluation dataset from real support-agent answers, numeric deflection and accuracy targets, automated response comparison, human review below thresholds, and continuous test-case growth.

Metrics: 60% simple-query deflection · 85% accuracy · latency · operational targets · CSAT/feedback · response time

3 supporting quotes
“Then we defined the success metrics. What does success look like to you?”transcript, stated
“They needed latency, all of the operational targets that you need. They were there.”transcript, stated
“six weeks post launch, uh we we calculated the operational metrics, of course, you know, the accuracy, the deflection rate, the response time, uh the customer CSAT.”transcript, stated

Outcomes

The case reports 20,000 monthly calls, 60% simple-query deflection target, 85% accuracy target, 200 initial cases, and six-week post-launch metric review.

3 supporting quotes
“Once we had that system that can make AI visible, measurable, and accountable, that's when we started launching it to production.”transcript, stated
“the drop in C set was detected, right? Because we were getting negative feedback from customers.”transcript, stated
“when you took the other approach, you can actually uh do that in a very quick way.”transcript, stated