Frontiers of Data and Computing ›› 2024, Vol. 6 ›› Issue (4): 116-127.

CSTR: 32002.14.jfdc.CN10-1649/TP.2024.04.010

doi: 10.11871/jfdc.issn.2096-742X.2024.04.010

• Special Issue: Fundamental Software Stack and Systems for National Scientific Data Centers • Previous Articles     Next Articles

An Agricultural Policy Question Answering System Based on ChatGLM2-6B

WEI Yijin1,2(),FAN Jingchao1,2,*()   

  1. 1. Agriculture Information Institution of CAAS, Beijing 100081, China
    2. National Agriculture Science Data Center, Beijing 100081, China
  • Received:2023-11-23 Online:2024-08-20 Published:2024-08-20

Abstract:

[Objective] In order to improve the transparency of the policy, reduce the information asymmetry, and provide a convenient way for stakeholders to obtain agricultural policy information and guidance, this paper constructs an agricultural policy question answering system based on ChatGLM2-6B and Langchain-Chatchat. [Methods] To construct the agricultural policy question answering dataset, this paper first leverages web crawlers to obtain the full text of guiding agricultural policies of the National Rural Revitalization Administration and Central File No. 1, as well as the full text of agricultural policies of Huanghe-Nine provincial Rural Revitalization Bureau. The collected dataset is then used to fine-tune the ChatGLM2-6B model by QLoRA and conduct model consolidation and quantification. The obtained ChatGLM2-6B-QLoRA-int4 model is further combined with Langchain-Chatchat and local agricultural policy knowledge base to construct an agricultural policy question answering system. [Results] Questions were asked to ChatGPT, ChatGLM2-6B, ChatGLM2-6B-QLORa, and our question-and-answer system, respectively, and the answer results were evaluated by expert scoring method. Our system is better than ChatGLM2-6B and CHATGLM2-6B-QLORA in the field of agricultural policy, and the overall effect is better than ChatGPT. [Conclusion] The Q&A system constructed in this research performs well in the field of agricultural policy, and can ensure the security of proprietary data and realize the local deployment of LLM-based Q&A system.

Key words: large language model (LLM), agriculture, policy, question answering system, vertical domain