patrickNLP's picture
Update README.md
1d90b77 verified
metadata
license: cc-by-sa-4.0
language:
  - en
tags:
  - text-to-sql
  - database
  - code

BIRD-CRITIC-1.0-Flash

BIRD-Critic is the first SQL debugging benchmark designed to answer a critical question: Can large language models (LLMs) fix user issues in real-world database applications?
Each task in BIRD-CRITIC has been verified by human experts on the following dimensions:

  1. Reproduction of errors on BIRD env to prevent data leakage.
  2. Carefully curate test case functions for each task specifically.
    • Soft EX: This metric can evaluate SELECT-ONLY tasks.
    • Soft EX + Parsing: This metric can evaluate tasks with user specific requirements or refinements.
    • Test Case: For DBA tasks, such as CRUD (CREAT, READ, UPDATE, DELET), test cases should be promised to evaluate the correct logic. This is also effective for user issues requiring multiple sequential SQLs to resolve.
    • Query Execution Plan: For user tasks involving efficiency improvement or runtime errors, QEP can be introduced to evaluate solution SQLs on algorithm level.
  3. Fast Eval Sandbox via PostgreSQL template & docker.
  4. Created new RDBs in different scale and professional domains.

We are releasing a lite version of BIRD-Critic, bird-critic-1.0-flash-exp, which includes 200 high-quality user issues on PostgreSQL when developing real-world applications. We curate tasks by:

  • Collecting and understanding realistic user issues.
  • Distilling problem definitions and SQL knowledge.
  • Reproducing bugs and solutions in the BIRD environment.
  • Designing test cases for evaluation.

Model Performance Results

Rank Model Name Query Management Personalization Efficiency Overall Score Level
1 o1-preview-2024-09-12 46.88 36.73 30.77 40.91 38.50 πŸ† Leading
2 deepseek-reasoner (r1) 34.38 36.73 32.31 31.82 34.00 🌟 Elite
3 gpt-4o-2024-11-20 32.81 22.45 32.31 22.73 29.00 🌟 Elite
4 o1-mini 28.13 32.65 26.15 22.73 28.00 πŸ’Ž Superior
5 deepseek-V3 28.13 30.61 26.15 22.73 27.50 πŸ’Ž Superior
6 phi-4 25.00 30.61 20.00 22.73 24.50 πŸ’Ž Superior
7 Claude-3-5-sonnet 15.63 32.65 26.15 22.73 24.00 πŸ”Έ Advanced
8 gemini-2.0-flash-exp 20.31 26.53 24.62 27.27 24.00 πŸ”Έ Advanced
9 Qwen2.5-Coder-32B-Instruct 25.00 26.53 23.08 9.09 23.00 πŸ”Έ Advanced
10 gemini-2.0-flash-thinking-exp 20.31 16.33 18.46 27.27 19.50 πŸ”Έ Advanced
11 Meta-Llama-3.3-70B-Instruct 18.75 24.49 12.31 22.73 18.50 πŸ’« Standard
12 Codestral-22B-v0.1 10.94 18.37 23.08 22.73 18.00 πŸ’« Standard
13 gemma-2-27b-it 17.19 16.33 20.00 18.18 18.00 πŸ’« Standard
14 QwQ-32B-Preview 21.88 14.29 16.92 13.64 17.50 πŸ’« Standard
15 starcoder2-15b-instruct-v0.1 10.94 16.33 16.92 4.55 13.50 πŸ’« Standard
16 DeepSeek-Coder-V2-Lite-Instruct 10.94 14.29 12.31 13.64 12.50 βšͺ Basic
17 Mixtral-8x7B-Instruct-v0.1 12.50 10.20 10.77 13.64 11.50 βšͺ Basic
18 gemma-2-9b-it 9.38 8.16 12.31 18.18 11.00 βšͺ Basic
19 Yi-1.5-34B-Chat-16K 6.25 14.29 12.31 9.09 10.50 βšͺ Basic
20 CodeLlama-34b-Instruct-hf 9.38 10.20 9.23 13.64 10.00 βšͺ Basic
21 CodeLlama-13b-Instruct-hf 10.94 12.24 4.62 9.09 9.00 βšͺ Basic
22 Mistral-7B-Instruct-v0.2 3.13 4.08 4.62 0.00 3.50 βšͺ Basic

Tier Classification (By Ranking):

  • πŸ† Leading: The Best!
  • 🌟 Elite: Top 15%
  • πŸ’Ž Superior: Top 30%
  • πŸ”Έ Advanced: Top 45%
  • πŸ’« Standard: Top 70%
  • βšͺ Basic: Bottom 30%

Instance Categories:

  • Query: Instances that involve classic retrieval operations (i.e., SELECT).
  • Management: Instances that perform database management (e.g, CREATE, UPDATE, INSERT).
  • Personalization: Instances requiring a custom approach to achieve.
  • Efficiency: Instances focused on query optimization.

Represent as issue_type in each data instance.

Dataset Details

Dataset Description

  • Curated by: BIRD Team & Google Cloud
  • License: cc-by-sa-4.0

Uses

To avoid data leakage by auto-crawling, we do not include GT solution sqls and test cases along with data. please email [email protected] or [email protected] for full set, which will be sent automatically.

Code Sources

Dataset Structure

Below is a description of the dataset fields and additional information about the structure:

  • db_id: The name of the database.
  • query: The user query is rewritten in the BIRD environment.
  • error_sql: The buggy SQL query written by the user.
  • sol_sql: The ground truth SQL solution.
  • preprocess_sql: SQL queries to run before executing the solution or prediction.
  • clean_up_sql: SQL queries to run after the test cases to revert any changes made to the database.
  • test_cases: A set of test cases to validate the predicted corrected SQL.
  • efficiency: True if this question needs optimization, measure the cost by Query Execution Plan (QEP)
  • external_data: For the external JSON data if present

Todo Lists

  • Release lite version, bird-critic-1.0-flash (200).
  • Open source code, leaderboard page.
  • Release Full bird-critic-1.0-open (600 w/ 5 dialects).
  • Release Full bird-critic-1.0-postgresql (600 pg tasks).
  • Update agent baselines.
  • BIRD-Pro v0.5
  • BIRD-CRITIC 1.5 / 2.0 on track!

Post By:

BIRD Team & Google Cloud