End-to-end 2-stage LLM post-training pipeline (QLoRA SFT + DPO) aligning open-source code models for production-safe, index-optimized Text-to-SQL with live SQLite execution benchmarking and a modern FastAPI dashboard.
The Enterprise SQL Assistant is a production-grade post-training and alignment engine that combines 4-bit QLoRA with DPO alignment. It is presented as a tool for generating SQL from natural language requests against defined database schemas. The site offers two schema options: an E-Commerce SaaS schema covering orders and customers, and a General Ledger schema for fiscal accounts. Users enter a natural language request and can use quick test scenarios to generate aligned SQL. The interface compares a base or unaligned model against a DPO aligned policy, labeling the base output as an anti-pattern and the aligned output as production safe and sargable and indexed. Reported DPO alignment highlights include an execution pass rate of 100.0% versus 83.3% and a query latency delta of 3.1x faster. A live in-memory SQLite execution sandbox allows users to execute the aligned query and view an EXPLAIN QUERY PLAN diagnostic, with status messages indicating whether a query has been run.