Graph database engines play a pivotal role in efficiently storing and managing graph data across various domains, including bioinformatics, knowledge graphs, and recommender systems. Ensuring data accuracy within graph database engines is paramount, as inaccuracies can yield unreliable analytical outcomes. Current bug-detection approaches are confined to specific graph query languages, limiting their applicabilities when handling graph database engines that use various graph query languages across various domains. Moreover, they require extensive prior knowledge to generate queries for detecting bugs. To address these challenges, we introduces DGDB, a novel paradigm harnessing large language models(LLM), such as ChatGPT, for comprehensive bug detection in graph database engines. DGDB leverages ChatGPT to generate high-quality queries for different graph query languages. It subsequently employs differential testing to identify bugs in graph database engines. We applied this paradigm to graph database engines using the Gremlin query language and those using the Cypher query language, generating approximately 4,000 queries each. In the latest versions of Neo4j, Agensgraph, and JanusGraph databases, we detected 2, 5, and 3 wrong-result bugs, respectively.
翻译:图数据库引擎在生物信息学、知识图谱和推荐系统等多个领域中,高效存储和管理图数据方面发挥着关键作用。确保图数据库引擎中的数据准确性至关重要,因为不准确可能导致不可靠的分析结果。当前的缺陷检测方法局限于特定图查询语言,限制了其在处理跨领域使用多种图查询语言的图数据库引擎时的适用性。此外,这些方法需要大量先验知识来生成用于检测缺陷的查询。为解决这些挑战,我们提出了DGDB,一种利用大型语言模型(如ChatGPT)进行图数据库引擎全面缺陷检测的新范式。DGDB利用ChatGPT为不同的图查询语言生成高质量查询,随后采用差分测试来识别图数据库引擎中的缺陷。我们将该范式应用于使用Gremlin查询语言和使用Cypher查询语言的图数据库引擎,各自生成了约4000个查询。在最新版本的Neo4j、Agensgraph和JanusGraph数据库中,我们分别检测到2个、5个和3个错误结果缺陷。