Blockchain smart contracts have catalyzed the development of decentralized applications across various domains, including decentralized finance. However, due to constraints in computational resources and the prevalence of data silos, current smart contracts face significant challenges in fully leveraging the powerful capabilities of Large Language Models (LLMs) for tasks such as intelligent analysis and reasoning. To address this gap, this paper proposes and implements a universal framework for integrating LLMs with blockchain data, {\sysname}, effectively overcoming the interoperability barriers between blockchain and LLMs. By combining semantic relatedness with truth discovery methods, we introduce an innovative data aggregation approach, {\funcname}, which significantly enhances the accuracy and trustworthiness of data generated by LLMs. To validate the framework's effectiveness, we construct a dataset consisting of three types of questions, capturing Q\&A interactions between 10 oracle nodes and 5 LLM models. Experimental results demonstrate that, even with 40\% malicious nodes, the proposed solution improves data accuracy by an average of 17.74\% compared to the optimal baseline. This research not only provides an innovative solution for the intelligent enhancement of smart contracts but also highlights the potential for deep integration between LLMs and blockchain technology, paving the way for more intelligent and complex applications of smart contracts in the future.
翻译:区块链智能合约已催化了包括去中心化金融在内的多个领域中去中心化应用的发展。然而,由于计算资源限制和数据孤岛的普遍存在,当前智能合约在充分利用大语言模型(LLMs)进行智能分析与推理等任务方面面临重大挑战。为弥补这一差距,本文提出并实现了一个将LLMs与区块链数据整合的通用框架{\sysname},有效克服了区块链与LLMs之间的互操作性障碍。通过将语义关联性与真值发现方法相结合,我们引入了一种创新的数据聚合方法{\funcname},显著提升了LLMs生成数据的准确性与可信度。为验证框架的有效性,我们构建了一个包含三类问题的数据集,记录了10个预言机节点与5个LLM模型之间的问答交互。实验结果表明,即使在存在40%恶意节点的情况下,所提方案相比最优基线平均提升了17.74%的数据准确性。本研究不仅为智能合约的智能化增强提供了创新解决方案,更凸显了LLMs与区块链技术深度融合的潜力,为未来智能合约实现更智能、更复杂的应用铺平了道路。