# XGenerationLab/XiYan-SQL

A MULTI-GENERATOR ENSEMBLE FRAMEWORK FOR NATURAL LANGUAGE TO SQL

Repository: https://github.com/XGenerationLab/XiYan-SQL
Canonical: https://ross.abutalabs.com/products/xiyan-sql
License: Apache-2.0
License Family: permissive
Last push: 2026-05-18T11:19:51+00:00

## Health v2 (maintenance only)
Score: 59/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 83, release rhythm 35, longevity 47
- inputs: {"age_days": 659, "days_push": 107, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1019, forks 52 (observed 2026-08-28T04:03:15.078185+00:00)

## What it is
XiYan-SQL is a multi-generator ensemble framework for converting natural language questions into SQL queries, achieving SOTA results on benchmarks like BIRD-CRITIC. It includes a training framework for SQL/general LLMs and companion tools such as the XiYanSQL-QwenCoder models, M-Schema, and an MCP server.

## Use cases
- convert natural language questions into SQL queries
- build a text-to-SQL chatbot over a relational database
- fine-tune an LLM for SQL generation
- evaluate and benchmark text-to-SQL models on BIRD and BIRD-CRITIC
- serve natural-language-to-SQL via an MCP server for secure data access

## When to choose
- you need state-of-the-art text-to-SQL accuracy with ensemble generation
- you want to train or fine-tune a SQL-capable LLM
- you need a natural language interface over SQL databases with local model support

## When to avoid
- you need a simple no-code BI tool rather than a developer framework
- your project does not involve SQL databases or LLMs
- you require a turnkey hosted product with no setup

## Facets
- artifact type: framework
- maturity: active
- function: llm-inference, rag, machine-learning, llm-training, sdk
- domain: large-language-models, databases, artificial-intelligence
- platform: python, cross-platform
- tags: text-to-sql, nl2sql, ensemble-framework, sql-generation, mcp-server, benchmark-sota, natural-language-processing

## Member repositories
- XGenerationLab/XiYan-SQL (main) score 59

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:15.078185+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:09:21.371251+00:00, confidence not recorded.
  - readme: https://github.com/XGenerationLab/XiYan-SQL (fetched 2026-08-28T04:03:15.078185+00:00, sha 81bd57905647)
- Data as of 2026-08-30T08:39:29.467469+00:00.
