snowChat  by kaarthik108

App for natural language to SQL translation against Snowflake DB

created 2 years ago
527 stars

Top 60.8% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

SnowChat is a conversational AI application designed for users to query Snowflake databases using natural language. It targets business users and analysts who need quick data access without writing SQL, offering an interactive chat interface that translates natural language into SQL queries and retrieves data.

How It Works

SnowChat employs an agent-based architecture to manage interactions and tool usage, translating natural language prompts into SQL queries using supported LLMs (GPT-4o, Gemini Flash 1.5, Claude 3 Haiku, Llama 3.2, Llama 3.1). It features conversational memory for context retention and a "self-healing SQL" capability to suggest fixes for query errors. Snowflake responses are cached using Cloudflare KV.

Quick Start & Requirements

  • Install via pip install -r requirements.txt after cloning the repository.
  • Requires Snowflake credentials (ACCOUNT, USER_NAME, PASSWORD, ROLE, DATABASE, SCHEMA, WAREHOUSE), API keys for supported LLMs, and Cloudflare credentials.
  • Schema definitions must be placed in the docs folder.
  • Run python ingest.py to create embeddings.
  • Start the Streamlit app with streamlit run main.py.

Highlighted Details

  • Supports multiple LLMs including GPT-4o, Gemini Flash 1.5, Claude 3 Haiku, and Llama 3.2/3.1.
  • Features conversational memory and self-healing SQL for improved user experience.
  • Utilizes Cloudflare KV for caching Snowflake responses.
  • Includes an agent-based architecture for managing interactions.

Maintenance & Community

The project is open for contributions via pull requests or issues. No specific community channels or notable contributors are listed in the README.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

The setup requires significant configuration of credentials and API keys. Schema ingestion and embedding creation are necessary steps before querying. The project appears to be a personal project with limited community support indicated.

Health Check
Last commit

5 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.