Skip to content
/ nl2sql Public

Leveraging Open-Source AI Models for Natural Language to SQL Query Translation: An Implementation Using LLama

License

Notifications You must be signed in to change notification settings

mdxabu/nl2sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nl2sql: Leveraging Open-Source AI Models for Natural Language to SQL Query Translation: An Implementation Using LLama

Introduction

This project aims to leverage open-source AI models to translate natural language queries into SQL queries. The implementation utilizes the LLama model to achieve this translation effectively.

Features

  • Natural language to SQL query translation
  • Utilizes the Ollama's Llama AI model

Contributing

We welcome contributions! Please fork the repository and submit a pull request.

License

This project is licensed under the MIT License.

Contact

For any questions or feedback, please contact me at [email protected].

Warning

SQL Accuracy : The SQL generated by this tool may be inefficient, inaccurate or incomplete. Always review and test the generated code before using it. We also recommend setting up periodic audits of the generated results.

Data Sensitivity : Exercise caution when using this tool with sensitive or personal data. This framework can send information (sample rows, schema, comments etc.) from the database to LLMs, Vector Databases, etc. as part of the SQL generation pipeline. Ensure this does not violate your privacy policies and regulations. The framework may return improperly constructed SQL queries that can be exploited to gain unauthorized access or cause damage to your database. Always sanitize input parameters and validate generated SQL against known vulnerabilities.

Security Risks : Please follow the the principle of least privilege while using this framework. This framework does not handle auth and relies on you to correctly configure access control mechanisms for the environment the code will be running in, so please ensure sufficient access restrictions for the account used to run this framework to prevent unintended operations, bills etc. This framework may also auto-execute generated SQL queries for validation purposes, please ensure this is always used with read-only permissions to avoid accidental modifications to the database.

About

Leveraging Open-Source AI Models for Natural Language to SQL Query Translation: An Implementation Using LLama

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages