Coder Social home page Coder Social logo

ashish-abraham / quereydb Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 3.29 MB

RAG (Retrieval Augmented Generation) and vector search to translate natural language into SQL queries for PostgreSQL databases.

Python 100.00%
ai llm machine-learning mistral mistralai postgresql qdrant qdrant-vector-database rag retrieval-augmented-generation sql vector-database bert-embeddings

quereydb's Introduction

QueReyDB

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.

Table of Contents

Overview

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.

Features

  • 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.

Workflow

Installation


Prerequisite

  • Python3
  • GPU support for Mistral-7B LLM

  1. Clone the repository:

    git clone https://github.com/your-username/QueReyDB.git
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Set up the PostgreSQL database connection by using a cloud-hosted service or PGAdmin locally.

Usage

  • Start the QueReyDB application:

    streamlit run app.py
  • Open the web interface in your preferred browser.

Contributing

  • Create a branch for your changes.
  • Open a pull request.

quereydb's People

Contributors

ashish-abraham avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.