CAMAGRI-GPT: A parameter-efficient agricultural knowledge system using domain-adapted large language models with retrieval augmentation

Authors

  • Qianchuan Li 1. Institute of Data Science and Agricultural Economics, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China; 2. Key Laboratory of Intelligent Seedling Technology Innovation, Ministry of Agriculture and Rural Affairs, Beijing 100097, China
  • Xin Dai 3. Agricultural Information Institute, Chinese Academy of Agricultural Sciences, Beijing 100081, China
  • Feng Yu 1. Institute of Data Science and Agricultural Economics, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China; 2. Key Laboratory of Intelligent Seedling Technology Innovation, Ministry of Agriculture and Rural Affairs, Beijing 100097, China
  • Junsheng Dai 4. Xinjiang Academy of Agricultural Sciences, Urumqi 830091, China
  • Shengwei Wang 3. Agricultural Information Institute, Chinese Academy of Agricultural Sciences, Beijing 100081, China
  • Rupeng Luan 1. Institute of Data Science and Agricultural Economics, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China; 2. Key Laboratory of Intelligent Seedling Technology Innovation, Ministry of Agriculture and Rural Affairs, Beijing 100097, China
  • Xiaowei Wang 5. Institute of Agricultural Information, Xinjiang Academy of Agricultural Sciences, Urumqi 830091, China
  • Xiaojing Qin 1. Institute of Data Science and Agricultural Economics, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China; 2. Key Laboratory of Intelligent Seedling Technology Innovation, Ministry of Agriculture and Rural Affairs, Beijing 100097, China
  • Shiwei Xu 3. Agricultural Information Institute, Chinese Academy of Agricultural Sciences, Beijing 100081, China; 6. Key Laboratory of Agricultural Monitoring and Early Warning, Ministry of Agriculture and Rural Affairs, Beijing 100081, China

Abstract

Despite their transformative potential, large language models (LLMs) remain underutilized in agriculture due to domain-specific data scarcity and computational constraints. This study presents CAMAGRI-GPT, a parameter-efficient agricultural consultation system that addresses these critical challenges through innovative domain adaptation. A corpus of 2.3 million annotated entries was constructed from raw documents (κ=0.82 agreement, 18 categories) and employed LoRA (r=8) and P-tuning v2 to reduce trainable parameters to 0.2% while maintaining 95.8% performance. The RAG framework with HNSW indexing achieves (87±12) ms retrieval latency, enabling real-time consultation. CAMAGRI-GPT demonstrated over 90.0% accuracy across three representative agricultural tasks (crop management, pest and disease diagnosis, and agricultural Q&A), consistently outperforming GPT-3 and BERT-Agri baselines, p<0.001. Median response latency remained below 2 s across all query categories, meeting field deployment requirements. These results demonstrate that domain-adapted LLMs can effectively deliver expert-level agricultural knowledge to resource-constrained farming communities, offering scalable and sustainable solutions to complement declining traditional extension services.      

Keywords: agricultural large language model; CAMAGRI-GPT; domain adaptation; retrieval-augmented generation; knowledge dissemination; parameter-efficient fine-tuning

DOI: 10.25165/j.ijabe.20261902.9671

 

Citation: Li Q C, Dai X, Yu F, Dai J S, Wang S W, Luan R P, et al. CAMAGRI-GPT: A parameter-efficient agricultural knowledge system using domain-adapted large language models with retrieval augmentation. Int J Agric & Biol Eng, 2026; 19(2): 245–261.

References

[1] Yu S, Ma J. Deep learning for geophysics: Current and future trends. Reviews of Geophysics, 2021; 59(3): e2021RG000742.

[2] Stefanini M, Cornia M, Baraldi L, Cascianelli S, Fiameni G, Cucchiara R. From show to tell: a survey on deep learning-based image captioning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2023; 45(1): 539–559.

[3] Priyadarshini A, Dash S, Jena J, Mishra B B, Sahoo K S, Nayyar A. Review of the cutting edge technologies for weed control in field crops. Int J Agric & Biol Eng, 2024; 17(5): 44–57.

[4] Okaiyeto S A, Bai J W, Wang J, Mujumdar A S, Xiao H W. Success of DeepSeek and potential benefits of free access to AI for global-scale use. Int J Agric & Biol Eng, 2025; 18(1): 304–306.

[5] Sallam M. ChatGPT utility in healthcare education, research, and practice: Systematic review on the promising perspectives and valid concerns. Healthcare, 2023; 11(6): 887.

[6] Raiaan M A K, Mukta M S H, Fatema K, Fahad N M, Sakib S, Mim M M J, et al. A review on large language models: Architectures, applications, taxonomies, open issues and challenges. IEEE Access, 2024; 12: 26839–26874.

[7] Okaiyeto S A, Bai J W, Xiao H W. Generative AI in education: To embrace it or not? Int J Agric & Biol Eng, 2023; 16(3): 285–286.

[8] Yang S T, Liu Z H, Ding N P, Wang Y, Huang Y, Wu P F, et al. ShizishanGPT: An agricultural large language model integrating tools and resources. In: Web Information Systems Engineering – WISE 2024. Lecture Notes in Computer Science, vol 15441. Cham: Springer, 2025; pp.289–303. doi: 10.1007/978-981-96-0573-6_21.

[9] Zhu H, Qin S, Su M, Lin C, Li A, Gao J. Harnessing large vision and language models in agriculture: A review. Frontiers in Plant Science, 2025; 16: 1579355.

[10] Xu S W, Di J Y, Li G Q, Zhuang J Y, Liu K B, Zhong Z P, et al. Theoretical methods and applications of cluster construction for agricultural product monitoring and early warning models. Chinese Journal of Agricultural Sciences, 2020; 53(14): 2859–2871 (in Chinese).

[11] Mu W S, Liu T Q, Miao Z C, Zhang D W, Li X, Yang J. Research progress on knowledge graph technology and its application in agriculture. Journal of Agricultural Engineering, 2023; 39(16): 1–12 (in Chinese).

[12] Hu Y F, Li B Q, Zhang Z N, Wang J Z. Impact of aging agricultural labor force on agricultural total factor productivity in China. Frontiers in Sustainable Food Systems, 2024; 8: 1434604.

[13] Zhang Q Y, Oya T, Rueda J L. The decline and transformation of smallholders in Chinese agriculture: national trends. The Journal of Peasant Studies, 2024; 51(7): 2281–2307.

[14] FAO. The State of Food and Agriculture 2023. Rome: FAO, 2023.

[15] Saiz-Rubio V, Rovira-Mas F. From smart farming towards agriculture 5.0: A review on crop data management. Agronomy-Basel, 2020; 10(2): 207.

[16] Liakos K G, Busato P, Moshou D, Pearson S, Bochtis D. Machine learning in agriculture: A review. Sensors, 2018; 18(8): 2674.

[17] Rocchi L, Boggia A, Paolotti L. Sustainable Agricultural Systems: A bibliometrics analysis of ecological modernization approach. Sustainability, 2020; 12(22): 9635.

[18] Nie J, Yuan Y, Li Y, Chen S, Zhang T, Liu R. Few-shot learning in intelligent agriculture: A review of methods and applications. Journal of Agricultural Sciences-Tarim Bilimleri Dergisi, 2024; 30(2): 216–228.

[19] Gatkal N R, Nalawade S M, Sahni R K, Bhanage G B, Walunj A A, Kadam P B, et al. Review of IoT and electronics enabled smart agriculture. Int J Agric & Biol Eng, 2024; 17(5): 1–14.

[20] Hu W Z, Wane S O, Zhu J K, Li D S, Zhang Q, Bie X T, et al. Review of deep learning-based weed identification in crop fields. Int J Agric & Biol Eng, 2023; 16(4): 1–10.

[21] Alahmad T, Nemenyi M, Nyeki A. Applying iot sensors and big data to improve precision crop production: A review. Agronomy-Basel, 2023; 13(10): 2602.

[22] Xu X B, Teng C, Zhu H C, Feng H K, Zhao Y, Li Z H. Comparison of three models for winter wheat yield prediction based on UAV hyperspectral images. Int J Agric & Biol Eng, 2024; 17(2): 260–267.

[23] Guo W, Yang Y S, Wu H R, Zhu H J, Miao Y S, Gu J Q. Big models in agriculture: Key technologies, application and future directions. Smart Agriculture, 2024; 6(2): 1–13.

[24] Jin X, Zhu X W, Ji J T, Li M Y, Xie X L, Zhao B. Online diagnosis platform for tomato seedling diseases in greenhouse production. Int J Agric & Biol Eng, 2024; 17(1): 80–89.

[25] Zhao C J, Liang X W, Yu H L, Wang H F, Fan S J, Li B. Automatic identification and counting method of caged hens and eggs based on improved YOLO v7 tiny. Transactions of the CSAM, 2023; 54(7): 300–312 (in Chinese). DOI: 10.6041/j.issn.1000-1298.2023.07.030.

[26] Zhai W X, Guo Z, Han R J, Xu Z, Cheng X Y, Song S H, et al. Application note: Autonomous operation mode identification of agricultural machinery with large language models. Int J Agric & Biol Eng, 2025; 18(5): 215–222.

[27] Chowdhery A, Narang S, Devlin J, Bosma M, Mishra G, Roberts A, et al. PaLM: Scaling language modeling with pathways. Journal of Machine Learning Research, 2023; 24(240): 1–113.

[28] Yin C, Du K, Nong Q, Guo S, Li J, Liang Z. PowerPulse: Power energy chat model with LLaMA model fine-tuned on Chinese and power sector domain knowledge. Expert Systems, 2024; 41(3): e13472.

[29] Lee J. InstructPatentGPT: training patent language models to follow instructions with human feedback. Artificial Intelligence and Law, 2024; 32: 281–311.

[30] Raffel C, Shazeer N, Roberts A, Lee K, Narang S, Matena M, et al. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 2020; 21(140): 1–67.

[31] Xu W. Design of agricultural machinery English corpus based on deep learning. Agricultural Mechanization Research, 2024 (in press): 1–5 (in Chinese).

[32] Di Vaio A, Palladino R, Pezzi A, Kalisz D E. The role of digital innovation in knowledge management systems: A systematic literature review. Journal of Business Research, 2021; 123: 220–231.

[33] Schulman J, Wolski F, Dhariwal P, Radford A, Klimov O. Proximal policy optimization algorithms. arXiv preprint, 2017; arXiv: 1707.06347. DOI: 10.48550/arXiv.1707.06347.

[34] Zhang Z, Huang Y, Zhang Y, Li X, Wang H, Chen J. Battle entity confrontation algorithm based on proximal policy optimization. Journal of Nanjing University of Science and Technology, 2021; 45(1): 77–83.

[35] Wu C, Bi W, Liu H. Proximal policy optimization algorithm for dynamic pricing with online reviews. Expert Systems with Applications, 2023; 213: 119010.

[36] Hu J, Zhang Y L, Wang T, Li X D, Chen G, Zhao K. Method for collecting agricultural node data using unmanned aerial vehicles based on deep reinforcement learning. Journal of Agricultural Engineering, 2022; 38(22): 41–51 (In Chinese).

[37] Li Q C, Xu S W, Zhang Y E, Zhuang J Y, Liu J J, Xiong L, et al. Integrated learning modeling and prediction of maize yield stack based on meteorological factors. Chinese Journal of Agricultural Sciences, 2024; 57(4): 679–697. (in Chinese).

[38] Lee S, Chung C M, Yun C M. A deep learning model for predicting risks of crop pests and diseases from sequential environmental data. Plant Methods, 2024; 20(1): 18.

[39] Saleem M H, Potgieter J, Arif K M. Plant disease detection and classification by deep learning. Plants, 2019; 8(11): 468.

[40] Ding J, Li B, Xu C, Qin Y, Wang Z, Luo X. Diagnosing crop diseases based on domain-adaptive pre-training BERT of electronic medical records. Applied Intelligence, 2023; 53(12): 15979–15992.

[41] Shen J F, Zhou X C, Tang C. Dual channel sentiment analysis model based on improved prompt learning method. Computer Applications, 2024 (in press): 1–14 (in Chinese).

[42] Liu J J, Qin X J, Li Q C, Xu S W, Zhao J C, Wang Y G, et al. Forecasting method for China’s soybean demand based on improved temporal fusion transformers. Smart Agriculture, 2025; 7(4): 187–199.

[43] Xu S W, Li Q C, Luan R P, Zhuang J Y, Liu J J, Xiong L. Agricultural market monitoring and early warning: An integrated forecasting approach based on deep learning. Smart Agriculture, 2025; 7(1): 57–69.

[44] Zhuang J Y, Xu S W, Li Y, Xiong L, Liu K B, Zhong Z P. Supply and demand forecasting model of multi-agricultural products based on deep learning. Smart Agriculture, 2022; 4(2): 174–182.

[45] Mamat N, Othman M F, Abdoulghafor R, Alwan A A, Uddin M K, Alsadig A. Advanced technology in agriculture industry by implementing image annotation technique and deep learning approach: A review. Agriculture-Basel, 2022; 12(7): 1013.

[46] Kamilaris A, Prenafeta-Boldu F X. Deep learning in agriculture: A survey. Computers and Electronics in Agriculture, 2018; 147: 70–90.

[47] Akkem Y, Biswas S K, Varanasi A. Smart farming using artificial intelligence: A review. Engineering Applications of Artificial Intelligence, 2023; 120: 105899.

[48] Li Q, Xu S, Zhuang J, Liu J, Xiong L, Zhong Z. Ensemble learning prediction of soybean yields in China based on meteorological data. Journal of Integrative Agriculture, 2023; 22(6): 1909–1927.

[49] Dargan S, Kumar M, Ayyagari M R, Kumar G. A survey of deep learning and its applications: A new paradigm to machine learning. Archives of Computational Methods in Engineering, 2020; 27(4): 1071–1092.

[50] Hirschberg J, Manning C D. Advances in natural language processing. Science, 2015; 349(6245): 261–266.

[51] Cui F, Yue Y, Zhang Y, Zhang Z, Zhou H S. Advancing biosensors with machine learning. ACS Sensors, 2020; 5(11): 3346–3364.

[52] Akcay M B, Oguz K. Speech emotion recognition: Emotional models, databases, features, preprocessing methods, supporting modalities, and classifiers. Speech Communication, 2020; 116: 56–76.

[53] Ming R, Zhou Z Y, Lyu Z C, Luo X W, Zi L, Song C C, et al. Laser tracking leader-follower automatic cooperative navigation system for UAVs edited. Int J Agric & Biol Eng, 2022; 15(2): 165–176.

[54] Zhang X W, Xuan C Z, Hou Z F. Recognition model for coated red clover seeds using YOLOv5s optimized with an attention module. Int J Agric & Biol Eng, 2023; 16(6): 207–214.

[55] Chen C, Liu X Q, Liu C J, Pan Q. Development of the precision feeding system for sows via a rule-based expert system. Int J Agric & Biol Eng, 2023; 16(2): 187–198.

Downloads

Published

2026-05-21

How to Cite

(1)
Li, Q.; Dai, X.; Yu, F.; Dai, J.; Wang, S.; Luan, R.; Wang, X.; Qin, X.; Xu, S. CAMAGRI-GPT: A Parameter-Efficient Agricultural Knowledge System Using Domain-Adapted Large Language Models With Retrieval Augmentation. Int J Agric &amp; Biol Eng 2026, 19, 245-261.

Issue

Section

Information Technology, Sensors and Control Systems