https://github.com/mdxabu/nl2sql
Leveraging Open-Source AI Models for Natural Language to SQL Query Translation: An Implementation Using LLama
https://github.com/mdxabu/nl2sql
ai-models llama ollama sql
Last synced: about 2 months ago
JSON representation
Leveraging Open-Source AI Models for Natural Language to SQL Query Translation: An Implementation Using LLama
- Host: GitHub
- URL: https://github.com/mdxabu/nl2sql
- Owner: mdxabu
- License: mit
- Created: 2024-11-22T15:25:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-16T05:44:29.000Z (about 1 year ago)
- Last Synced: 2026-02-07T22:32:22.999Z (about 2 months ago)
- Topics: ai-models, llama, ollama, sql
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 [110121104039@aalimec.ac.in](110121104039@aalimec.ac.in).
# 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.