Loading
Small Business Lending Analytics AI Agent for Business Intelligence
An AI agent that helps fintech lending teams analyze loan portfolios through natural conversation. Surface risk-pricing misalignment, measure portfolio concentration, spot approval leakage, detect early warning signals, and compare lifecycle value between repeat and first-time borrowers.
Risk Pricing Alignment
Portfolio Concentration
Approval Leakage
Early Warning Signals
Customer Lifecycle Value
Here's how the agent actually works under the hood. Each link points to the production source on GitHub.
How the agent learns the database structure
smb_loan_ai/db_schema/extractor.py
The instruction set that drives reasoning & tool use
smb_loan_ai/prompts/bi-agent-system-prompt.md
@tool methods โ run SQL, fetch schema, write debug reports
smb_loan_ai/one/one_04_agent.py
FastAPI route streaming Bedrock responses to the chat UI
api/index.py
Analyzing a synthesized SMB lending dataset modeled on a California fintech's ~2 years of operations: 10 tables, ~119K records spanning customers, applications, loans, repayment schedules, payments, and defaults.
A personal post-internship reflection โ the schema and records are reconstructed from scratch to mirror realistic production patterns. No proprietary or production data is included.