Dial: 지식 기반의 방언 특화 자연어-SQL 변환 시스템
Dial: A Knowledge-Grounded Dialect-Specific NL2SQL System
기업들은 일반적으로 다양한 데이터베이스 시스템을 사용하며, 각 시스템은 고유한 SQL 방언을 가지고 있으며, 이는 서로 다른 구문 규칙, 내장 함수 및 실행 제약을 포함합니다. 그러나 대부분의 기존 자연어-SQL 변환 방법은 단일 방언(예: SQLite)을 가정하며, 의미적으로 정확하고 대상 엔진에서 실행 가능한 쿼리를 생성하는 데 어려움을 겪습니다. 프롬프트 기반 방법은 의도 추론과 방언 구문을 긴밀하게 결합하며, 규칙 기반 번역기는 종종 기본 연산자를 일반적인 구조로 변환하고, 다중 방언 미세 조정은 방언 간 간섭으로 인해 어려움을 겪습니다. 본 논문에서는 방언 특화 자연어-SQL 변환을 위한 지식 기반 프레임워크인 Dial을 제시합니다. Dial은 다음과 같은 기능을 제공합니다: (1) 연산자 수준의 의도 분해 및 일관성 기반 사양을 통해 자연어를 방언에 맞는 논리적 쿼리 계획으로 변환하는 방언 인식 논리적 쿼리 계획 모듈; (2) 계층적 의도 기반 지식 베이스인 HINT-KB는 방언 지식을 (i) 표준 구문 참조, (ii) 선언적 함수 저장소 및 (iii) 절차적 제약 조건 저장소로 구성합니다; (3) 구문 복구와 논리 감사 과정을 분리하여 의미적 오류를 방지하는 실행 기반 디버깅 및 의미적 검증 루프. 우리는 2,218개의 방언 특화 테스트 케이스를 포함하는 벤치마크 DS-NL2SQL을 구축했습니다. 실험 결과, Dial은 최첨단 모델에 비해 번역 정확도를 10.25% 향상시키고 방언 특징 적용 범위를 15.77% 향상시키는 것을 확인했습니다. 코드 저장소는 https://github.com/weAIDB/Dial 입니다.
Enterprises commonly deploy heterogeneous database systems, each of which owns a distinct SQL dialect with different syntax rules, built-in functions, and execution constraints. However, most existing NL2SQL methods assume a single dialect (e.g., SQLite) and struggle to produce queries that are both semantically correct and executable on target engines. Prompt-based approaches tightly couple intent reasoning with dialect syntax, rule-based translators often degrade native operators into generic constructs, and multi-dialect fine-tuning suffers from cross-dialect interference. In this paper, we present Dial, a knowledge-grounded framework for dialect-specific NL2SQL. Dial introduces: (1) a Dialect-Aware Logical Query Planning module that converts natural language into a dialect-aware logical query plan via operator-level intent decomposition and divergence-aware specification; (2) HINT-KB, a hierarchical intent-aware knowledge base that organizes dialect knowledge into (i) a canonical syntax reference, (ii) a declarative function repository, and (iii) a procedural constraint repository; and (3) an execution-driven debugging and semantic verification loop that separates syntactic recovery from logic auditing to prevent semantic drift. We construct DS-NL2SQL, a benchmark covering six major database systems with 2,218 dialect-specific test cases. Experimental results show that Dial consistently improves translation accuracy by 10.25% and dialect feature coverage by 15.77% over state-of-the-art baselines. The code is at https://github.com/weAIDB/Dial.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.