AI & AutomationImplemented & Sandboxed (Python / FastAPI)

Prompt BI — Natural-Language Analytics

Natural-language query engine over relational SQL with AST security sandboxing & explainable charts

ReactFastAPISQLAlchemyText-to-SQLAST Validation

The Problem

Business and executive teams face multi-day turnaround lags waiting for data teams to hand-write routine operational SQL queries.

Engineering Approach

Engineered an AST-sandboxed Natural Language to SQL translation pipeline that validates table relationships, clamps query limits, and renders audited visualizations.

What I Built & My Contribution

Constructed natural-language analysis workspace with database schema metadata injection, SQL AST validation, and interactive dashboard components.

Architecture & Data Pipeline

Natural Language Prompt → Schema Metadata Context → LLM SQL Generation → AST Security Linter → Read-Only Execution → Plotly Charts

System Architecture
[ Natural Language Question ]
            │
            ▼
┌───────────────────────────────┐
│    Prompt & Schema Context    │
│   - Injected Schema Metadata  │
│   - Read-Only User Constraint │
└───────────────┬───────────────┘
                │
                ▼
┌───────────────────────────────┐
│   AST Security SQL Validator  │
│   - Blocks DROP/UPDATE/DELETE │
│   - Enforces LIMIT Clamping   │
└───────────────┬───────────────┘
                │
                ▼
[ Read-Only Replica DB ] ──► [ Plotly Charts & Summaries ]

Verified Outcomes & Metrics

100% read-only AST safety validation; zero manual SQL required for routine queries; real-time explainable query outputs.

Verified Implementation

The application wires authentication, query rate limiting, error handlers, read-only constraints, and dashboard WebSockets. Verification here represents code audit and local inspection, distinguishing functional code paths from external cloud provider accounts.

Boundaries & Known Limitations

Connector presence does not guarantee live cloud database access or 100% LLM query correctness. Self-hosted database configuration is required.