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

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Yi, Jiawen, Chen, Guo, Shen, Zixiang
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866929385176563712
author Yi, Jiawen
Chen, Guo
Shen, Zixiang
author_facet Yi, Jiawen
Chen, Guo
Shen, Zixiang
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2406_09133
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle RH-SQL: Refined Schema and Hardness Prompt for Text-to-SQL
Yi, Jiawen
Chen, Guo
Shen, Zixiang
Computation and Language
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.
title RH-SQL: Refined Schema and Hardness Prompt for Text-to-SQL
topic Computation and Language
url https://arxiv.org/abs/2406.09133