Interacting with knowledge graphs can be a daunting task for people without a background in computer science since the query language that is used (SPARQL) has a high barrier of entry. Large language models (LLMs) can lower that barrier by providing support in the form of Text2SPARQL translation. In this paper we introduce a generalized method based on SPINACH, an LLM backed agent that translates natural language questions to SPARQL queries not in a single shot, but as an iterative process of exploration and execution. We describe the overall architecture and reasoning behind our design decisions, and also conduct a thorough analysis of the agent behavior to gain insights into future areas for targeted improvements. This work was motivated by the Text2SPARQL challenge, a challenge that was held to facilitate improvements in the Text2SPARQL domain.
翻译:对于缺乏计算机科学背景的人员而言,与知识图谱进行交互可能是一项艰巨的任务,因为其所使用的查询语言(SPARQL)具有较高的入门门槛。大型语言模型(LLMs)能够通过提供Text2SPARQL翻译支持来降低这一门槛。本文提出一种基于SPINACH的通用方法,该方法利用LLM支持的智能体将自然语言问题转换为SPARQL查询,该转换并非通过单次生成完成,而是通过探索与执行的迭代过程实现。我们阐述了整体架构及设计决策背后的考量,并对智能体行为进行了深入分析,以期为未来针对性改进领域提供洞见。本研究的动机源于Text2SPARQL挑战赛,该赛事旨在推动Text2SPARQL领域的技术进步。