[论文解读] Using Large Language Models for Knowledge Engineering (LLMKE): A Case Study on Wikidata
本文提出 LLMKE,一种利用大型语言模型(LLMs)如 GPT-3.5-turbo 和 GPT-4 预测给定主语-关系对在 Wikidata 中对象实体的流水线,结合少样本提示学习与 Wikidata 实体映射。在 ISWC 2023 LM-KBC 挑战赛中,其宏平均 F1 得分为 0.701,展示了 LLM 在协作式知识库补全方面的潜力,尽管在不同领域间性能差异显著。
In this work, we explore the use of Large Language Models (LLMs) for knowledge engineering tasks in the context of the ISWC 2023 LM-KBC Challenge. For this task, given subject and relation pairs sourced from Wikidata, we utilize pre-trained LLMs to produce the relevant objects in string format and link them to their respective Wikidata QIDs. We developed a pipeline using LLMs for Knowledge Engineering (LLMKE), combining knowledge probing and Wikidata entity mapping. The method achieved a macro-averaged F1-score of 0.701 across the properties, with the scores varying from 1.00 to 0.328. These results demonstrate that the knowledge of LLMs varies significantly depending on the domain and that further experimentation is required to determine the circumstances under which LLMs can be used for automatic Knowledge Base (e.g., Wikidata) completion and correction. The investigation of the results also suggests the promising contribution of LLMs in collaborative knowledge engineering. LLMKE won Track 2 of the challenge. The implementation is available at https://github.com/bohuizhang/LLMKE.
研究动机与目标
- 探究使用大型语言模型(LLMs)在 Wikidata 中实现自动化知识库补全的可行性。
- 评估 LLM 在不同 Wikidata 关系上的表现,这些关系具有不同的知识覆盖范围和领域特异性。
- 开发一种结合少样本提示学习与 Wikidata 实体消歧的流水线,以实现准确的对象预测。
- 评估 LLM 在识别不完整或过时三元组方面的作用,以提升 Wikidata 的质量。
- 探索 LLM 作为协作工具在知识工程中的潜力,特别是在检测和建议修复知识缺口方面。
提出的方法
- 该方法采用少样本提示学习的上下文学习,通过主语和关系对从 LLM 获取对象预测。
- 通过 wbsearchentities API 将预测的对象字符串映射到 Wikidata QID,该 API 依赖标签和别名进行消歧。
- 采用两阶段流水线:首先,LLM 生成候选对象字符串;其次,通过基于标签和别名的搜索将这些字符串匹配到 Wikidata 实体。
- 该方法同时利用 GPT-3.5-turbo 和 GPT-4,以比较不同模型的性能并识别其互补的知识优势。
- 系统将预测结果与真实 Wikidata 三元组进行对比,计算每种关系的 F1 分数,并对所有属性进行宏平均。
- 在部分实验中使用维基百科内容以增强 LLM 的推理能力,但因知识不匹配,此方法偶尔会降低性能。
实验结果
研究问题
- RQ1LLM 能否通过少样本上下文学习可靠地预测给定主语-关系对在 Wikidata 中的对象实体?
- RQ2LLM 在不同 Wikidata 关系上的表现如何变化?哪些因素影响了这种变化?
- RQ3Wikipedia、Wikidata 和 LLM 之间的知识缺口在多大程度上影响了预测准确性?
- RQ4LLM 是否可用于检测并建议修复不完整或过时的 Wikidata 三元组?
- RQ5通过利用互补知识,多个 LLM 的集成使用能否提升整体性能?
主要发现
- LLMKE 流水线在所有 Wikidata 属性上实现了 0.701 的宏平均 F1 得分,各关系得分范围为 0.328 至 1.00。
- GPT-4 在 PersonHasNobelPrize 关系上实现了 1.00 的完美 F1 得分,表明其在知名且高精度事实上的强大表现。
- 表现最差的关系是 PersonHasEmployer,其 F1 得分为 0.328,凸显了 LLM 在较少见或领域特定知识上的局限性。
- wbsearchentities API 经常因缺少标签或别名而无法匹配 LLM 预测的字符串,限制了消歧的准确性。
- 在 Wikipedia 和 Wikidata 之间观察到显著的知识缺口,LLM 正确预测了更新的事实(例如,Exor 是法拉利的母公司),而 Wikidata 尚未反映这些信息。
- 出人意料的是,GPT-3.5-turbo 在两个关系上表现优于 GPT-4,表明不同 LLM 持有不同的知识,支持采用集成方法。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。