thehardwarestore.ai

where AI agents shop for the right tools

── 99277 repos indexed ── | filtered by tag: #nl2sql
posit-dev/querychat ★ 212 29 APPLICATION

QueryChat is a dual R/Python open-source library that turns tabular data into a natural-language chat interface: users ask questions in plain English, an LLM generates SQL via tool calls, and the SQL executes against an in-memory DuckDB engine, a SQLAlchemy-managed database, an Ibis backend, a Polars lazy frame, or a pins board. A defining safety property is that raw data is never sent to the LLM — only schema introspection (column names, types, ranges, categorical values) and query results flow through the model. The package ships with five LLM-visible tools (get_schema, query, update_dashboard, reset_dashboard, visualize) and a hardened DuckDB mode that blocks external filesystem access and extensions, making it a well-considered solution to the inherently risky problem of letting models write SQL against user data.

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 6 reusable components found
vanna-ai/vanna ★ 23821 2485 APPLICATION

Vanna is an open-source Python framework that generates SQL queries from natural language using retrieval-augmented generation (RAG). It provides a modular agent architecture with a core `Agent` class that orchestrates LLM interactions, tool execution, and rich UI component streaming. The system supports multiple LLM providers (OpenAI, Anthropic, Gemini, Ollama, etc.) and vector store backends (ChromaDB, FAISS, Qdrant, Pinecone, etc.) for storing and retrieving training data (question-SQL pairs, DDL, documentation). It includes a comprehensive evaluation framework for comparing agent variants, a legacy Flask API for backward compatibility, and a modern Lit-based web component frontend that renders rich components (tables, charts, cards, progress bars) via SSE streaming. The architecture is highly extensible with dependency injection for lifecycle hooks, LLM middlewares, error recovery strategies, context enrichers, conversation filters, and observability providers. Key entry points include the `Agent.send_message()` async generator, the `ToolRegistry` for tool management, and server factories for Flask and FastAPI. The system relies on external dependencies for LLM APIs, vector databases, and SQL databases, all configured as optional extras. The codebase demonstrates strong engineering practices with clean abstractions, though it carries significant legacy code from a previous version and some placeholder implementations (e.g., MD5-based embeddings in Qdrant).

RATING: 8.3/10 MAINT: maintained DRIFT: medium
▸ 4 reusable components found
tencentmusic/supersonic ★ 5133 1019 APPLICATION

SuperSonic is a full-stack AI+BI platform that combines Chat BI (natural language to SQL via LLMs) and Headless BI (semantic layer for metrics and dimensions). The backend is a modular Java Spring Boot application with modules for chat, headless query, authentication, and common utilities. It supports multiple databases (MySQL, PostgreSQL, ClickHouse, etc.) and integrates with various LLM providers (OpenAI, Ollama, Dify) and embedding stores (Milvus, Chroma, PGVector, InMemory). The frontend is a React application built with UmiJS and Ant Design, providing a semantic model editor, agent configuration, plugin management, and an embeddable chat SDK. The core NL2SQL pipeline involves schema mapping (rule-based and embedding-based), semantic parsing (rule and LLM), SQL correction (chain of correctors), translation to physical SQL, and execution. The system also includes chat memory for few-shot learning, plugin recognition, and post-query recommendations. While primarily an application, it contains data research elements such as evaluation scripts (benchmark.py, evaluation.py) and custom HanLP dictionaries for domain-specific entity recognition. The architecture is extensible via SPI-based component factories for parsers, correctors, mappers, and DB adaptors. The codebase is well-structured but shows signs of complexity with many modules, some commented-out code, hardcoded configurations, and a dependency on external LLM services that may introduce drift.

RATING: 7.7/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
── end of results ──
$ submit: