[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-bird-bench--BIRD-CRITIC-1":3,"tool-bird-bench--BIRD-CRITIC-1":64},[4,18,28,36,48,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":24,"last_commit_at":25,"category_tags":26,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[14,13,27],"语言模型",{"id":29,"name":30,"github_repo":31,"description_zh":32,"stars":33,"difficulty_score":24,"last_commit_at":34,"category_tags":35,"status":17},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[14,27],{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":24,"last_commit_at":42,"category_tags":43,"status":17},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[15,16,44,45,13,46,27,14,47],"视频","插件","其他","音频",{"id":49,"name":50,"github_repo":51,"description_zh":52,"stars":53,"difficulty_score":10,"last_commit_at":54,"category_tags":55,"status":17},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[13,15,14,27,46],{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":17},519,"PaddleOCR","PaddlePaddle\u002FPaddleOCR","PaddleOCR 是一款基于百度飞桨框架开发的高性能开源光学字符识别工具包。它的核心能力是将图片、PDF 等文档中的文字提取出来，转换成计算机可读取的结构化数据，让机器真正“看懂”图文内容。\n\n面对海量纸质或电子文档，PaddleOCR 解决了人工录入效率低、数字化成本高的问题。尤其在人工智能领域，它扮演着连接图像与大型语言模型（LLM）的桥梁角色，能将视觉信息直接转化为文本输入，助力智能问答、文档分析等应用场景落地。\n\nPaddleOCR 适合开发者、算法研究人员以及有文档自动化需求的普通用户。其技术优势十分明显：不仅支持全球 100 多种语言的识别，还能在 Windows、Linux、macOS 等多个系统上运行，并灵活适配 CPU、GPU、NPU 等各类硬件。作为一个轻量级且社区活跃的开源项目，PaddleOCR 既能满足快速集成的需求，也能支撑前沿的视觉语言研究，是处理文字识别任务的理想选择。",74939,"2026-04-05T23:16:38",[27,15,14,46],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":79,"owner_location":79,"owner_email":79,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":91,"forks":92,"last_commit_at":93,"license":94,"difficulty_score":95,"env_os":96,"env_gpu":97,"env_ram":98,"env_deps":99,"category_tags":107,"github_topics":79,"view_count":24,"oss_zip_url":79,"oss_zip_packed_at":79,"status":17,"created_at":108,"updated_at":109,"faqs":110,"releases":141},4347,"bird-bench\u002FBIRD-CRITIC-1","BIRD-CRITIC-1","[NeurIPS 2025 Main] SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applications","BIRD-CRITIC-1 是一个专为评估和提升大语言模型（LLM）在真实数据库环境中解决用户 SQL 问题能力而设计的开源基准测试工具。它直面当前 AI 在处理复杂、模糊的真实世界数据库故障时表现不足的痛点，不再局限于简单的文本转 SQL 任务，而是聚焦于诊断错误、调试查询以及优化现有代码全流程。\n\n该工具构建了包含 600 个开发任务和 200 个隐藏测试题的高质量数据集，覆盖 MySQL、PostgreSQL、SQL Server 和 Oracle 四大主流数据库方言。其独特亮点在于引入了“人类专家协作”视角的评估标准，不仅提供标准的测试用例，还发布了自动回复系统以支持完整数据集的获取，并记录了人类专家在使用与不使用 AI 辅助下的性能对比数据，为研究人机协作模式提供了宝贵参考。此外，项目还衍生出了针对 SQLite 的专项数据集及支持多轮对话的交互版本。\n\nBIRD-CRITIC-1 非常适合数据库研究人员、AI 算法工程师以及致力于提升代码智能体能力的开发者使用。通过这一基准，研究人员可以量化模型在真实场景下的鲁棒性，开发者则能利用其丰富的测试案例来训练和验证更强大的 SQL","BIRD-CRITIC-1 是一个专为评估和提升大语言模型（LLM）在真实数据库环境中解决用户 SQL 问题能力而设计的开源基准测试工具。它直面当前 AI 在处理复杂、模糊的真实世界数据库故障时表现不足的痛点，不再局限于简单的文本转 SQL 任务，而是聚焦于诊断错误、调试查询以及优化现有代码全流程。\n\n该工具构建了包含 600 个开发任务和 200 个隐藏测试题的高质量数据集，覆盖 MySQL、PostgreSQL、SQL Server 和 Oracle 四大主流数据库方言。其独特亮点在于引入了“人类专家协作”视角的评估标准，不仅提供标准的测试用例，还发布了自动回复系统以支持完整数据集的获取，并记录了人类专家在使用与不使用 AI 辅助下的性能对比数据，为研究人机协作模式提供了宝贵参考。此外，项目还衍生出了针对 SQLite 的专项数据集及支持多轮对话的交互版本。\n\nBIRD-CRITIC-1 非常适合数据库研究人员、AI 算法工程师以及致力于提升代码智能体能力的开发者使用。通过这一基准，研究人员可以量化模型在真实场景下的鲁棒性，开发者则能利用其丰富的测试案例来训练和验证更强大的 SQL 辅助工具，共同推动人工智能在数据工程领域的落地应用。","# BIRD-CRITIC 1.0 (SQL)  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbird-bench_BIRD-CRITIC-1_readme_98f2e5b39720.jpg\" alt=\"HKU Logo\" width=\"50\" style=\"vertical-align:middle;margin-left:10px;\"> \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbird-bench_BIRD-CRITIC-1_readme_613ff9cf74ef.png\" alt=\"Google Cloud Logo\" width=\"50\" style=\"vertical-align:middle;margin-left:10px;\">\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbird-bench_BIRD-CRITIC-1_readme_1bba279d1a3e.png\" \n       style=\"width: 30%; min-width: 100px; display: block; margin: auto; border-radius: 15px !important;\">\n\u003C\u002Fp>\n\n\n\u003Cdiv style=\"display: flex; justify-content: center; align-items: center; gap: 10px;\">\n  \u003Ca href=\"https:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby-sa\u002F4.0\u002Fdeed.en\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-CC%20By%20SA%204.0-orange.svg\" alt=\"License\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fbird-critic.github.io\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLeaderboard-2025-28a745.svg\" alt=\"Leaderboard\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-critic-1.0-flash-exp\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDataset-HuggingFace-FFD21E.svg\" alt=\"HuggingFace\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.python.org\u002Fdownloads\u002Frelease\u002Fpython-310\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.10+-teal.svg\" alt=\"Python\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fopenai\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FOpenAI-1.40+-beige.svg\" alt=\"OpenAI\">\n  \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n## News\n\n- 📢 **[2026-03-24]** We release the **BIRD-Critic GT & Test Cases Auto-Reply System**, supporting automatic delivery of full datasets (including sol_sql and test_cases) via email requests to 📧 bird.bench25@gmail.com with subject tag [bird-critic-1 GT&Test Cases].\n- 📢 **[2026-03-23]** We release [**BIRD-Critic-SQLite**](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-critic-1.0-sqlite), a dataset containing 500 high-quality user issues focused on real-world SQLite database applications.\n- 📢 **[2026-01-08]** We recently updated the evaluation code (specifically the `remove_distinct` function). Please pull the latest code from our GitHub repository.\n- 📢 **[2025-07-09]** We release the human performance scores on our [**website**](https:\u002F\u002Fbird-critic.github.io\u002F)! The scores displayed across all three leaderboards reflect human evaluators (database experts) who were allowed to use standard tools (database textbooks, official documentation, or IDEs) but not AI assistants. When another group with the same expertise was permitted to use AI tools (ChatGPT, Claude, or Gemini), the performance increased to **83.33** on Open, **87.90** on PG, and **90.00** on Flash, demonstrating the significant potential of human-AI collaboration in SQL problem-solving.\n- 📢 **[2025-06-28]** We release our paper [**SWE-SQL** (a.k.a BIRD-CRITIC)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2506.18951) on arxiv. \n- 📢 **[2025-06-09]** We release [**bird-interact-lite**](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-interact-lite), feature multi-turn conversational and agentic interaction for real-world ambiguous and challenging text-to-SQL tasks. \n- 📢 **[2025-06-08]** We release [**bird-critic-1.0-postgresql**](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-critic-1.0-postgresql), a single-dialect SQL issue debugging set with 530 complex tasks. \n- 📢 **[2025-05-30]** We are pleased to release [**LiveSQLBench-Base-Lite**](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Flivesqlbench-base-lite), featuring 18 end-user level databases and 270 tasks (180 SELECT-only, 90 Management tasks). Each task involves unambiguous and straightforward user queries grounded in external knowledge, with medium to hard complexity SQL statements.\n\n\n## 🧸 Overview\n\nBIRD-Critic 1.0 introduces a novel SQL benchmark designed to evaluate a key capability: **Can large language models (LLMs) diagnose and solve user issues within real-world database environments?**\n\nThe benchmark comprises 600 tasks for development and 200 held-out out-of-distribution (OOD) tests. BIRD-CRITIC 1.0 is built on realistic user issues across 4 prominent open-source SQL dialects: MySQL, PostgreSQL, SQL Server, and Oracle. It expands beyond simple SELECT queries to cover a wider range of SQL operations, reflecting actual application scenarios. Finally, an optimized execution-based evaluation environment is included for rigorous and efficient validation.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbird-bench_BIRD-CRITIC-1_readme_45ef0666a13a.png\" \n       style=\"width: 100%; min-width: 100px; display: block; margin: auto; \">\n\u003C\u002Fp>\n\n### ✅ Verification Process\n\nEach task in BIRD-CRITIC has been verified by human experts on the following dimensions:\n\n1) Reproduction of errors on the BIRD environment to prevent data leakage.\n2) Carefully curated test case functions for each task specifically.\n   - **Soft EX**: This metric can evaluate SELECT-ONLY tasks.\n   - **Soft EX + Parsing**: This metric can evaluate tasks with user-specific requirements or refinements.\n   - **Test Case**: For DBA tasks, such as CRUD (CREATE, READ, UPDATE, DELETE), test cases are designed to evaluate the correctness of the logic. This is also effective for user issues requiring multiple sequential SQL queries to resolve.\n   - **Query Execution Plan**: For user tasks involving efficiency improvement or runtime errors, QEP (Query Execution Plan) can be used to evaluate solution SQL queries at the algorithm level.\n3) Fast Eval Sandbox via PostgreSQL template & docker.\n4) Created new RDBs in different scales and professional domains.\n\n\n\n### 🐣 Lite Version\n\nWe 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:\n- Collecting and understanding realistic user issues.\n- Distilling problem definitions and SQL knowledge.\n- Reproducing bugs and solutions in the BIRD environment.\n- Designing test cases for evaluation.\n\n### 🦜 Open Version\n\nThe open version of BIRD-CRITIC 1.0, `bird-critic-1.0-open`, is a comprehensive benchmark that includes 570 tasks across 4 SQL dialects: MySQL, PostgreSQL, SQL Server, and Oracle. It covers a wide range of SQL operations and user issues.\n\n### Model Performance Results on BIRD-CRITIC 1.0 Open\n\n| Rank | Model Name | Score | Level |\n|------|------------|-------|-----------|\n| 1 | o3-mini-2025-01-31  | **34.50** | 🏆 Leading |\n| 2 | deepseek-reasoner (r1) | 33.67 | 🌟 Elite |\n| 3 | o1-preview-2024-09-12 | 33.33 | 🌟 Elite |\n| 4 | claude-3-7-sonnet-20250219(thinking) | 30.67 | 🌟 Elite |\n| 5 |gemini-2.0-flash-thinking-exp-01-21 | 30.17 | 🌟 Elite|\n| 6 | grok-3-beta | 29.83 | 💎 Superior |\n\n> Complete results of Open version can be found [here](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-critic-1.0-open).\n> Bird-CRITIC 1.0 Flash result can be found [here](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-critic-1.0-flash-exp\u002F)\n\n### 🕊️ Postgresql Version\n`bird-critic-1.0-pg`, is a dataset containing 530 high-quality user issues focused on real-world PostgreSQL database applications.\n\n### Agent Performance Results on BIRD-CRITIC 1.0 PG\n\n![Agent Performance](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbird-bench_BIRD-CRITIC-1_readme_88c66a1cdc0d.png)\n\n**Key Findings:**\n- Agentic workflows significantly improve LLM performance on debugging tasks through iterative environment interaction\n- SQLACT consistently outperforms ToolACT across all models, demonstrating the advantage of SQL's richer action space for handling complex debugging scenarios\n\n## 🦅 Full Sets of BIRD-CRITIC 1.0\n\nThe BIRD-CRITIC 1.0 benchmark is available in the following configurations:\n\n1.  `bird-critic-1.0-flash-exp`: A lite version consisting of 200 instances on PostgreSQL.\n2.  `bird-critic-1.0-open`: The full version containing 570 instances across MySQL, PostgreSQL, SQL Server, and Oracle.\n3.  `bird-critic-1.0-postgresql`: A 530-instance version specifically for PostgreSQL.\n4.  `bird-critic-1.0-bigquery`: A lite version containing between 100 and 200 instances for BigQuery.\n\n## 📦 Dataset Details\n\n### Dataset Description\n\n- **Database:** The complete database can be download from [the Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1nJReLrvZVVrnfgBYwwNEgYvLroPGbcPD?usp=sharing). Check the [Quick Eval](#quick-eval) section for more details.\n- **data:** Each data instance contain the following main parts:\n   - `db_id`: The name of the database.  \n   - `query`: The user query is rewritten in the BIRD environment.  \n   - `issue_sql`: The buggy SQL query written by the user.  \n   - `sol_sql`: The ground truth SQL solution.  \n   - `preprocess_sql`: SQL queries to run before executing the solution or prediction.  \n   - `clean_up_sql`: SQL queries to run after the test cases to revert any changes made to the database.  \n   - `test_cases`: A set of test cases to validate the predicted corrected SQL.\n   - `efficiency`: True if this question needs optimization, measure the cost by Query Execution Plan (QEP)\n   - `external_data`: For the external JSON data if present\n- **baseline:** The baseline code is available in the [`.\u002Fbaseline`](.\u002Fbaseline) directory.\n- **evaluation:** The evaluation code is available in the [`.\u002Fevaluation`](.\u002Fevaluation) directory.\n- **Curated by:** BIRD Team & Google Cloud\n- **License:** [cc-by-sa-4.0](https:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby-sa\u002F4.0\u002F)\n- **HuggingFace Dataset Card:** [bird-critic-1.0-flash-exp](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-critic-1.0-flash-exp)\n\n### Dataset Uses\n\nTo avoid data leakage by auto-crawling, certain fields (e.g., sol_sql, test_cases) are excluded from the public dataset. For the full dataset, please email: 📧 [bird.bench25@gmail.com](mailto:bird.bench25@gmail.com) with subject tag [bird-critic-1 GT&Test Cases], which will be sent automatically within 30 mins.\n\n\n### Use the Dataset from HuggingFace\n\nYou can download the dataset from HuggingFace using the following command:\n```bash\nfrom datasets import load_dataset\n# Load the flash version of the dataset\ndataset = load_dataset(\"birdsql\u002Fbird-critic-1.0-flash-exp\")\nprint(dataset[\"flash\"][0])\n\n# Load the open version of the dataset\ndataset = load_dataset(\"birdsql\u002Fbird-critic-1.0-open\")\nprint(dataset[\"open\"][0])\n```\n\nOr you can use the provided script to download the open version of the dataset and split it into different dialects.\n```bash\ncd baseline\u002Fdata\npython pull_data.py \\\n  --schema_path path\u002Fto\u002Fopen_schema.jsonl \\\n  --input_path path\u002Fto\u002Finput.jsonl \\ # Path to the input JSONL file (may be empty if you want to download the dataset from HuggingFace)\n  --output_folder path\u002Fto\u002Foutput_dir # output folder of the split files\n```\n\n## 💨 Quick Eval\n\n### Folder Structure\n```ultree\n.\n├── LICENSE\n├── README.md\n├── baseline\n│   ├── data\n│   ├── outputs\n│   ├── run\n│   └── src\n├── evaluation\n│   ├── docker-compose.yml\n│   ├── env\n│   ├── mssql_table_dumps\n│   ├── mysql_table_dumps\n│   ├── oracle_table_dumps\n│   ├── postgre_table_dumps\n│   ├── run\n│   └── src\n├── materials\n│   ├── ...\n└── requirements.txt\n```\n\n### Environment Setup\nTo run the baseline code you need to install the following dependencies:\n```bash\nconda create -n bird_critic python=3.10 -y\nconda activate bird_critic\npip install -r requirements.txt\n```\n\n### Generation\nYou also need to setup the model name (eg., **gpt-4o-2024-08-06**) with the API key in the `config.py` file. Then you can run the following command to generate the output:\n```bash\n# Generate the prompt\ncd baseline\u002Frun\nbash generate_prompt.sh\n\n# LLM Inference, need to set the API key in config.py\nbash run_baseline.sh\n```\nThe output will be save in the [`.\u002Fbaseline\u002Foutputs\u002Ffinal_output\u002F`](.\u002Fbaseline\u002Foutputs\u002Ffinal_output\u002F)\n\n\n### Evaluation\nWe use **docker** to provide a consistent environment for running the benchmark. To set up the environment, follow these steps:\n\n1. First download the PostgreSQL, MySQL, SQL Server and Oracle database from [the Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1nJReLrvZVVrnfgBYwwNEgYvLroPGbcPD?usp=sharing).\n2. Unzip the folder and save it in the [`.\u002Fevaluation`](.\u002Fevaluation) named with postgre_table_dumps,mssql_table_dumps, mysql_table_dumps and  oracle_table_dumps.\n3. Build the docker compose\n```bash\ncd evaluation\ndocker compose up --build\n```\n4. Interact with the database\nYou can use the `perform_query_on_{dialect}_databases()` function in the `evaluation\u002Fsrc\u002F{dialect}_utils.py` file to interact with the each database. The function will return the result of the query.\n5. Run the evaluation script inside the so_eval_env container\n```bash\ndocker compose exec so_eval_env bash\ncd run\nbash run_eval.sh \n```\nYou have to specify the dialect you want to evaluate in the `run_eval.sh` script. The options are:\n- `postgresql`\n- `mysql`\n- `sqlserver`\n- `oracle`\nThe output report file will be saved in the same folder as your input file. \nIf you want the log file for each instance, you can set the `--logging` to `true` in the `run_eval.sh` script.\n\n## 📄 Paper\nIf you find our work helpful, please cite as:\n```\n@article{li2025swe,\n  title={SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applications},\n  author={Li, Jinyang and Li, Xiaolong and Qu, Ge and Jacobsson, Per and Qin, Bowen and Hui, Binyuan and Si, Shuzheng and Huo, Nan and Xu, Xiaohan and Zhang, Yue and others},\n  journal={arXiv preprint arXiv:2506.18951},\n  year={2025}\n}\n```\n\n## 📋 Todo Lists\n\n- [x] Release lite version, bird-critic-1.0-flash (200).\n- [x] Open source code, leaderboard page.\n- [x] Release Full bird-critic-1.0-open (570 w\u002F 4 dialects).\n- [x] Release Full bird-critic-1.0-postgresql (530 pg tasks).\n- [ ] Release SIX-GYM (**S**ql-f**IX**), with 2000+ gym-like training environment.\n- [ ] Release trained agentic baseline BIRD-Fixer.\n- [ ] Update Agentic (SQL-Act) Baseline.\n\n## Created By:\nBIRD Team & Google Cloud\n","# BIRD-CRITIC 1.0 (SQL)  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbird-bench_BIRD-CRITIC-1_readme_98f2e5b39720.jpg\" alt=\"HKU Logo\" width=\"50\" style=\"vertical-align:middle;margin-left:10px;\"> \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbird-bench_BIRD-CRITIC-1_readme_613ff9cf74ef.png\" alt=\"Google Cloud Logo\" width=\"50\" style=\"vertical-align:middle;margin-left:10px;\">\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbird-bench_BIRD-CRITIC-1_readme_1bba279d1a3e.png\" \n       style=\"width: 30%; min-width: 100px; display: block; margin: auto; border-radius: 15px !important;\">\n\u003C\u002Fp>\n\n\n\u003Cdiv style=\"display: flex; justify-content: center; align-items: center; gap: 10px;\">\n  \u003Ca href=\"https:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby-sa\u002F4.0\u002Fdeed.en\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-CC%20By%20SA%204.0-orange.svg\" alt=\"License\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fbird-critic.github.io\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLeaderboard-2025-28a745.svg\" alt=\"Leaderboard\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-critic-1.0-flash-exp\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDataset-HuggingFace-FFD21E.svg\" alt=\"HuggingFace\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.python.org\u002Fdownloads\u002Frelease\u002Fpython-310\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.10+-teal.svg\" alt=\"Python\">\n  \u003C\u002FA>\n  \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fopenai\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FOpenAI-1.40+-beige.svg\" alt=\"OpenAI\">\n  \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n## 新闻\n\n- 📢 **[2026-03-24]** 我们发布了**BIRD-Critic GT & Test Cases Auto-Reply System**，支持通过邮件请求自动发送完整数据集（包括sol_sql和test_cases），邮箱地址为📧 bird.bench25@gmail.com，主题标签为[bird-critic-1 GT&Test Cases]。\n- 📢 **[2026-03-23]** 我们发布了[**BIRD-Critic-SQLite**](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-critic-1.0-sqlite)，该数据集包含500个高质量的用户问题，专注于真实的SQLite数据库应用。\n- 📢 **[2026-01-08]** 我们最近更新了评估代码（特别是`remove_distinct`函数）。请从我们的GitHub仓库拉取最新代码。\n- 📢 **[2025-07-09]** 我们在[**网站**](https:\u002F\u002Fbird-critic.github.io\u002F)上公布了人类表现分数！三个排行榜上显示的分数均来自数据库专家的人工评估，他们可以使用标准工具（如数据库教材、官方文档或IDE），但不能使用AI助手。当允许另一组具有相同专业知识的人员使用AI工具（ChatGPT、Claude或Gemini）时，性能提升至Open版的**83.33**、PG版的**87.90**以及Flash版的**90.00**，这表明人机协作在SQL问题解决中具有巨大潜力。\n- 📢 **[2025-06-28]** 我们在arXiv上发布了论文[**SWE-SQL**（又名BIRD-CRITIC）](https:\u002F\u002Farxiv.org\u002Fabs\u002F2506.18951)。\n- 📢 **[2025-06-09]** 我们发布了[**bird-interact-lite**](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-interact-lite)，该版本具备多轮对话和代理式交互功能，适用于现实世界中模糊且具有挑战性的文本转SQL任务。\n- 📢 **[2025-06-08]** 我们发布了[**bird-critic-1.0-postgresql**](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-critic-1.0-postgresql)，这是一个包含530个复杂任务的单一方言SQL问题调试数据集。\n- 📢 **[2025-05-30]** 我们很高兴发布[**LiveSQLBench-Base-Lite**](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Flivesqlbench-base-lite)，其中包含18个终端用户级别的数据库和270个任务（180个仅SELECT任务，90个管理任务）。每个任务都涉及基于外部知识的明确且简单的用户查询，SQL语句难度介于中等至困难之间。\n\n\n## 🧸 概述\n\nBIRD-Critic 1.0推出了一种全新的SQL基准测试，旨在评估一项关键能力：**大型语言模型（LLMs）是否能够在真实世界的数据库环境中诊断并解决用户问题？**\n\n该基准测试包含600个开发用任务和200个保留的分布外（OOD）测试任务。BIRD-CRITIC 1.0基于四种主流开源SQL方言中的真实用户问题构建：MySQL、PostgreSQL、SQL Server和Oracle。它不仅限于简单的SELECT查询，还涵盖了更广泛的SQL操作，以反映实际的应用场景。此外，还配备了一个优化的基于执行的评估环境，用于进行严格而高效的验证。\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbird-bench_BIRD-CRITIC-1_readme_45ef0666a13a.png\" \n       style=\"width: 100%; min-width: 100px; display: block; margin: auto; \">\n\u003C\u002Fp>\n\n### ✅ 验证流程\n\nBIRD-CRITIC中的每项任务都经过人工专家在以下几个方面的验证：\n\n1) 在BIRD环境中重现错误，以防止数据泄露。\n2) 为每项任务精心设计测试用例：\n   - **Soft EX**：此指标可用于评估仅包含SELECT语句的任务。\n   - **Soft EX + 解析**：此指标可用于评估具有特定用户需求或细化要求的任务。\n   - **测试用例**：对于DBA任务，例如CRUD（创建、读取、更新、删除），测试用例旨在评估逻辑的正确性。这对于需要多个连续SQL查询才能解决的用户问题也非常有效。\n   - **查询执行计划**：对于涉及效率提升或运行时错误的用户任务，可以通过QEP（查询执行计划）在算法层面评估解决方案SQL查询。\n3) 通过PostgreSQL模板和Docker快速搭建评估沙盒。\n4) 创建不同规模和专业领域的全新RDB。\n\n\n\n### 🐣 精简版\n\n我们发布了BIRD-Critic的精简版`bird-critic-1.0-flash-exp`，其中包括200个高质量的PostgreSQL用户问题，用于开发真实世界的应用程序。我们通过以下方式精选任务：\n- 收集并理解真实的用户问题。\n- 提炼问题定义和SQL知识。\n- 在BIRD环境中重现错误和解决方案。\n- 设计测试用例进行评估。\n\n### 🦜 开放版\n\nBIRD-CRITIC 1.0的开放版`bird-critic-1.0-open`是一个综合性的基准测试，包含570个任务，覆盖MySQL、PostgreSQL、SQL Server和Oracle四种SQL方言。它涵盖了广泛的SQL操作和用户问题。\n\n### BIRD-CRITIC 1.0 Open版模型性能结果\n\n| 排名 | 模型名称 | 分数 | 等级 |\n|------|------------|-------|-----------|\n| 1 | o3-mini-2025-01-31  | **34.50** | 🏆 领先 |\n| 2 | deepseek-reasoner (r1) | 33.67 | 🌟 精英 |\n| 3 | o1-preview-2024-09-12 | 33.33 | 🌟 精英 |\n| 4 | claude-3-7-sonnet-20250219(thinking) | 30.67 | 🌟 精英 |\n| 5 | gemini-2.0-flash-thinking-exp-01-21 | 30.17 | 🌟 精英 |\n| 6 | grok-3-beta | 29.83 | 💎 卓越 |\n\n> Open版的完整结果可在此处查看：[这里](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-critic-1.0-open)。\n> Bird-CRITIC 1.0 Flash版的结果可在此处查看：[这里](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-critic-1.0-flash-exp\u002F)\n\n### 🕊️ PostgreSQL版\n`bird-critic-1.0-pg`是一个包含530个高质量用户问题的数据集，专注于真实的PostgreSQL数据库应用。\n\n### 代理在 BIRD-CRITIC 1.0 PG 上的性能结果\n\n![代理性能](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbird-bench_BIRD-CRITIC-1_readme_88c66a1cdc0d.png)\n\n**关键发现：**\n- 代理式工作流通过迭代的环境交互，显著提升了大语言模型在调试任务中的表现。\n- SQLACT 在所有模型上均优于 ToolACT，这表明在处理复杂调试场景时，SQL 更丰富的动作空间具有明显优势。\n\n## 🦅 BIRD-CRITIC 1.0 的完整数据集\n\nBIRD-CRITIC 1.0 基准测试提供了以下几种配置：\n\n1. `bird-critic-1.0-flash-exp`：精简版，包含 PostgreSQL 上的 200 个实例。\n2. `bird-critic-1.0-open`：完整版，涵盖 MySQL、PostgreSQL、SQL Server 和 Oracle，共 570 个实例。\n3. `bird-critic-1.0-postgresql`：专为 PostgreSQL 设计的版本，包含 530 个实例。\n4. `bird-critic-1.0-bigquery`：精简版，包含 BigQuery 上的 100 至 200 个实例。\n\n## 📦 数据集详情\n\n### 数据集描述\n\n- **数据库：** 完整数据库可从 [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1nJReLrvZVVrnfgBYwwNEgYvLroPGbcPD?usp=sharing) 下载。更多详情请参阅 [快速评估](#quick-eval) 部分。\n- **数据：** 每个数据实例包含以下主要部分：\n   - `db_id`：数据库名称。\n   - `query`：用户查询在 BIRD 环境中重写的版本。\n   - `issue_sql`：用户编写的有缺陷的 SQL 查询。\n   - `sol_sql`：正确答案的 SQL 解决方案。\n   - `preprocess_sql`：在执行解决方案或预测之前需要运行的 SQL 查询。\n   - `clean_up_sql`：在测试用例之后运行的 SQL 查询，用于撤销对数据库所做的任何更改。\n   - `test_cases`：一组用于验证预测修正后的 SQL 的测试用例。\n   - `efficiency`：如果该问题需要优化，则为真；通过查询执行计划 (QEP) 来衡量成本。\n   - `external_data`：如果有外部 JSON 数据，则包含在此字段中。\n- **基线：** 基线代码位于 [`.\u002Fbaseline`](.\u002Fbaseline) 目录中。\n- **评估：** 评估代码位于 [`.\u002Fevaluation`](.\u002Fevaluation) 目录中。\n- **策划者：** BIRD 团队 & Google Cloud\n- **许可证：** [cc-by-sa-4.0](https:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby-sa\u002F4.0\u002F)\n- **HuggingFace 数据集卡片：** [bird-critic-1.0-flash-exp](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-critic-1.0-flash-exp)\n\n### 数据集用途\n\n为避免因自动爬取导致的数据泄露，某些字段（如 `sol_sql` 和 `test_cases`）未包含在公开数据集中。如需完整数据集，请发送邮件至：📧 [bird.bench25@gmail.com](mailto:bird.bench25@gmail.com)，主题标注为 [bird-critic-1 GT&Test Cases]，我们将在 30 分钟内自动发送给您。\n\n### 从 HuggingFace 使用数据集\n\n您可以通过以下命令从 HuggingFace 下载数据集：\n```bash\nfrom datasets import load_dataset\n# 加载闪存版数据集\ndataset = load_dataset(\"birdsql\u002Fbird-critic-1.0-flash-exp\")\nprint(dataset[\"flash\"][0])\n\n# 加载开放版数据集\ndataset = load_dataset(\"birdsql\u002Fbird-critic-1.0-open\")\nprint(dataset[\"open\"][0])\n```\n\n或者您可以使用提供的脚本下载开放版数据集，并将其拆分为不同的方言版本。\n```bash\ncd baseline\u002Fdata\npython pull_data.py \\\n  --schema_path path\u002Fto\u002Fopen_schema.jsonl \\\n  --input_path path\u002Fto\u002Finput.jsonl \\ # 输入 JSONL 文件的路径（如果您想从 HuggingFace 下载数据集，此路径可以为空）\n  --output_folder path\u002Fto\u002Foutput_dir # 拆分文件的输出文件夹\n```\n\n## 💨 快速评估\n\n### 文件夹结构\n```ultree\n.\n├── LICENSE\n├── README.md\n├── baseline\n│   ├── data\n│   ├── outputs\n│   ├── run\n│   └── src\n├── evaluation\n│   ├── docker-compose.yml\n│   ├── env\n│   ├── mssql_table_dumps\n│   ├── mysql_table_dumps\n│   ├── oracle_table_dumps\n│   ├── postgre_table_dumps\n│   ├── run\n│   └── src\n├── materials\n│   ├── ...\n└── requirements.txt\n```\n\n### 环境设置\n要运行基线代码，您需要安装以下依赖项：\n```bash\nconda create -n bird_critic python=3.10 -y\nconda activate bird_critic\npip install -r requirements.txt\n```\n\n### 生成\n您还需要在 `config.py` 文件中设置模型名称（例如 **gpt-4o-2024-08-06**）以及 API 密钥。然后您可以运行以下命令来生成输出：\n```bash\n# 生成提示\ncd baseline\u002Frun\nbash generate_prompt.sh\n\n# LLM 推理，需在 config.py 中设置 API 密钥\nbash run_baseline.sh\n```\n生成的输出将保存在 [`.\u002Fbaseline\u002Foutputs\u002Ffinal_output\u002F`](.\u002Fbaseline\u002Foutputs\u002Ffinal_output\u002F) 目录中。\n\n### 评估\n我们使用 **Docker** 提供一个一致的环境来运行基准测试。设置环境的步骤如下：\n\n1. 首先从 [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1nJReLrvZVVrnfgBYwwNEgYvLroPGbcPD?usp=sharing) 下载 PostgreSQL、MySQL、SQL Server 和 Oracle 数据库。\n2. 解压文件夹，并将其保存在 [`.\u002Fevaluation`](.\u002Fevaluation) 目录下，分别命名为 postgre_table_dumps、mssql_table_dumps、mysql_table_dumps 和 oracle_table_dumps。\n3. 构建 Docker Compose：\n```bash\ncd evaluation\ndocker compose up --build\n```\n4. 与数据库交互\n您可以使用 `evaluation\u002Fsrc\u002F{dialect}_utils.py` 文件中的 `perform_query_on_{dialect}_databases()` 函数与各个数据库进行交互。该函数将返回查询结果。\n5. 在 so_eval_env 容器内运行评估脚本：\n```bash\ndocker compose exec so_eval_env bash\ncd run\nbash run_eval.sh \n```\n您必须在 `run_eval.sh` 脚本中指定要评估的方言。选项包括：\n- `postgresql`\n- `mysql`\n- `sqlserver`\n- `oracle`\n评估报告文件将保存在与输入文件相同的文件夹中。如果您希望为每个实例生成日志文件，可以在 `run_eval.sh` 脚本中将 `--logging` 设置为 `true`。\n\n## 📄 论文\n如果您觉得我们的工作有所帮助，请引用如下：\n```\n@article{li2025swe,\n  title={SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applications},\n  author={Li, Jinyang and Li, Xiaolong and Qu, Ge and Jacobsson, Per and Qin, Bowen and Hui, Binyuan and Si, Shuzheng and Huo, Nan and Xu, Xiaohan and Zhang, Yue and others},\n  journal={arXiv preprint arXiv:2506.18951},\n  year={2025}\n}\n```\n\n## 📋 待办事项清单\n\n- [x] 发布精简版，bird-critic-1.0-flash (200)。\n- [x] 开源代码和排行榜页面。\n- [x] 发布完整版 bird-critic-1.0-open (570 个实例，涵盖 4 种方言)。\n- [x] 发布完整版 bird-critic-1.0-postgresql (530 个 PostgreSQL 任务)。\n- [ ] 发布 SIX-GYM (**S**ql-f**IX**)，包含 2000 多个类似健身房的训练环境。\n- [ ] 发布经过训练的代理式基线 BIRD-Fixer。\n- [ ] 更新代理式 (SQL-Act) 基线。\n\n## 创作团队：\nBIRD 团队 & Google Cloud","# BIRD-CRITIC-1 快速上手指南\n\nBIRD-CRITIC-1 是一个用于评估大语言模型（LLM）在真实数据库环境中诊断和解决用户 SQL 问题能力的基准测试工具。它支持 MySQL、PostgreSQL、SQL Server 和 Oracle 等多种方言，涵盖从简单查询到复杂 CRUD 操作及性能优化的多种场景。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**: Linux, macOS 或 Windows (需支持 Docker)\n*   **Python 版本**: 3.10 或更高版本\n*   **核心依赖**:\n    *   `conda` (推荐用于环境管理)\n    *   `docker` 和 `docker compose` (用于构建隔离的数据库评估沙箱)\n    *   `git`\n*   **API 密钥**: 如果您计划运行基线模型推理，需要准备好对应 LLM 服务商的 API Key (如 OpenAI)。\n\n## 安装步骤\n\n### 1. 克隆项目与创建环境\n\n首先克隆代码仓库并创建独立的 Python 虚拟环境：\n\n```bash\ngit clone \u003Crepository_url>\ncd BIRD-CRITIC-1\n\n# 创建并激活 conda 环境\nconda create -n bird_critic python=3.10 -y\nconda activate bird_critic\n\n# 安装 Python 依赖\npip install -r requirements.txt\n```\n\n### 2. 获取数据集\n\n公共 HuggingFace 数据集仅包含部分字段（为防止数据泄露，`sol_sql` 和 `test_cases` 等关键字段被隐藏）。\n\n**方式 A：使用 HuggingFace Lite\u002FOpen 版本（快速体验）**\n```python\nfrom datasets import load_dataset\n\n# 加载 Flash 精简版 (PostgreSQL, 200 条)\ndataset = load_dataset(\"birdsql\u002Fbird-critic-1.0-flash-exp\")\nprint(dataset[\"flash\"][0])\n\n# 加载 Open 完整版 (多 dialect, 570 条，不含完整答案)\ndataset = load_dataset(\"birdsql\u002Fbird-critic-1.0-open\")\nprint(dataset[\"open\"][0])\n```\n\n**方式 B：获取完整评估数据集（含标准答案与测试用例）**\n若需进行完整的本地评估，请发送邮件至 📧 `bird.bench25@gmail.com`，邮件主题务必标注：**[bird-critic-1 GT&Test Cases]**。系统将在 30 分钟内自动回复包含完整数据集的下载链接。\n\n### 3. 配置数据库沙箱\n\n评估过程依赖 Docker 容器运行真实的数据库实例。\n\n1.  下载完整的数据库转储文件（PostgreSQL, MySQL, SQL Server, Oracle）：[Google Drive 下载链接](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1nJReLrvZVVrnfgBYwwNEgYvLroPGbcPD?usp=sharing)。\n2.  解压下载的文件，并将文件夹重命名后移至 `.\u002Fevaluation` 目录下，结构如下：\n    *   `postgre_table_dumps`\n    *   `mssql_table_dumps`\n    *   `mysql_table_dumps`\n    *   `oracle_table_dumps`\n3.  构建并启动 Docker 环境：\n    ```bash\n    cd evaluation\n    docker compose up --build\n    ```\n\n## 基本使用\n\n### 1. 配置模型\n\n编辑 `baseline\u002Frun\u002Fconfig.py` 文件，填入您的模型名称（例如 `gpt-4o-2024-08-06`）和对应的 API Key。\n\n### 2. 生成提示词与推理\n\n进入基线运行目录，执行脚本生成 Prompt 并调用 LLM 进行推理：\n\n```bash\ncd baseline\u002Frun\n\n# 生成提示词\nbash generate_prompt.sh\n\n# 运行基线模型推理 (需确保 config.py 中已配置 API Key)\nbash run_baseline.sh\n```\n\n推理结果将保存在 `.\u002Fbaseline\u002Foutputs\u002Ffinal_output\u002F` 目录中。\n\n### 3. 执行评估\n\n在 Docker 环境运行正常且已生成模型输出后，即可运行评估脚本对比模型生成的 SQL 与标准答案（需拥有完整数据集权限）。评估逻辑位于 `.\u002Fevaluation` 目录中，支持基于执行结果（Execution Accuracy）、解析匹配及查询执行计划（QEP）的多维度打分。","某电商公司的数据分析师正急需修复一个在 PostgreSQL 生产环境中运行缓慢且结果错误的复杂库存查询脚本，该脚本涉及多表连接和动态聚合逻辑。\n\n### 没有 BIRD-CRITIC-1 时\n- 面对模糊的报错信息，分析师需花费数小时手动翻阅官方文档和教科书，逐一排查是语法错误还是逻辑漏洞。\n- 通用大模型生成的 SQL 代码往往忽略真实数据库的架构约束，导致“看似正确”但执行失败的幻觉代码。\n- 缺乏针对特定方言（如 PostgreSQL）的深度调试能力，难以定位因版本差异导致的函数兼容性问题。\n- 验证修复结果依赖人工构造测试数据，效率低下且容易遗漏边缘情况，无法确保修复后的绝对准确性。\n\n### 使用 BIRD-CRITIC-1 后\n- BIRD-CRITIC-1 直接基于真实用户问题数据集，快速诊断出脚本中特定的连接逻辑错误并提供可执行的修正方案。\n- 依托其专为 PostgreSQL 等四大主流方言训练的调试能力，生成的代码完美适配当前数据库版本，消除兼容性幻觉。\n- 内置的自动化测试用例系统立即验证修复效果，确保查询结果与预期完全一致，无需人工反复试错。\n- 将原本需要数小时的排查过程压缩至分钟级，让分析师能专注于业务逻辑优化而非底层语法纠错。\n\nBIRD-CRITIC-1 通过模拟专家级的人机协作模式，将现实世界中复杂的 SQL 故障排查从“盲目试错”转变为“精准治愈”。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbird-bench_BIRD-CRITIC-1_88c66a1c.png","bird-bench","bird_sql","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fbird-bench_54426b4a.jpg",null,"https:\u002F\u002Fbird-bench.github.io\u002F","https:\u002F\u002Fgithub.com\u002Fbird-bench",[83,87],{"name":84,"color":85,"percentage":86},"Python","#3572A5",99.5,{"name":88,"color":89,"percentage":90},"Shell","#89e051",0.5,1092,34,"2026-04-02T21:37:21","MIT",4,"Linux, macOS, Windows","未说明 (主要依赖 API 调用或本地数据库执行，无明确 GPU 训练\u002F推理需求)","未说明 (建议具备运行 Docker 容器及多数据库实例的内存)",{"notes":100,"python":101,"dependencies":102},"1. 必须安装 Docker 和 Docker Compose 以构建评估沙箱环境（包含 PostgreSQL, MySQL, SQL Server, Oracle）。2. 完整数据集需从 Google Drive 下载数据库转储文件并解压至指定目录。3. 部分敏感字段（如标准答案 sol_sql 和测试用例 test_cases）需通过邮件申请获取，以防数据泄露。4. 运行基线代码需在 config.py 中配置大模型 API Key。","3.10+",[103,104,105,106],"openai>=1.40","datasets","docker","docker-compose",[27,16,46],"2026-03-27T02:49:30.150509","2026-04-06T19:02:15.654709",[111,116,121,126,131,136],{"id":112,"question_zh":113,"answer_zh":114,"source_url":115},19772,"运行 generate_prompt.sh 时提示缺少 'preprocess_schema' 字段或找不到 jsonl 文件，该如何解决？","该问题通常是因为使用了旧版数据集或缺少特定的 schema 文件。请从 HuggingFace 下载最新的 BIRD-CRITIC-Flash 数据集（https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbirdsql\u002Fbird-critic-1.0-flash-exp\u002Ftree\u002Fmain\u002Fdata）。对于 baseline 代码，所需的 schema 文件现已更新至 baseline\u002Fdata\u002Fopen_schema.jsonl（针对 Open 版本）或 baseline\u002Fdata\u002Fflash_schema.jsonl（针对 Flash 版本）。确保脚本中引用的路径指向这些包含 'preprocess_schema' 字段的最新文件。","https:\u002F\u002Fgithub.com\u002Fbird-bench\u002FBIRD-CRITIC-1\u002Fissues\u002F2",{"id":117,"question_zh":118,"answer_zh":119,"source_url":120},19773,"数据集中的 'sol_sql'（标准答案 SQL）和测试用例在哪里可以找到？","为了防止自动爬虫导致的数据泄露，官方仓库和公开数据集中不包含 GT solution sqls 和 test cases。您需要发送邮件至 bird.bench23@gmail.com 或 bird.bench25@gmail.com 进行申请。如果发送后未收到自动回复，可能是邮件系统故障，建议重新发送请求。","https:\u002F\u002Fgithub.com\u002Fbird-bench\u002FBIRD-CRITIC-1\u002Fissues\u002F12",{"id":122,"question_zh":123,"answer_zh":124,"source_url":125},19774,"评估代码中的 'issue_sql' 和数据文件中的 'error_sql' 是同一个字段吗？","是的，'issue_sql' 和 'error_sql' 指的是同一个概念。官方已更新 BIRD-CRITIC-Flash 数据集，将字段名称统一规范为 'issue_sql'。如果您在使用旧数据，可以自行将 'error_sql' 视为 'issue_sql' 处理，或下载最新数据集以保持一致性。","https:\u002F\u002Fgithub.com\u002Fbird-bench\u002FBIRD-CRITIC-1\u002Fissues\u002F10",{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},19775,"Google Drive 链接中的文件与数据集中的 'selected_database' 列不匹配，该如何正确搭建数据库环境？","Google Drive 文件夹中包含的是构成数据库的各个表文件，而非完整的数据库文件。下载这些表后，您需要进入 evaluation 目录并运行 Docker 命令来构建和初始化数据库：\n```bash\ncd evaluation\ndocker compose up --build\n```\n具体的初始化脚本位于 evaluation\u002Fenv\u002Finit-databases_postgresql.sh，该脚本会自动处理表的导入和数据库设置。","https:\u002F\u002Fgithub.com\u002Fbird-bench\u002FBIRD-CRITIC-1\u002Fissues\u002F1",{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},19776,"baseline\u002Fexample_output 目录下不同模型文件夹中的 pg_530.jsonl 文件内容完全相同，这是正常的吗？","这通常是一个错误。如果不同模型（如 Claude, GLM, Qwen 等）的输出文件 MD5 校验码完全一致，说明这些文件是被意外复制的占位符或示例，而非各模型实际运行的结果。这会严重影响基准测试结果的可复现性。遇到此情况，建议检查官方是否已上传修正后的特定模型输出文件，或在复现实验时忽略这些示例文件，自行运行模型生成结果。","https:\u002F\u002Fgithub.com\u002Fbird-bench\u002FBIRD-CRITIC-1\u002Fissues\u002F27",{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},19777,"评估过程中的 'remove_distinct' 机制是如何工作的？为什么有时会引发错误？","'remove_distinct' 是为了减少人工标注偏差而引入的，因为在 BIRD-SQL 中约 70% 的标注差异仅在于是否使用了 DISTINCT。该函数会将查询扁平化并移除 DISTINCT 关键字以标准化评估。然而，这可能导致包含注释的查询变为空查询，或在子查询、CTE 中破坏原本依赖 DISTINCT 的语义。如果遇到此类边缘情况导致的评估错误，可能需要检查是否需要在后处理中调整该逻辑，或者理解这是为了整体执行准确率而做出的权衡。","https:\u002F\u002Fgithub.com\u002Fbird-bench\u002FBIRD-CRITIC-1\u002Fissues\u002F24",[]]