Giter Club home page Giter Club logo

sqlbot's Introduction

SQLbot

A simple, multi-user, multi-conversation, web-based chatbot to answer questions based on database queries.

This project is evolved from https://github.com/edwardzjl/chatbot, utilizing langchain's sql agent and offers the following features:

  • Enhanced Table Descriptions: This feature provides additional table descriptions, empowering Language Model (LLM) to make more informed decisions when selecting target tables.
  • Customizable Data Definition Language (DDL, the CREATE TABLE statement): Typically, SQL agents are not able to modify the DDL of the database. However, the original DDL often contains extraneous information. Moreover, at least in Postgres, the DDL lacks the column descriptions, which are crucial for LLMs to accurately choose the appropriate columns.
  • Redis Integration: Both the supplementary table descriptions and customized DDL are conveniently stored in Redis. This approach ensures swift access and facilitates straightforward updates.

Demo

A live demo was served at https://sqlbot.agi.zjuici.com

This demo was built on IMDb dataset, with 6 tables.

Deployment

See deployment instructions

Configuration

Key Default Value Description
LOG_LEVEL INFO log level
REDIS_OM_URL redis://localhost:6379 Redis url to persist messages and metadata
ISVC_LLM http://localhost:8080 model service url
ISVC_CODER_LLM http://localhost:8081 coder model service url, used for generating and checking SQL queries
WAREHOUSE_URL postgresql+psycopg://postgres:postgres@localhost:5432/ data warehouse url, in which you want to analyze the data

sqlbot's People

Contributors

dependabot[bot] avatar edwardzjl 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.