[논문 리뷰] Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLs
Bird는 대규모 크로스 도메인 Text-to-SQL 벤치마크로, 큰 값, 노이즈가 있는 데이터, 외부 지식 grounding, 그리고 실행 효율성에 초점을 맞추며, 현재 SOTA LLM이 인간의 성능에 크게 뒤처진다는 것을 보여준다.
Text-to-SQL parsing, which aims at converting natural language instructions into executable SQLs, has gained increasing attention in recent years. In particular, Codex and ChatGPT have shown impressive results in this task. However, most of the prevalent benchmarks, i.e., Spider, and WikiSQL, focus on database schema with few rows of database contents leaving the gap between academic study and real-world applications. To mitigate this gap, we present Bird, a big benchmark for large-scale database grounded in text-to-SQL tasks, containing 12,751 pairs of text-to-SQL data and 95 databases with a total size of 33.4 GB, spanning 37 professional domains. Our emphasis on database values highlights the new challenges of dirty database contents, external knowledge between NL questions and database contents, and SQL efficiency, particularly in the context of massive databases. To solve these problems, text-to-SQL models must feature database value comprehension in addition to semantic parsing. The experimental results demonstrate the significance of database values in generating accurate text-to-SQLs for big databases. Furthermore, even the most effective text-to-SQL models, i.e. ChatGPT, only achieves 40.08% in execution accuracy, which is still far from the human result of 92.96%, proving that challenges still stand. Besides, we also provide an efficiency analysis to offer insights into generating text-to-efficient-SQLs that are beneficial to industries. We believe that BIRD will contribute to advancing real-world applications of text-to-SQL research. The leaderboard and source code are available: https://bird-bench.github.io/.
연구 동기 및 목표
- 학술적인 Text-to-SQL 벤치마크와 대규모이면서 노이즈가 많은 실제 애플리케이션 간의 격차를 해소한다.
- 데이터베이스 값, 외부 지식, 실행 효율성에 중점을 둔 대규모 벤치마크(Bird)를 도입한다.
- 현재 모델의 한계를 밝히고 향후 연구를 이끄는 평가 지표와 기준선을 제공한다.
제안 방법
- 37개 도메인에서 95개 데이터베이스에 걸쳐 12,751개의 text-to-SQL 쌍(Curation: 33.4 GB)을 수집한다.
- 주석 수정을 돕기 위한 Database Description Files와 외부 지식 증거 카테고리를 개발한다.
- ground-truth SQL을 얻고 타당성을 확보하기 위한 이중 맹검(SQL 주석) 과정을 사용한다.
- Valid Efficiency Score(VES)를 정의하여 SQL의 실행 타당성과 효율성을 공동으로 평가한다.
- 지식이 있는(w/ knowledge) 설정과 지식이 없는(w/o knowledge) 설정에서 T5 모델을 이용한 미세조정(FT)과 LLM(ChatGPT, Claude-2, GPT-4 등)의 in-context learning(ICL)을 평가한다.
- Bird를 Spider와 WikiSQL과 비교하여 큰 값과 노이즈로 인한 난이도 증가를 설명한다.
실험 결과
연구 질문
- RQ1LLMs가 노이즈가 있는 대규모 데이터베이스를 대상으로 Text-to-SQL 작업에서 일반화할 수 있는가?
- RQ2외부 지식 grounding과 실행 효율성이 실제 대규모 데이터베이스에서 Text-to-SQL 성능에 미치는 영향은 무엇인가?
- RQ3Bird에서 현재 SOTA 모델(LLMs)과 인간 성능 간의 격차와 원인은 무엇인가?
- RQ4이중 맹검 SQL 주석, 지식 증거와 같은 다양한 주석 및 평가 설정이 벤치마크 결과에 어떤 영향을 미치는가?
주요 결과
- Bird는 37개 도메인에 걸쳐 95개 데이터베이스(33.4 GB)에서 12,751개의 예제를 포함하고 있어 실제 세계의 가치 문제를 강조한다.
- 가장 강력한 LLM(GPT-4)조차도 실행 정확도가 54.89%에 불과하며 인간 성능(92.96%)에 크게 미치지 못한다.
- 외부 지식 증거가 난이도 수준에 관계없이 모델 성능을 현저히 향상시킨다.
- 지식 grounding, 데이터베이스 값 이해, 쿼리 효율성은 실제 세계의 Text-to-SQL 성공에 중요하다.
- 의미 해석 파싱 후 SQL 최적화의 2단계 최적화는 평균 약 77.75%의 시간 절약을 제공하면서도 결과를 보존할 수 있다.
- Chat-with-Database 및 인덱스 튜닝은 SQL 쿼리에 최대 약 87.3%의 시간 절감을 가져올 수 있다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.