Skip to main content
QUICK REVIEW

[논문 리뷰] MCI-SQL: Text-to-SQL with Metadata-Complete Context and Intermediate Correction

Qin Qin Wang, Youhuan Li|arXiv (Cornell University)|2026. 03. 11.
Natural Language Processing TechniquesComputer Science인용 수 0
한 줄 요약

MCI-SQL은 열에 메타데이터 완전한 컨텍스트를 제공하고 텍스트-SQL 정확도를 개선하기 위한 중간 SQL 수정 메커니즘을 도입하여 BIRD 벤치마크에서 최첨단 실행 정확도를 달성합니다.

ABSTRACT

Text-to-SQL aims to translate natural language queries into SQL statements. Existing methods typically follow a pipeline of pre-processing, schema linking, candidate SQL generation, SQL alignment, and target SQL selection. However, these methods face significant challenges. First, they often struggle with column filtering during schema linking due to difficulties in comprehending raw metadata. Also, the candidate SQL generation process often suffers from reasoning errors, which limits accuracy improvements. To address these limitations, we propose a framework, called MCI-SQL, to efficiently and precisely generate SQL queries. Specifically, we assign metadata-complete contexts to each column, which significantly improves the accuracy of column filtering for schema linking. Also, for candidate SQL generation, we propose an intermediate correction mechanism that validates SQL queries and revises errors in a timely way. Moreover, we also propose effective optimizations in subsequent SQL alignment and selection phases, which further enhance the performance. Experiments on the widely-used BIRD benchmark show that MCI-SQL achieves execution accuracy of 74.45% on the development set and 76.41% on the test set, surpassing current published state-of-the-art results. In addition, we manually identify and correct 412 samples in the BIRD dataset, forming a new version named BIRD-clear, which is released together with our code on GitHub. We also evaluate our methods on BIRD-clear and find that MCI-SQL outperforms baselines by 8.47 percentage points in execution accuracy, further demonstrating the effectiveness and reliability of our framework.

연구 동기 및 목표

  • 정밀한 열 필터링을 위해 메타데이터를 확장하여 LLM과 데이터베이스 간의 격차를 줄인다.
  • 생성 중에 SQL을 검증하고 수정하기 위한 중간 교정 메커니즘을 통합한다.
  • 최종 실행 정확도를 향상시키기 위해 SQL 정합성과 후보 생성 프로세스를 최적화한다.
  • BIRD 벤치마크에서 우수한 성능을 입증하고 보정된 BIRD-clear 데이터셋을 공개한다.

제안 방법

  • 열-, 인터-열-, 그리고 테이블 수준 메타데이터를 자연어 설명으로 집계하여 메타데이터-완전한 컨텍스트를 구성한다.
  • 초안 SQL을 사용하여 선택적으로 관련 열을 식별하기 위해 SQL 기반 스키마 연결을 수행한다.
  • 실행 피드백으로 하위 쿼리를 검증하고 개정하는 중간 교정 메커니즘을 사용한다.
  • SQL 생성 중 구조화된 추론을 유지하기 위해 적응형 프롬프트 체이닝을 적용한다.
  • 단계 간 일관성을 보장하기 위해 규칙 기반 SQL 정합성을 구현한다(기능 및 출력 정합).
  • 다중계층 메타데이터 기반 후보 SQL을 생성하고 실행 결과에 대한 다수결 투표를 사용하여 최종 SQL을 선택한다.
Figure 1. Overview of the prevalent LLM-based Text2SQL workflow and our proposed MCI-SQL operations at each phase.
Figure 1. Overview of the prevalent LLM-based Text2SQL workflow and our proposed MCI-SQL operations at each phase.

실험 결과

연구 질문

  • RQ1메타데이터-완전한 컨텍스트가 Text2SQL에서 열 필터링 및 스키마 연결 정확도를 향상시킬 수 있는가?
  • RQ2SQL 생성 중 중간 교정을 통합하면 실행 정확도와 오류 감소에 기여하는가?
  • RQ3다중 계층 메타데이터 및 정합성 전략이 최종 SQL 품질과 효율성에 어떤 영향을 미치는가?
  • RQ4BIRD와 같은 도전적인 실제 데이터셋에서 MCI-SQL의 영향은 무엇인가?
  • RQ5데이터셋 주석 수정(BIRD-clear)이 측정된 성능에 영향을 미치는가?

주요 결과

  • MCI-SQL은 BIRD 개발 세트에서 74.45%의 실행 정확도를 달성한다.
  • MCI-SQL은 BIRD 테스트 세트에서 76.41%의 실행 정확도를 달성한다.
  • MCI-SQL은 BIRD에서 최첨단 방법을 능가하며 단일-SQL 생성 정확도 향상을 보인다.
  • 모델 능력을 더 잘 반영하기 위해 수동으로 수정된 BIRD-clear 데이터셋 버전이 공개되었다.
  • 메타데이터-완전한 컨텍스트와 중간 교정을 사용하면 SQL 생성 중 오류 해결 성공률이 높아진다.
Figure 2. The framework of intermediate correction SQL generation phase.
Figure 2. The framework of intermediate correction SQL generation phase.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.