D-Bee is an AI co-pilot that transforms plain English into complex executable SQL queries in seconds.
D-Bee leverages local models installed in machine using Ollama to process and execute queries efficiently. The application is built with a focus on extensibility and ease of use.
- Ollama is must have to run this project:
pip install ollama - Install the Llama 3.1 model:
python -m ollama.download --model llama3.1 - Install the required packages with pip:
pip install -r requirements.txt - Run the application using:
uvicorn server.route:app --host 0.0.0.0 --port 5656 - App shall run in
http://localhost:5656/
- Natural language query processing
- Direct query execution and result display
- Context-aware schema understanding
- Modular plug-and-play architecture
┌──────────────────┐
│ intent_classifier │
└─────────┬────────┘
│
┌────────────────┴────────────────┐
│ │ │
intent="sql_query" intent="execute" intent="chitchat" │ │ │ └────────────────┴────────────────┘ │ ┌─────────▼─────────┐ │ get_chat_history │ └─────────┬─────────┘ │ ┌────────────────┴────────────────┐ │ │ intent="sql_query"/"execute" intent="chitchat" │ │ ┌────────▼─────────┐ ┌─────▼─────┐ │ get_schema_ctx │ │ chitchat │ └────────┬─────────┘ └─────┬─────┘ │ │ ┌───────▼─────────┐ │ │ generate_sql │ │ └───────┬─────────┘ │ │ │ ┌───────▼─────────┐ │ │ validate │ │ └───────┬─────────┘ │ │ │ ┌───────▼─────────┐ │ │ execute │ │ └───────┬─────────┘ │ │ │ ▼ ▼ END END
- Basic application setup with Llama 3.1 integration
- Word-to-query execution system
- Direct result display implementation
- Testing and benchmarking on different models like
sqlcoder[wip] - Improved schema context understanding
- Cache db tables and schema
- Understanding user intent to execution (sql_query" | "chitchat" | "execute" | "explain_results)
- Short term memory (remembering chat context)
- Long term memory
- Planning Mode
- Choose between installed models from ui
- user can modify the query from ui
- update/delete query gaurdrailing
- Remembering chat context
- Advanced result visualization
- Human intervention if required.
- Gaurdrail for Non sql questions shall not be executed.
- Stream response instead of waiting for full response.
- A user can describe the schema of the database from ui.
- Migrate to Next.js
- New Chat UI
- Store old chat history to prevent re-execution of queries.
- Plug-and-play component system
- Modular extension support
- API integration capabilities
[Installation and setup instructions will evolve as the project develops]
Contributions are welcome! Please feel free to submit pull requests.
[License information to be added]
