Amazon Lex — Banking Chatbot with Custom Slots
Built "BB, the Banking Bot" in Amazon Lex — from a first welcome intent and tuned fallback handling through to a CheckBalance intent with a custom accountType slot and date-of-birth verification before any balance is returned.
Business value
For retail banking service teams and customers, this prototype shifts repetitive greeting and balance enquiries toward secure self-service. It demonstrates automated handling across two core intents, captures account context, and introduces date-of-birth verification before sensitive information is returned.
The problem
Bank customers ask the same handful of questions in endlessly different wording. A rigid command-driven bot fails on typos and natural phrasing, and a bot that answers balance questions without verifying identity is a security problem.
What I built
- 01
Created the Lex bot from scratch with an IAM role carrying basic permissions, then added English (US) with a chosen voice.
- 02
Set the intent classification confidence threshold to 0.40, so the bot only answers when it is at least 40% sure it understood.
- 03
Built a WelcomeIntent with multiple greeting utterances and a friendly branded response.
- 04
Replaced Lex's random fallback retries with ordered, escalating prompts — "Hmm, could you try rephrasing that?", then "In a few words can you repeat your query?" — so failed turns feel human rather than repetitive.
- 05
Added a CheckBalance intent trained on natural phrasing such as "What's my {accountType} balance?" and "How much is in my {accountType}?".
- 06
Created a custom accountType slot type with Checking, Savings and Credit values, plus synonyms (visa, mastercard, amex, american express) so real-world wording resolves correctly.
- 07
Configured slot elicitation order and prompts, escalating from "Which account — Checking or Savings?" to a clarifying retry.
- 08
Added a dateOfBirth slot using AMAZON.Date as a verification step before any balance is disclosed.
- 09
Tested end to end in the Lex test window and used Inspect to confirm slot values and intent fulfilment in the JSON input/output.
Project stages
01 / 08
Stage 01 — adding English (US) to the bot with a chosen voice and the intent classification confidence threshold set to 0.40.