LLM4SQL is a project aimed at integrating LLMs with SQL databases. The project is in its very early stages and we are actively seeking contributors to help us build and improve it.
The main goal of LLM4SQL is to use the power of AI to assist with SQL database management and querying. We use the sqlcoder
model from hugginface generate SQL queries based on natural language prompts. This is done with the help of Ollama, which serves as the AI backend.
I'm crafting more standardised readme file which will include more info about the model
Sketching...
-
Setup basic project structure
-
Integrate
sqlcoder
model -
API endpoints for database operations
-
AI input prompting with table data
-
Frontend dahsboard for DB and tables information, AI interface and query output structure
-
Custom query execution and direct table description
-
UI Improvement
-
Move all environmental variables to .env
-
Deep integration of LLMS with database
-
Automatic error analysis and re-prompting
-
Compile frontend and backend into standalone electron project
The project is divided into two main parts: the frontend and the backend. Both parts need to be running for the application to work.
You will have to install and serve ollama in the system to support backend with SQLCoder model
ollama pull sqlcoder
ollama serve
The backend is a Node.js server that connects to the database and serves the frontend. To start the server, navigate to the backend
directory and run:
cd backend
npm start
Remember to fill in you're database credentials in backend. .env implementation is under development
cd frontend
npm start
Finally open http://localhost:3000
to open project
It's a in a very early stage of development with only some days of work as solo in this project yet.
- Select the database you want to work with from listed all available databsses
- Once database is choosen, all available tables will be listed and can be describes
- In the AI interface, select the tables you want to add to the prompt and write a prompt for any reuired sql output
- An sql query required will be generated with accuracy according to the need and that will be executed and output table will be displayed below
We welcome contributions from everyone. If you're interested in contributing, please fork the repository and make your changes. Once you're done with your changes, open a pull request for review.
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have any questions, please open an issue on the GitHub repository.
For any further inquiries or collaborations, feel free to contact me here.
We would like to thank the following contributors for their valuable contributions to this project:
- Only me for now
- Updating
Our future plans for LLM4SQL include:
- Enhancing the AI query generation capabilities
- Adding support for additional database systems
- Improving integration with LLMS
- Implementing automatic error analysis and re-prompting
- Developing advanced analytics and data visualization features
We appreciate your interest in LLM4SQL and look forward to your contributions!