农业大数据学报 ›› 2024, Vol. 6 ›› Issue (3): 412-423.doi: 10.19788/j.issn.2096-6369.000052

• “面向高质量共享的科学数据安全”专刊(下) • 上一篇    下一篇

农业垂直领域大语言模型构建流程和技术展望

张宇芹1,2(), 朱景全3, 董薇2, 李富忠1,*(), 郭雷风2,*()   

  1. 1.山西农业大学软件学院,山西晋中 030801
    2.中国农业科学院农业信息研究所,北京 100081
    3.全国农业技术推广服务中心,北京 100125
  • 收稿日期:2024-05-23 接受日期:2024-06-23 出版日期:2024-09-26 发布日期:2024-10-01
  • 通讯作者: 郭雷风,E-mail:guoleifeng@caas.cn
    李富忠,lifuzhong@sxau.edu.cn
  • 作者简介:张宇芹,E-mail:zhangyuqin319@gmail.com
  • 基金资助:
    科技创新2030——重大项目(2021ZD0110901);贵州省科技支撑项目(黔科合支撑[2023]一般189)

Construction Process and Technological Prospects of Large Language Models in the Agricultural Vertical Domain

ZHANG YuQin1,2(), ZHU JingQuan3, DONG Wei2, LI FuZhong1,*(), GUO LeiFeng2,*()   

  1. 1. College of Software, Shanxi Agricultural University, Jinzhong 030801, Shanxi, China
    2. Agricultural Information Institute of Chinese Academy of Agricultural Sciences, Beijing 100081, China
    3. The National Agro-Tech Extension and Service Center, Beijing 100125, China
  • Received:2024-05-23 Accepted:2024-06-23 Published:2024-09-26 Online:2024-10-01

摘要:

随着互联网的普及,农业知识和信息的获取变得更加便捷,但信息大多固定且通用,无法针对具体情况提供定制化的解决方案。在此背景下,大语言模型(Large Language Models,LLMs)作为一种高效的人工智能工具,逐渐在农业领域中获得关注和应用。目前,LLMs技术在农业领域大模型的相关综述中只是简单描述,并没有系统地介绍LLMs构建流程。本文重点介绍了农业垂直领域大语言模型构建流程,包括数据采集和预处理、选择适当的LLMs基模型、微调训练、检索增强生成 (Retrieval Augmented Generation,RAG)技术、评估过程。以及介绍了LangChain框架在农业问答系统中的构建。最后,总结出当前构建农业垂直领域大语言模型的一些挑战,包括数据安全挑战、模型遗忘挑战和模型幻觉挑战,以及提出了未来农业垂直领域大语言的发展方向,包括多模态数据融合、强时效数据更新、多语言知识表达和微调成本优化,以进一步提高农业生产的智能化和现代化水平。

关键词: 大语言模型, 检索增强生成, LangChain, 农业问答系统

Abstract:

With the proliferation of the internet, accessing agricultural knowledge and information has become more convenient. However, this information is often static and generic, failing to provide tailored solutions for specific situations. To address this issue, vertical domain models in agriculture combine agricultural data with large language models (LLMs), utilizing natural language processing and semantic understanding technologies to provide real-time answers to agricultural questions and play a crucial role in agricultural decision-making and extension. This paper details the construction process of LLMs in the agricultural vertical domain, including data collection and preprocessing, selecting appropriate pre-trained LLM base models, fine-tuning training, Retrieval Augmented Generation (RAG), evaluation. The paper also discusses the application of the LangChain framework in agricultural Q&A systems. Finally, the paper summarizes some challenges in building LLMs for the agricultural vertical domain, including data security challenges, model forgetting challenges, and model hallucination challenges, and proposes future development directions for agricultural models, including the utilization of multimodal data, real-time data updates, the integration of multilingual knowledge, and optimization of fine-tuning costs to further promote the intelligence and modernization of agricultural production.

Key words: LLMs, RAG, LangChain, agricultural Q&A systems