Bank Template
The bank template provides a complete digital banking assistant for financial institutions, enabling customers to manage accounts, transfers, payments, cards, and investments through conversational AI.
Topic: Digital Banking Assistant
This template is perfect for:
- Retail banking customer service
- Account management automation
- Payment and transfer processing
- Card services and support
- Investment inquiries
The Code
ADD TOOL "check-balance"
ADD TOOL "transfer-money"
ADD TOOL "pay-bill"
ADD TOOL "card-services"
ADD TOOL "loan-inquiry"
ADD TOOL "investment-info"
ADD TOOL "transaction-history"
ADD TOOL "open-account"
ADD BOT "fraud-detector" WITH TRIGGER "suspicious, fraud, unauthorized, stolen, hack"
ADD BOT "investment-advisor" WITH TRIGGER "invest, stocks, funds, portfolio, returns, CDB, LCI"
ADD BOT "loan-specialist" WITH TRIGGER "loan, financing, credit, mortgage, empréstimo"
ADD BOT "card-services" WITH TRIGGER "card, credit card, debit card, block card, limit"
USE KB "banking-faq"
CLEAR SUGGESTIONS
ADD SUGGESTION "balance" AS "Check my balance"
ADD SUGGESTION "transfer" AS "Make a transfer"
ADD SUGGESTION "pix" AS "Send PIX"
ADD SUGGESTION "bills" AS "Pay a bill"
ADD SUGGESTION "card" AS "Card services"
ADD SUGGESTION "history" AS "Transaction history"
ADD SUGGESTION "invest" AS "Investment options"
ADD SUGGESTION "loan" AS "Loan information"
SET CONTEXT "You are a professional banking assistant for General Bank. Help customers with accounts, transfers, payments, cards, loans, and investments. Always verify identity before sensitive operations. Be helpful and secure. Never ask for full card numbers or passwords in chat."
BEGIN TALK
**General Bank** - Digital Banking Assistant
Welcome! I can help you with:
• Account balance and statements
• Transfers and PIX
• Bill payments
• Card services
• Investments
• Loans and financing
Select an option below or tell me what you need.
END TALK
BEGIN SYSTEM PROMPT
You are a secure banking assistant.
Security rules:
- Never display full account numbers
- Mask card numbers showing only last 4 digits
- Require confirmation for transactions over $1000
- Log all sensitive operations
- Escalate fraud concerns immediately
END SYSTEM PROMPT
Sample Dialogs
These conversations show how the bank template works in real-world scenarios.
Dialog 1: Check Balance
🏦
General Bank
online
Today
Dialog 2: PIX Transfer
🏦
General Bank
online
Dialog 3: Block Lost Card
🏦
General Bank
online
Dialog 4: Fraud Detection Escalation
🏦
General Bank
online
Fraud Detector Bot joined
Keywords Used
| Keyword | Purpose |
|---|---|
ADD TOOL | Register banking operation tools |
ADD BOT | Register specialized bots with triggers |
USE KB | Load banking FAQ knowledge base |
ADD SUGGESTION | Create quick action buttons |
SET CONTEXT | Define bot behavior and security rules |
BEGIN TALK | Welcome message block |
BEGIN SYSTEM PROMPT | Security instructions for AI |
Multi-Bot Architecture
The bank template uses a multi-bot architecture for specialized handling:
| Bot | Trigger Words | Purpose |
|---|---|---|
fraud-detector | suspicious, fraud, unauthorized, stolen, hack | Handle security concerns |
investment-advisor | invest, stocks, funds, portfolio, CDB, LCI | Investment guidance |
loan-specialist | loan, financing, credit, mortgage | Loan inquiries |
card-services | card, credit card, debit card, block, limit | Card management |
Security Features
Built-in Protections
- Data Masking: Account and card numbers are always masked
- Transaction Limits: Confirmation required for large transactions
- Fraud Escalation: Automatic routing to fraud team for suspicious activity
- Audit Logging: All sensitive operations are logged
- No Sensitive Data: Never asks for passwords or full card numbers
Implementing Security Checks
' Example: Verify identity before sensitive operation
PARAM operation AS STRING
IF operation = "transfer" AND amount > 1000 THEN
TALK "For your security, please confirm your identity."
TALK "Enter the last 4 digits of your CPF:"
HEAR verification
IF NOT VERIFY_IDENTITY(verification) THEN
TALK "Verification failed. Please try again or call support."
RETURN
END IF
END IF
Customization Ideas
Add Investment Products
ADD TOOL "simulate-investment"
ADD TOOL "compare-products"
' In investment flow
products = FIND "investment_products.csv", "risk_level = 'low'"
TALK "Here are our low-risk investment options:"
FOR EACH product IN products
TALK "• " + product.name + " - " + product.rate + "% p.a."
NEXT
Add Bill Payment with Barcode
PARAM barcode AS STRING DESCRIPTION "Bill barcode or PIX copy-paste code"
IF LEN(barcode) = 47 THEN
' Boleto bancário
bill = PARSE_BOLETO(barcode)
TALK "Bill Details:"
TALK "Payee: " + bill.payee
TALK "Amount: R$ " + FORMAT(bill.amount, "#,##0.00")
TALK "Due Date: " + FORMAT(bill.due_date, "DD/MM/YYYY")
ELSE IF INSTR(barcode, "pix") > 0 THEN
' PIX QR Code
pix = PARSE_PIX(barcode)
TALK "PIX Payment: R$ " + FORMAT(pix.amount, "#,##0.00")
END IF
Add Account Statements
PARAM period AS STRING LIKE "last 30 days" DESCRIPTION "Statement period"
transactions = FIND "transactions.csv", "account_id = '" + account_id + "' AND date >= '" + start_date + "'"
TALK "📋 **Account Statement**"
TALK "Period: " + period
TALK ""
balance = 0
FOR EACH tx IN transactions
IF tx.type = "credit" THEN
balance = balance + tx.amount
TALK "➕ " + tx.description + ": R$ " + FORMAT(tx.amount, "#,##0.00")
ELSE
balance = balance - tx.amount
TALK "➖ " + tx.description + ": R$ " + FORMAT(tx.amount, "#,##0.00")
END IF
NEXT
TALK ""
TALK "**Final Balance:** R$ " + FORMAT(balance, "#,##0.00")
Related Templates
- store.bas - E-commerce with payment integration
- privacy.bas - Data protection compliance
- auth.bas - Authentication patterns