Discover and explore top open-source AI tools and projects—updated daily.
Few-shot NL2SQL method for GPT-4
Top 55.7% on SourcePulse
DAIL-SQL is a few-shot Text-to-SQL method designed to optimize Large Language Model (LLM) performance on complex database querying tasks. It targets researchers and practitioners in natural language processing and database management, offering a significant boost in accuracy on benchmarks like Spider.
How It Works
DAIL-SQL enhances Text-to-SQL by encoding structural knowledge as SQL statements, selecting relevant examples based on both question and query similarity, and optimizing token efficiency by excluding cross-domain knowledge. This approach leverages LLMs' in-context learning capabilities by carefully curating prompt content, leading to improved accuracy and reduced computational cost.
Quick Start & Requirements
conda
. Install dependencies via pip install -r requirements.txt
after setting up the environment.java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer &
from ./third_party/stanford-corenlp-full-2018-10-05
.python nltk_downloader.py
../dataset/spider
.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
generate_question.py
implies a dependency on pre-generated queries for certain selection strategies.6 months ago
Inactive