RH-SQL: Refined Schema and Hardness Prompt for Text-to-SQL

Jiawen Yi, Guo Chen, Zixiang Shen
6/13/2024
cs.CL

No confident code implementation found for this paper.

Abstract

Text-to-SQL is a technology that converts natural language queries into the structured query language SQL. A novel research approach that has recently gained attention focuses on methods based on the complexity of SQL queries, achieving notable performance improvements. However, existing methods entail significant storage and training costs, which hampers their practical application. To address this issue, this paper introduces a method for Text-to-SQL based on Refined Schema and Hardness Prompt. By filtering out low-relevance schema information with a refined schema and identifying query hardness through a Language Model (LM) to form prompts, this method reduces storage and training costs while maintaining performance. It's worth mentioning that this method is applicable to any sequence-to-sequence (seq2seq) LM. Our experiments on the Spider dataset, specifically with large-scale LMs, achieved an exceptional Execution accuracy (EX) of 82.6%, demonstrating the effectiveness and greater suitability of our method for real-world applications.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{yi2024rhsql,
  title  = {RH-SQL: Refined Schema and Hardness Prompt for Text-to-SQL},
  author = {Jiawen Yi and Guo Chen and Zixiang Shen},
  year   = {2024},
  eprint = {2406.09133},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.09133v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.09133.svg)](https://codeofpaper.com/paper/2406.09133)

Discussion