A financial chatbot that could only give Legal-approved answers
Generative AI could not be trusted with a regulated client, so every answer the bot could serve was pre-approved — while it still had to understand, clarify and guide.
Figures from the TELUS Digital case study.
A few days after earning my first Generative AI certification, a colleague mentioned a client looking for an AI chatbot for its website. The requirements were unusually demanding: responses had to be controlled, rich website content had to appear inside answers, business rules were strict, and conversation flows needed to be guided.
Existing products did not fit. While the team researched the market, I started a proof of concept using public content from the client's website. At the same time, frontend colleagues began building the chatbot interface from the design team's work.
Within two weeks the POC validated the client's main requirements. It also showed that chatbot responses could include reusable AEM components — images, teasers and buttons — making the experience scalable and aligned with the existing website platform.
The more we learned about the client's situation, the clearer the real challenge became. This was a financial company. Prompting could reduce hallucinations in GPT-3.5, but it could not remove the risk. A chatbot generating its own wording was not acceptable.
So the core idea changed: the chatbot would not freely generate answers. Every answer it could deliver had to be approved by the client's Legal team. Yet it still had to understand what users meant, retain context, ask clarifying questions and guide them to the correct approved answer.
The initial direction came from the POC and became a broader team implementation, with contributions across data science, frontend and software engineering. We used RAG to retrieve candidate answers from a database built from the client's existing content. An LLM then evaluated which retrieved answer best fit the user's message and the conversation context.
Plain RAG was not enough. Different financial products often had similar information, so the embedding space contained significant overlap. We built validation scripts to understand that problem, then refined the approach with contextual query rewriting, multiple question phrasings for every approved answer, disambiguation flags, a context agent that switched to pre-approved clarifying questions, and dataset validation tools with visual reports for the client.
The context agent could use LLM calls, database lookups and live APIs requiring real-time verification. It acted like an interviewer when a question could not be safely resolved immediately, moving the user through controlled decision-tree-like flows.
The solution ran as a microservice connected to AEM, where the interface and response rendering were implemented. I led the chatbot work from the original concept through the overall solution design, while the implementation evolved through the team's shared technical work and validation efforts.
A second challenge was making thousands of approved questions, answers, flows and response components manageable for content authors. I conceived and implemented the AEM integration and content-management approach, representing the data and relationships through AEM Content Fragments.
Direct editing of that data could easily lead to duplicates or outdated content — an important legal risk. To solve it, I worked with the frontend and backend teams on a custom author dashboard with intelligent search for similar content, chatbot simulations after changes, full dataset evaluations, and versioned promotion between environments including rollback and tracking.
The chatbot also needed a safe way to involve a person. For cases involving private account information or questions it could not satisfy, I built an integration with the client's existing call-center tools. When agents were available, users could transition to a human agent in the same interface, and the agent received the previous conversation and a short summary.
The project supported the launch of a new brand created from the merger of two companies. At a time when customers had many questions about their accounts, the chatbot was used five times more than site search, and only 6% of conversations required human escalation.
The lesson for me was that a good AI solution in a regulated environment is not defined by how freely it generates text. It is defined by how well it combines approved content, contextual understanding, validation, controlled flows and a clear route to human support.
See the decision path
A compact version of the conversation and the logic behind each answer. Pick an account type to follow how an approved response is selected.