{"title":"利用复杂的 SQL 工作负载评估文本到 SQL 生成的 LLM","authors":"Limin Ma, Ken Pu, Ying Zhu","doi":"arxiv-2407.19517","DOIUrl":null,"url":null,"abstract":"This study presents a comparative analysis of the a complex SQL benchmark,\nTPC-DS, with two existing text-to-SQL benchmarks, BIRD and Spider. Our findings\nreveal that TPC-DS queries exhibit a significantly higher level of structural\ncomplexity compared to the other two benchmarks. This underscores the need for\nmore intricate benchmarks to simulate realistic scenarios effectively. To\nfacilitate this comparison, we devised several measures of structural\ncomplexity and applied them across all three benchmarks. The results of this\nstudy can guide future research in the development of more sophisticated\ntext-to-SQL benchmarks. We utilized 11 distinct Language Models (LLMs) to generate SQL queries based\non the query descriptions provided by the TPC-DS benchmark. The prompt\nengineering process incorporated both the query description as outlined in the\nTPC-DS specification and the database schema of TPC-DS. Our findings indicate\nthat the current state-of-the-art generative AI models fall short in generating\naccurate decision-making queries. We conducted a comparison of the generated\nqueries with the TPC-DS gold standard queries using a series of fuzzy structure\nmatching techniques based on query features. The results demonstrated that the\naccuracy of the generated queries is insufficient for practical real-world\napplication.","PeriodicalId":501123,"journal":{"name":"arXiv - CS - Databases","volume":"44 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-07-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Evaluating LLMs for Text-to-SQL Generation With Complex SQL Workload\",\"authors\":\"Limin Ma, Ken Pu, Ying Zhu\",\"doi\":\"arxiv-2407.19517\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"This study presents a comparative analysis of the a complex SQL benchmark,\\nTPC-DS, with two existing text-to-SQL benchmarks, BIRD and Spider. Our findings\\nreveal that TPC-DS queries exhibit a significantly higher level of structural\\ncomplexity compared to the other two benchmarks. This underscores the need for\\nmore intricate benchmarks to simulate realistic scenarios effectively. To\\nfacilitate this comparison, we devised several measures of structural\\ncomplexity and applied them across all three benchmarks. The results of this\\nstudy can guide future research in the development of more sophisticated\\ntext-to-SQL benchmarks. We utilized 11 distinct Language Models (LLMs) to generate SQL queries based\\non the query descriptions provided by the TPC-DS benchmark. The prompt\\nengineering process incorporated both the query description as outlined in the\\nTPC-DS specification and the database schema of TPC-DS. Our findings indicate\\nthat the current state-of-the-art generative AI models fall short in generating\\naccurate decision-making queries. We conducted a comparison of the generated\\nqueries with the TPC-DS gold standard queries using a series of fuzzy structure\\nmatching techniques based on query features. The results demonstrated that the\\naccuracy of the generated queries is insufficient for practical real-world\\napplication.\",\"PeriodicalId\":501123,\"journal\":{\"name\":\"arXiv - CS - Databases\",\"volume\":\"44 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-07-28\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Databases\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2407.19517\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Databases","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2407.19517","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Evaluating LLMs for Text-to-SQL Generation With Complex SQL Workload
This study presents a comparative analysis of the a complex SQL benchmark,
TPC-DS, with two existing text-to-SQL benchmarks, BIRD and Spider. Our findings
reveal that TPC-DS queries exhibit a significantly higher level of structural
complexity compared to the other two benchmarks. This underscores the need for
more intricate benchmarks to simulate realistic scenarios effectively. To
facilitate this comparison, we devised several measures of structural
complexity and applied them across all three benchmarks. The results of this
study can guide future research in the development of more sophisticated
text-to-SQL benchmarks. We utilized 11 distinct Language Models (LLMs) to generate SQL queries based
on the query descriptions provided by the TPC-DS benchmark. The prompt
engineering process incorporated both the query description as outlined in the
TPC-DS specification and the database schema of TPC-DS. Our findings indicate
that the current state-of-the-art generative AI models fall short in generating
accurate decision-making queries. We conducted a comparison of the generated
queries with the TPC-DS gold standard queries using a series of fuzzy structure
matching techniques based on query features. The results demonstrated that the
accuracy of the generated queries is insufficient for practical real-world
application.