Skip to main content
QUICK REVIEW

[논문 리뷰] Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation

Dawei Gao, Haibin Wang|arXiv (Cornell University)|2023. 08. 29.
Topic Modeling인용 수 23
한 줄 요약

논문은 LLM 기반 텍스트-투-SQL의 프롬프트 엔지니어링 벤치마크를 제시하고, DAIL-SQL을 도입하며, 토큰 효율적 프롬프트와 오픈 소스 LLM 분석을 통한 감독 학습으로 Spider 실행 정확도에서 최첨단을 보인다.

ABSTRACT

Large language models (LLMs) have emerged as a new paradigm for Text-to-SQL task. However, the absence of a systematical benchmark inhibits the development of designing effective, efficient and economic LLM-based Text-to-SQL solutions. To address this challenge, in this paper, we first conduct a systematical and extensive comparison over existing prompt engineering methods, including question representation, example selection and example organization, and with these experimental results, we elaborate their pros and cons. Based on these findings, we propose a new integrated solution, named DAIL-SQL, which refreshes the Spider leaderboard with 86.6% execution accuracy and sets a new bar. To explore the potential of open-source LLM, we investigate them in various scenarios, and further enhance their performance with supervised fine-tuning. Our explorations highlight open-source LLMs' potential in Text-to-SQL, as well as the advantages and disadvantages of the supervised fine-tuning. Additionally, towards an efficient and economic LLM-based Text-to-SQL solution, we emphasize the token efficiency in prompt engineering and compare the prior studies under this metric. We hope that our work provides a deeper understanding of Text-to-SQL with LLMs, and inspires further investigations and broad applications.

연구 동기 및 목표

  • 시스템적으로 LLM 기반 Text-to-SQL의 프롬프트 엔지니어링을 질문 표현, 예시 선택, 예시 조직 전반에 걸쳐 연구한다.
  • Text-to-SQL을 위한 맥락 내 학습 및 감독 학습에서 오픈소스 LLM의 효과를 평가한다.
  • 성능과 토큰 비용의 균형을 맞춘 통합적이고 효과적인 솔루션(DAIL-SQL)을 제안한다.
  • 토큰 효율성 기준에서 프롬프트를 비교하여 실용적인 Text-to-SQL 배포를 안내한다.

제안 방법

  • 다섯 가지 질문 표현을 조사하고 제로샷 Text-to-SQL에 대한 장단점을 식별한다.
  • 다양한 예시 선택 및 조직 전략으로 맥락 내 학습을 분석한다.
  • DAIL Selection(공동 질문-쿼리 인식 선택)과 DAIL Organization(질의-매핑을 보존하면서 토큰 비용을 줄임)을 갖춘 DAIL-SQL을 도입한다.
  • CRP로서 Code Representation Prompt를 질문 표현으로 채택하여 풍부한 스키마/키 정보 확보.
  • 텍스트-투-SQL에 대한 오픈소스 LLM의 감독 학습과 맥락 내 학습을 비교한다.
  • 토큰 효율성에 기반한 프롬프트 설계 선택을 평가하여 비용 효율적 배포를 돕는다.

실험 결과

연구 질문

  • RQ1어떤 질문 표현과 프롬프트 엔지니어링 선택이 LLM에서 Text-to-SQL의 정확도와 효율성을 최대화하는가?
  • RQ2오픈소스 LLM은 Text-to-SQL에서 맥락 내 학습 대 감독 학습에서 어떤 성능을 보이는가?
  • RQ3높은 실행 정확도를 달성하는 데 있어 프롬프트 정보 내용과 토큰 비용 사이의 트레이드오프는 무엇인가?
  • RQ4제안된 DAIL-SQL 접근 방식은 Spider 및 관련 벤치마크에서 기존의 최첨단과 어떻게 비교되는가?

주요 결과

  • DAIL-SQL은 Spider에서 86.2%의 실행 정확도를 달성하여 이전 최첨단(85.3%)을 능가한다.
  • 셀프 컨시스턴시를 사용하면 실행 정확도가 추가 계산 비용이 들지만 86.6%에 이른다.
  • 오픈소스 LLM은 특히 감독 학습과 결합될 때 Text-to-SQL에 상당한 잠재력을 보여준다.
  • 질문 표현과 조직 전략은 성능과 토큰 효율성에 결정적인 영향을 미친다.
  • 토큰 효율적 프롬프트 설계는 더 적은 토큰으로 강력한 성능을 달성할 수 있어 실용적 배치를 안내한다.

더 나은 연구,지금 바로 시작하세요

연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.