NL to SQL
30 min · Desktop
Ask your database in plain English, fully on-device
Turn plain-English questions into read-only SQL against your own database, with a local model that never lets your row data leave the machine.
git clone https://github.com/tetherto/qvac-examples
cd qvac-examples/qvac-natural-language-to-sql
npm install
npm startQVAC Natural Language to SQL is an illustrative example that turns plain-English questions into SQL queries using a local Qwen3 4B model. It reads only your database schema - never your row data - to build each query, and enforces read-only execution so a generated query can't modify anything. No API keys, no cloud service, no per-token cost.
Prerequisites
Final result
This is an illustrative example, not a production QVAC product, provided "as is" - you're responsible for ensuring compliance with applicable laws and for reviewing generated queries before running them against real data. Fork it from github.com/tetherto/qvac-examples and adapt it to your own schema or model size.
MORE LLM RECIPES
Build this
Build this with the QVAC SDK
Everything here runs on-device. Grab the SDK and ship your own version.
npm install @qvac/sdk