Skip to content

Architecture

Understand the design, data flow, and production topology of the DBN Analytics POC API.

  • Overview

    Current POC system diagram (FastAPI + ChromaDB + SQLite), API surface table, and full /chat/ask sequence diagram.

  • DBN Production Setup

    Full Mermaid reconstruction of the DBN-approved Azure architecture. MS SQL Server migration guide, security layer, and production checklist.

  • RAG Pipeline

    How Vanna retrieves training context from ChromaDB and generates SQL using OpenAI GPT-4o.

  • Data Model

    Full schema reference for the msmeloans table — 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"])