vanna-ai/vanna

🤖 Chat with your SQL database 📊. Accurate Text-to-SQL Generation via LLMs using Agentic Retrieval 🔄.

View on GitHub ↗Jump to charts ↓

vanna-ai/vanna has 23k+ stars and 2.5k+ forks on GitHub, is written in Python, and was last pushed on Feb 2, 2026. Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 40 minutes ago
Added to GitGenius on November 2nd, 2025
Created on May 13th, 2023
Open Issues & Pull Requests: 289 (+0)
GitHub issues: Enabled
Number of forks: 2,538
Total Stargazers: 23,817 (+0)
Total Subscribers: 3 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 4.1 days
Mean response time: 52.7 days
90th percentile: 159.1 days
Tracked items: 256

Maintainer activity

2 people did triage or write work on this repository in the last 12 months.

Counts unlabeled, assigned, unassigned, milestoned, demilestoned, locked, unlocked over the last 12 months. These are issue and pull request events that require triage or write permission. Commits and code review are not counted. labeled and renamed are excluded because GitHub issue forms record the issue author as the actor. Figures from October 11, 2026. This count is not comparable across projects: each project's automation decides which of these events a person emits. How this is counted.

How this project is maintained

Roughly one issue in three opened in the past year never receives a reply. 100% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. 100% of tracked open issues have had no activity in three months, so the open count overstates what is actively being worked. Only 41% of issues opened in the past year have been closed. Three people close 58% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 209
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 414 days
Stale 30+ days: 209
Stale 90+ days: 209

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (161)
  • enhancement (12)
  • documentation (2)
  • question (1)

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

Vanna AI is an innovative open-source Python library designed to bridge the gap between natural language and SQL, enabling users to query databases using plain English. At its core, Vanna aims to democratize data access by providing a robust, customizable, and highly accurate framework for text-to-SQL generation. Unlike generic large language model (LLM) approaches, Vanna emphasizes training on *your specific database schema and data*, ensuring that the generated SQL is not only syntactically correct but also semantically relevant to your unique business context. This focus on tailored learning is what sets Vanna apart, making it a powerful tool for empowering non-technical users to extract insights directly from their data.

The operational workflow of Vanna revolves around a crucial training phase that builds a "semantic cache." Users initiate this by providing Vanna with essential metadata about their database. This includes Data Definition Language (DDL) statements to understand the schema, natural language documentation for tables and columns, and, most importantly, example SQL queries paired with their corresponding natural language questions. Through methods like `vn.train()`, Vanna ingests this information, creating a rich knowledge base that the underlying LLM can leverage. This comprehensive training ensures that when a user asks a question, Vanna has the necessary context to generate highly accurate and database-specific SQL, moving beyond generic interpretations.

Once trained, Vanna transitions into its inference phase. When a user poses a question in natural language using `vn.generate_sql()`, Vanna intelligently combines the user's query with the contextual information stored in its semantic cache. It then passes this enhanced prompt to a configured LLM, which can be any of a wide range of providers like OpenAI, Anthropic, or Mistral. The LLM, guided by the specific database schema and examples it was trained on, generates the appropriate SQL query. Vanna is database-agnostic, meaning it can connect to virtually any SQL database, and it offers an optional `vn.run_sql()` method to directly execute the generated query and return the results, streamlining the entire data retrieval process.

A key differentiator and strength of Vanna is its emphasis on continuous improvement and a robust feedback loop. If a generated SQL query is incorrect, users can easily provide the correct version and retrain Vanna with this new information. This self-correction mechanism allows Vanna to learn from its mistakes and progressively enhance its accuracy over time, adapting to evolving data structures and business logic. Furthermore, Vanna offers ready-made integrations for various frontends, including Jupyter notebooks, Streamlit applications, Flask web apps, and even Slack bots, making it highly versatile for deployment in diverse environments and accessible to a broad user base.

Ultimately, Vanna AI delivers significant benefits by democratizing data access and reducing the reliance on specialized data teams for routine queries. It empowers business analysts, product managers, and other non-technical stakeholders to independently explore data, accelerating decision-making and fostering a more data-driven culture. By providing a customizable, accurate, and continuously learning text-to-SQL solution, Vanna stands as an invaluable tool for any organization looking to unlock the full potential of its data by making it accessible through the most intuitive interface: natural language.