Skip to content

gd03champ/llm4sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM4SQL

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

Flowchat

Sketching...

Current Progress

  • 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

Running the 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.

Ollama Server

You will have to install and serve ollama in the system to support backend with SQLCoder model

ollama pull sqlcoder
ollama serve

Backend

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

Frontend

cd frontend
npm start

Finally open http://localhost:3000 to open project

Working with dashboard

It's a in a very early stage of development with only some days of work as solo in this project yet.

Screenshot 1 Screenshot 2

  1. Select the database you want to work with from listed all available databsses
  2. Once database is choosen, all available tables will be listed and can be describes
  3. In the AI interface, select the tables you want to add to the prompt and write a prompt for any reuired sql output
  4. 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

Contributing

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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Issues

If you encounter any issues or have any questions, please open an issue on the GitHub repository.

Contact

For any further inquiries or collaborations, feel free to contact me here.

Acknowledgements

We would like to thank the following contributors for their valuable contributions to this project:

  • Only me for now

Resources

  • Updating

Roadmap

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!

About

Bridging the Gap Between AI and SQL Databases

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published