arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.08449cs.ETcs.CL
收藏

面向图查询生成的大型语言模型评估

Towards Evaluating Large Language Models for Graph Query Generation

University of Urbino Carlo Bo(乌尔比诺卡洛·博大学)

Siraj Munir, Alessandro Aldini

AI总结:

本文评估了多个LLM智能体在图数据库Cypher查询生成中的表现,发现Claude Sonnet 3.5在准确率上优于其他模型,并提出了未来研究方向。

摘要:

大型语言模型(LLMs)正在彻底改变生成式人工智能(GenAI)的格局,基于LLM的创新解决方案不断涌现。然而,当应用于数据库技术,特别是图数据库和知识图谱(KGs)的查询生成时,LLMs仍面临重大挑战。虽然已有关于LLM驱动的结构化查询语言(SQL)查询生成的研究,但针对图数据库的类似系统仍不发达。本文提出了一项比较研究,旨在解决使用开放访问的LLMs生成Cypher查询(一种与图数据库交互的强大语言)的挑战。我们使用设计的少样本学习提示和由思维链(CoT)推理支持的检索增强生成(RAG),严格评估了几个LLM智能体(OpenAI ChatGPT 4o、Claude Sonnet 3.5、Google Gemini Pro 1.5和本地部署的Llama 3.1 8B)。我们对查询生成准确率的实证分析表明,Claude Sonnet 3.5在这一特定领域优于其他模型。此外,我们强调了有前景的未来研究方向,以解决已识别的局限性并推进LLM驱动的图数据库查询生成。

英文摘要:

Large Language Models (LLMs) are revolutionizing the landscape of Generative Artificial Intelligence (GenAI), with innovative LLM-backed solutions emerging rapidly. However, when applied to database technologies, specifically query generation for graph databases and Knowledge Graphs (KGs), LLMs still face significant challenges. While research on LLM-driven query generation for Structured Query Language (SQL) exists, similar systems for graph databases remain underdeveloped. This paper presents a comparative study addressing the challenge of generating Cypher queries a powerful language for interacting with graph databases using open-access LLMs. We rigorously evaluate several LLM agents (OpenAI ChatGPT 4o, Claude Sonnet 3.5, Google Gemini Pro 1.5, and a locally deployed Llama 3.1 8B) using a designed few-shot learning prompt and Retrieval Augmented Generation (RAG) backed by Chain-of-Thoughts (CoT) reasoning. Our empirical analysis of query generation accuracy reveals that Claude Sonnet 3.5 outperforms its counterparts in this specific domain. Further, we highlight promising future research directions to address the identified limitations and advance LLM-driven query generation for graph databases.

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

↑