Python RAG framework for SQL generation
Top 2.3% on sourcepulse
Vanna is an open-source Python RAG framework designed to enable users to interact with SQL databases using natural language. It targets data analysts, engineers, and business users who need to query data without writing SQL, offering accurate text-to-SQL generation and visualization capabilities.
How It Works
Vanna employs a Retrieval-Augmented Generation (RAG) approach. It first "trains" a model by ingesting database schema (DDL), documentation, and existing SQL queries. This information is stored in a vector database. When a user asks a question, Vanna retrieves relevant schema and documentation context from the vector store and uses it to prompt a chosen Large Language Model (LLM) to generate an accurate SQL query. This RAG method is advantageous for portability across LLMs, ease of data updates, cost-effectiveness compared to fine-tuning, and future-proofing.
Quick Start & Requirements
pip install vanna
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
3 months ago
Inactive