arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.08727cs.DBcs.AIcs.CL
收藏

大语言模型能替代SQL吗?查询大语言模型与传统关系型数据库的资源利用对比

Can LLMs substitute SQL? Comparing Resource Utilization of Querying LLMs versus Traditional Relational Databases

Boston University(波士顿大学)

Xiang Zhang, Khatoon Khedri, Reza Rawassizadeh

AI总结:

本研究对比了9款不同参数量的大语言模型与传统关系型数据库SQL的查询资源利用情况和准确率,发现LLM查询能耗极高,不建议用其替代关系型数据库。

摘要:

大语言模型(LLM)可在软件工程流程中自动化或替代各类任务。本研究评估了LLM在解读和执行自然语言查询时的资源利用情况与准确率,并将其与关系型数据库管理系统中的传统SQL进行对比。我们使用一个小型交易数据集,实证检验了9款参数量在70亿到340亿之间的LLM的资源利用与准确率,包括Llama2 7B、Llama2 13B、Mistral、Mixtral、Optimus-7B、SUS-chat-34B、platypus-yi-34b、NeuralHermes-2.5-Mistral-7B和Starling-LM-7B-alpha。研究结果表明,使用LLM进行数据库查询会产生显著的能源开销(即便是小型量化模型也是如此),是一种不环保的方式。因此,鉴于LLM极高的资源消耗,我们不建议用其替代关系型数据库。

英文摘要:

Large Language Models (LLMs) can automate or substitute different types of tasks in the software engineering process. This study evaluates the resource utilization and accuracy of LLM in interpreting and executing natural language queries against traditional SQL within relational database management systems. We empirically examine the resource utilization and accuracy of nine LLMs varying from 7 to 34 Billion parameters, including Llama2 7B, Llama2 13B, Mistral, Mixtral, Optimus-7B, SUS-chat-34B, platypus-yi-34b, NeuralHermes-2.5-Mistral-7B and Starling-LM-7B-alpha, using a small transaction dataset. Our findings indicate that using LLMs for database queries incurs significant energy overhead (even small and quantized models), making it an environmentally unfriendly approach. Therefore, we advise against replacing relational databases with LLMs due to their substantial resource utilization.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑