Development Bank of Nigeria · RC 1215724
DBN Analytics ¶
RAG-powered Natural Language to SQL for MSME Loan intelligence.
Ask plain-English questions. Get structured data and chart code back — instantly.
...Financing Sustainable Growth
FastAPI Vanna AI OpenAI GPT-4o ChromaDB Azure Ready MS SQL Server
How It Works¶
→
→
→
→
By the Numbers¶
Explore the Docs¶
-
Getting Started
Install dependencies, set your OpenAI API key, and run your first query in under 2 minutes.
-
Architecture
Understand the layered FastAPI design, the RAG pipeline, and the approved DBN Azure production topology.
-
API Reference
Detailed documentation for all Chat and Training endpoints, request/response schemas, and error codes.
-
Training & Retraining
Learn how to bootstrap ChromaDB, add verified SQL examples, and continuously improve accuracy over time.
-
Azure Deployment
Step-by-step guides for Container Apps, App Service, AKS — with full GitHub Actions CI/CD pipelines.
-
Fly.io Deployment
Containerised, secrets-managed, HTTPS-enforced deployment in minutes using
fly deploy.
Dataset Overview¶
The underlying msmeloans table holds ~11,000 MSME loan records across 40 columns sourced from the DBN data warehouse:
| Category | Key Columns | Description |
|---|---|---|
| Demographics | Gender, State, BirthDate, age_group |
Borrower personal details |
| Loan Details | AmountGranted, Tenor, Rate, ScheduleType |
Core loan terms |
| Business Profile | Sector, NatureOfBusiness, MSMEAnnualTurnover |
Business classification |
| Risk Signals | pred_default_prob, risk_score, risk_category |
ML-generated risk metrics |
| PFI | PFI ID, ES_Rating, FirstTimeAccessToCredit |
Lender & credit history flags |
Live Query Example
Send this to POST /api/v1/chat/ask and get back structured data + a Plotly chart: