在 haystack 中寻找针:基于意图的可重用 artifacts 推荐 with LLMs
A Needle in a Haystack: Intent-driven Reusable Artifacts Recommendation with LLMs
AI总结:
本文提出 TreeRec 框架,通过语义抽象组织 artifacts 成层次结构树,提升 LLMs 在意图驱动推荐中的性能和效率。
摘要:
在开源软件开发中,重用现有 artifacts 已被广泛采用以避免重复实现工作。可重用 artifacts 被认为比从头开发软件组件更高效和可靠。然而,当面临大量的可重用 artifacts 时,开发者往往难以找到能满足其预期需求的 artifacts。为减轻这一负担,检索-based 和 learning-based 技术已被提出以自动化 artifact 推荐。最近,大型语言模型(LLMs)展示了理解意图、执行语义对齐和推荐可用 artifacts 的潜力。然而,它们的有效性尚未被彻底探索。为填补这一空白,我们构建了一个名为 IntentRecBench 的意图驱动 artifact 推荐基准,涵盖三个代表性的开源生态系统。利用 IntentRecBench,我们对五种流行的 LLMs 和六种传统方法在精度和效率方面进行了全面的比较研究。我们的结果表明,尽管 LLMs 优于传统方法,但它们仍然由于候选空间大而面临低精度和高推理成本的问题。受软件工程中基于本体的语义组织的启发,我们提出 TreeRec,一种基于特征树的推荐框架以缓解这些问题。TreeRec 利用基于 LLM 的语义抽象来将 artifacts 组织成一个层次化的语义树,实现意图和功能对齐并减少推理时间。广泛的实验表明,TreeRec 在不同生态系统中持续提高了各种 LLMs 的性能,突显了其通用性和在实际部署中的潜力。
英文摘要:
In open source software development, the reuse of existing artifacts has been widely adopted to avoid redundant implementation work. Reusable artifacts are considered more efficient and reliable than developing software components from scratch. However, when faced with a large number of reusable artifacts, developers often struggle to find artifacts that can meet their expected needs. To reduce this burden, retrieval-based and learning-based techniques have been proposed to automate artifact recommendations. Recently, Large Language Models (LLMs) have shown the potential to understand intentions, perform semantic alignment, and recommend usable artifacts. Nevertheless, their effectiveness has not been thoroughly explored. To fill this gap, we construct an intent-driven artifact recommendation benchmark named IntentRecBench, covering three representative open source ecosystems. Using IntentRecBench, we conduct a comprehensive comparative study of five popular LLMs and six traditional approaches in terms of precision and efficiency. Our results show that although LLMs outperform traditional methods, they still suffer from low precision and high inference cost due to the large candidate space. Inspired by the ontology-based semantic organization in software engineering, we propose TreeRec, a feature tree-guided recommendation framework to mitigate these issues. TreeRec leverages LLM-based semantic abstraction to organize artifacts into a hierarchical semantic tree, enabling intent and function alignment and reducing reasoning time. Extensive experiments demonstrate that TreeRec consistently improves the performance of diverse LLMs across ecosystems, highlighting its generalizability and potential for practical deployment.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。