openchatbi  by zhongyu09

AI-powered chat BI for intuitive data interaction

Created 4 months ago
443 stars

Top 67.5% on SourcePulse

GitHubView on GitHub
Project Summary

OpenChatBI is an open-source, chat-based Business Intelligence tool that leverages large language models to enable users to query, analyze, and visualize data through natural language conversations. It targets users who need data insights without direct SQL expertise, offering a conversational interface powered by LangGraph and LangChain for streamlined data analysis and SQL generation.

How It Works

This project utilizes LangGraph for orchestrating complex, multi-step agent workflows and LangChain for integrating LLM capabilities. Its core approach involves converting natural language queries into SQL statements via a Text2SQL pipeline that includes schema linking and sophisticated prompt engineering. Data visualization is handled by Plotly, while a robust data catalog management system automatically discovers and indexes database structures, supporting business explanations and prompt optimization. Additional features include time series forecasting, Python code execution for analysis, and persistent memory for conversation context.

Quick Start & Requirements

  • Primary install: pip install openchatbi or clone the repository and run uv sync.
  • Prerequisites: Python 3.11+, access to a supported LLM provider (e.g., OpenAI, Anthropic) with API keys, and Data Warehouse credentials (e.g., Presto, PostgreSQL, MySQL). Docker is optional but required for the Docker executor mode. Manual installation of SQLite development headers may be necessary on some systems.
  • Demo: Clone the repository, copy example/config.yaml to openchatbi/config.yaml, replace placeholder API keys, and run python run_streamlit_ui.py.
  • Links: Repository: github.com/zhongyu09/openchatbi.

Highlighted Details

  • Natural Language Interaction: Query and analyze data using conversational prompts.
  • Automatic SQL Generation: Converts natural language to SQL with schema linking.
  • Data Visualization: Generates intuitive visualizations using Plotly.
  • Data Catalog Management: Automatic database schema discovery and metadata indexing.
  • Time Series Forecasting: Integrated forecasting models callable as tools.
  • Code Execution: Supports Python code execution for analysis, with sandboxed options (local, restricted, Docker).
  • Persistent Memory: Conversation state management via LangGraph checkpointing.
  • Web UI Interfaces: Provides sample Gradio and Streamlit UIs.

Maintenance & Community

The project is authored by Yu Zhong (zhongyu8@gmail.com). The roadmap indicates future development of Anomaly Detection and Root Cause Analysis algorithms. No explicit community channels like Discord or Slack are mentioned.

Licensing & Compatibility

This project is released under the MIT License, which is permissive for commercial use and integration into closed-source applications.

Limitations & Caveats

Operation requires valid API keys for external LLM providers and credentials for a data warehouse. The installation of SQLite development libraries may require manual intervention on certain operating systems. The Docker executor necessitates a pre-installed and running Docker environment. Advanced features like anomaly detection are part of the future roadmap.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
3
Issues (30d)
1
Star History
28 stars in the last 30 days

Explore Similar Projects

Starred by Chaoyu Yang Chaoyu Yang(Founder of Bento), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
3 more.

DB-GPT by eosphoros-ai

0.3%
18k
AI-native data app development framework with agentic workflow
Created 2 years ago
Updated 3 days ago
Feedback? Help us improve.