Locally Deployable Agricultural Question Answering with Low-Rank Adaptation and Retrieval-Augmented Generation
Farmers need timely and reliable information to manage crops, pests, diseases, and livestock. However, such knowledge is spread across research reports, technical manuals, and online resources. Large language models could make this distributed knowledge easier to access, but their practical use faces two limitations. General-purpose models may not adequately cover specialized agricultural topics, and cloud-based services can require sensitive queries and proprietary documents to be transmitted outside the local environment. We therefore developed a locally deployable agricultural question-answering framework that combines low-rank adaptation (LoRA) with retrieval-augmented generation (RAG). We collected 51,710 agricultural practice documents and used Graph- Gen to generate 32,250 question-answer pairs. These pairs were combined with 10,000 samples from three public datasets to adapt five Qwen3 models, while the original documents formed a locally maintained retrieval corpus. The optimized retrieval configuration achieved a Recall@1 of 0.6600 and an MRR of 0.7528. On a temporally separated test set of 993 agricultural question-answer pairs, RAG improved ROUGE-1, ROUGE-2, BLEU- 4, and BERTScore-F1 at every model scale. For Qwen3-4B, RAG increased ROUGE-1 from 0.283 to 0.346 and BLEU-4 from 0.046 to 0.075. LoRA+RAG achieved the highest BERTScore-F1 at every scale, reaching 0.774 for Qwen3-14B, which also attained an accuracy of 0.7314 on 350 agricultural multiple-choice questions. By supporting locally maintained and updatable agricultural knowledge, the framework provides a practical basis for agricultural extension and production decision support under constrained computing and data-control requirements.
Authors
- Vijay John (ORCID: https://orcid.org/0000-0002-9553-0906)
- Weifu Li (ORCID: https://orcid.org/0000-0002-8444-9782)
- Ruozhuo Zheng
- Lin Li
- Bo Wu
- Wen Zhan
- Jiaqing Qiu
Publication Details
- Journal
- International Journal of Wavelets Multiresolution and Information Processing
- Published
- 2026-12-03
- DOI
- https://doi.org/10.1142/s0219691326500499
- Primary Topic
- Topic Modeling
- Type
- article
- Field-Weighted Citation Impact
- 0.00