Architecture¶
Understand the design, data flow, and production topology of the DBN Analytics POC API.
-
Current POC system diagram (FastAPI + ChromaDB + SQLite), API surface table, and full
/chat/asksequence diagram. -
Full Mermaid reconstruction of the DBN-approved Azure architecture. MS SQL Server migration guide, security layer, and production checklist.
-
How Vanna retrieves training context from ChromaDB and generates SQL using OpenAI GPT-4o.
-
Full schema reference for the
msmeloanstable — all 40 columns across demographics, loan details, business profile, and risk signals.
Architecture at a Glance¶
flowchart LR
A(["User Question"]) --> B["FastAPI\n/api/v1/chat/ask"]
B --> C[("ChromaDB\nVector Store")]
C -->|"top-10 context"| B
B --> D["OpenAI\nGPT-4o"]
D -->|"SQL"| B
B --> E[("Database\nSQLite → Azure SQL")]
E -->|"DataFrame"| B
B --> F(["JSON + Plotly\nResponse"])