Natural Language → SQL Desktop Application (Offline, Local LLMs)
QueryMind is a Windows desktop application that allows users to query SQL databases using natural language.
It uses local LLMs via Ollama to convert user prompts into SQL queries, executes them on the connected database, and displays results in a chat-style interface.
🔐 Fully offline • No cloud APIs • Secure & private
- 🧠 Natural Language → SQL conversion using local LLMs
- 💬 Chat-based UI (WhatsApp-style conversation)
- ⚙️ Settings tab for:
- Database configuration (host, port, username, password, DB name)
- Local model selection (Gemma, LLaMA, etc.)
- 🔌 Supports SQL databases (PostgreSQL / MySQL)
- 🖥️ Packaged as a standalone Windows executable
- 🔐 Runs completely offline
- Chat Tab – Query & results view
- Settings Tab – Database & model configuration
➡️ Windows Executable (.exe)
Available in GitHub Releases:
👉 https://github.com/ritesh2004/QueryMind/releases/tag/version1.0.0
- Version: v1.0.0
- Size: ~60 MB
- No Python installation required
- OS: Windows 10 / 11 (64-bit)
- Ollama: Installed & added to PATH
👉 https://ollama.com - Databases Supported: PostgreSQL, MySQL
- User enters a natural language query
Example: “Show the last 10 orders” - Selected local LLM converts the query into SQL
- SQL is executed on the connected database
- Results are shown in a chat-style interface
Choosing the right LLM model is critical for accurate SQL generation.
These models are tested and known to work well for Natural Language → SQL tasks:
- gemma3:1b / gemma3:2b
- llama3 / llama3.1
- mistral
- qwen2.5
These models:
- Understand structured query patterns
- Generate valid and executable SQL
- Perform well even with schema-based prompts
- functiongemma
- It is designed for function calling, not text-to-SQL
- It does not reliably generate SQL queries
- Output is often incomplete or non-executable
❗ If you select
functiongemma, SQL generation may fail or produce invalid queries.
For best results:
- Start with
gemma3:1b(fast & lightweight) - Use LLaMA 3 or Mistral for better accuracy on complex queries
querymind/
│
├── app.py # Main application entry point
├── agent.py # LLM agent & prompt handling
├── dbManager.py # Database connection & execution
├── logo.ico # icon
├── settings.json # User config (auto-generated in AppData)
└── README.md
- No data is sent to external servers
- All LLM inference happens locally
- Database credentials are stored locally in user AppData
- No telemetry or tracking
- First launch may take a few seconds (model initialization)
- Limited to SQL databases in this version
- Windows SmartScreen warning may appear (app not code-signed)
- 📜 Query history & export
- 📊 Result visualization
- 🌐 More database engines
- 🎨 UI/UX improvements
To run from source:
pip install -r requirements.txt
python app.pyEnsure Ollama is installed and running.
- First public stable release
- Fully offline Natural Language → SQL execution
- Local LLM support via Ollama
- Chat-based UI with settings panel
- Standalone Windows executable
QueryMind-v1.0.0.exe(~60 MB)
- Windows may show SmartScreen warning (unsigned app)
- Ollama must be installed separately
- Improved SQL accuracy using schema context
- Query history
- Multi-database support
MIT License
Ritesh Pramanik Electronics & Software Engineer
🔗 Portfolio: https://ritesh-pramanik.vercel.app 🔗 LinkedIn: https://www.linkedin.com/in/ritesh-pramanik-8ba316260
Feedback, bug reports, and feature suggestions are welcome. Feel free to open an issue or submit a pull request.