智慧农业(中英文)2025,Vol.7Issue(1):20-32,13.DOI:10.12133/j.smartag.SA202410025
基于精准知识筛选及知识协同生成的农业大语言模型
Agricultural Large Language Model Based on Precise Knowledge Retrieval and Knowledge Collaborative Generation
摘要
Abstract
[Objective]The rapid advancement of large language models(LLMs)has positioned them as a promising novel research paradigm in smart agriculture,leveraging their robust cognitive understanding and content generative capabilities.However,due to the lack of do-main-specific agricultural knowledge,general LLMs often exhibit factual errors or incomplete information when addressing special-ized queries,which is particularly prominent in agricultural applications.Therefore,enhancing the adaptability and response quality of LLMs in agricultural applications has become an important research direction. [Methods]To improve the adaptability and precision of LLMs in the agricultural applications,an innovative approach named the knowledge graph-guided agricultural LLM(KGLLM)was proposed.This method integrated information entropy for effective knowl-edge filtering and applied explicit constraints on content generation during the decoding phase by utilizing semantic information de-rived from an agricultural knowledge graph.The process began by identifying and linking key entities from input questions to the agri-cultural knowledge graph,which facilitated the formation of knowledge inference paths and the development of question-answering rationales.A critical aspect of this approach was ensuring the validity and reliability of the external knowledge incorporated into the model.This was achieved by evaluating the entropy difference in the model's outputs before and after the introduction of each piece of knowledge.Knowledge that didn't enhance the certainty of the answers was systematically filtered out.The knowledge paths that pass this entropy evaluation were used to adjust the token prediction probabilities,prioritizing outputs that were closely aligned with the structured knowledge.This allowed the knowledge graph to exert explicit guidance over the LLM's outputs,ensuring higher accuracy and relevance in agricultural applications. [Results and Discussions]The proposed knowledge graph-guided technique was implemented on five mainstream general-purpose LLMs,including open-source models such as Baichuan,ChatGLM,and Qwen.These models were compared with state-of-the-art knowledge graph-augmented generation methods to evaluate the effectiveness of the proposed approach.The results demonstrate that the proposed knowledge graph-guided approach significantly improved several key performance metrics of fluency,accuracy,factual correctness,and domain relevance.Compared to GPT-4o,the proposed method achieved notable improvements by an average of 2.592 3 in Mean BLEU,2.815 1 in ROUGE,and 9.84%in BertScore.These improvements collectively signify that the proposed ap-proach effectively leverages agricultural domain knowledge to refine the outputs of general-purpose LLMs,making them more suit-able for agricultural applications.Ablation experiments further validated that the knowledge-guided agricultural LLM not only filtered out redundant knowledge but also effectively adjusts token prediction distributions during the decoding phase.This enhanced the adaptability of general-purpose LLMs in agriculture contexts and significantly improves the interpretability of their responses.The knowledge filtering and knowledge graph-guided model decoding method proposed in this study,which was based on information en-tropy,effectively identifies and selects knowledge that carried more informational content through the comparison of information en-tropy.Compared to existing technologies in the agricultural field,this method significantly reduced the likelihood of"hallucination"phenomena during the generation process.Furthermore,the guidance of the knowledge graph ensured that the model's generated re-sponses were closely related to professional agricultural knowledge,thereby avoiding vague and inaccurate responses generated from general knowledge.For instance,in the application of pest and disease control,the model could accurately identify the types of crop diseases and corresponding control measures based on the guided knowledge path,thereby providing more reliable decision support. [Conclusions]This study provides a valuable reference for the construction of future agricultural large language models,indicating that the knowledge graphs guided mehtod has the potential to enhance the domain adaptability and answer quality of models.Future re-search can further explore the application of similar knowledge-guided strategies in other vertical fields to enhance the adaptability and practicality of LLMs across various professional domains.关键词
知识图谱/农业大语言模型/信息熵/语义相似度/知识引导Key words
knowledge graph/agricultural large language model/information entropy/semantic similarity/knowledge guidance分类
计算机与自动化引用本文复制引用
姜京池,闫莲,刘劼..基于精准知识筛选及知识协同生成的农业大语言模型[J].智慧农业(中英文),2025,7(1):20-32,13.基金项目
国家重点研发计划项目(ZDYF20220008) (ZDYF20220008)
黑龙江省科技计划项目(2021ZXJ05A03,GJLX20240004) National Key Research and Development Program of China(ZDYF20220008) (2021ZXJ05A03,GJLX20240004)
Heilongjiang Provincial Science and Technology Program Project(2021ZXJ05A03,GJLX20240004) (2021ZXJ05A03,GJLX20240004)