隐式知识对 LLM 足够吗?一种面向树状结构的 RAG 方法
Is Implicit Knowledge Enough for LLMs? A RAG Approach for Tree-based Structures
AI总结:
针对树状层次结构,本文提出自底向上生成各级聚合摘要的知识线性化 RAG 方法,在回答质量相当的情况下将检索文档数减少逾68%。
摘要:
大型语言模型(LLM)擅长根据其上下文中的信息生成回答。虽然这种能力有助于与代码文件等结构化数据交互,但另一种流行方法——检索增强生成(RAG)——会检索相关文档,以增强模型的上下文学习。然而,如何最佳表示这些检索到的知识,以便针对结构化数据(尤其是树等层次结构)生成回答,目前尚未得到充分研究。在本文中,我们提出了一种新颖的自底向上方法,通过在每个层次级别生成隐式的聚合摘要,将来自树状结构(如 GitHub 仓库)的知识线性化。该方法使知识能够存储在知识库中,并直接与 RAG 一起使用。随后,我们将该方法与在原始、非结构化代码上使用 RAG 进行比较,评估所生成回答的准确性和质量。结果表明,尽管两种方法的回答质量相当,但我们的方法在检索器中生成的文档减少了 68% 以上,显著提升了效率。这一发现表明,利用隐式、线性化的知识可能是处理复杂层次数据结构的一种高效且可扩展的策略。
英文摘要:
Large Language Models (LLMs) are adept at generating responses based on information within their context. While this ability is useful for interacting with structured data like code files, another popular method, Retrieval-Augmented Generation (RAG), retrieves relevant documents to augment the model's in-context learning. However, it is not well-explored how to best represent this retrieved knowledge for generating responses on structured data, particularly hierarchical structures like trees. In this work, we propose a novel bottom-up method to linearize knowledge from tree-like structures (like a GitHub repository) by generating implicit, aggregated summaries at each hierarchical level. This approach enables the knowledge to be stored in a knowledge base and used directly with RAG. We then compare our method to using RAG on raw, unstructured code, evaluating the accuracy and quality of the generated responses. Our results show that while response quality is comparable across both methods, our approach generates over 68% fewer documents in the retriever, a significant gain in efficiency. This finding suggests that leveraging implicit, linearized knowledge may be a highly effective and scalable strategy for handling complex, hierarchical data structures.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。