RAG (Retrieval Augmented Generation) and vector search to translate natural language into SQL queries for PostgreSQL databases.
QueReyDB is a novel solution that revolutionizes the way users interact with databases. By combining the power of natural language processing, large language models, and vector search algorithms, this project empowers users to analyze large databases using intuitive natural language queries.
Are you struggling with SQL queries and syntax? QueReyDB got you covered!
In the era of big data, efficiently querying and analyzing large databases has become crucial for data professionals. QueReyDB simplifies this process by enabling users to interact with databases using natural language queries. Leveraging the power of Mistral LLM, LangChain framework, and Qdrant vector database, QueReyDB translates natural language queries into accurate SQL queries through Retrieval Augmented Generation (RAG) and vector search techniques.
By integrating vector search capabilities, QueReyDB can retrieve relevant query-SQL pairs from a search history, improving accuracy and efficiency. As more queries are processed, the vector database grows, enhancing overall performance. QueReyDB ensures scalability, low latency, and consistent query execution, empowering users to focus on their analytical problems while it handles the complexities of SQL query generation.
- Natural Language Query Translation: QueReyDB allows users to express their analytical problems using natural language, which is then translated into efficient SQL queries.
- Vector Search Integration: The project utilizes vector search techniques to retrieve relevant query-SQL pairs from a search history, improving query translation accuracy and efficiency.
- Incremental Learning: As more queries are processed, QueReyDB's vector database grows, increasing the likelihood of finding relevant historical data for future queries and enhancing overall performance.
- Scalability and Low Latency: By leveraging vector search and reducing the load on the LLM, QueReyDB can handle a high volume of queries concurrently with low latency.
- Consistency: QueReyDB ensures consistent query execution by retrieving SQL queries from the search history for similar queries, maintaining consistency in query translation.
- Python3
- GPU support for Mistral-7B LLM
-
Clone the repository:
git clone https://github.com/your-username/QueReyDB.git
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up the PostgreSQL database connection by using a cloud-hosted service or PGAdmin locally.
-
Start the QueReyDB application:
streamlit run app.py
-
Open the web interface in your preferred browser.
- Create a branch for your changes.
- Open a pull request.