Abstract: Although supervised fine-tuning (SFT) and retrieval-augmented generation (RAG) can help large language models (LLMs) incorporate domain knowledge, they have the following limitations: (1) Data scarcity. There is a severe lack of high-quality data and knowledge bases on dialogue in agriculture. (2) Token-level oversight. Current SFT primarily focuses on fitting general tokens, neglecting agricultural-specific tokens. It leads to omissions of critical information in responses. (3) Sentence-level hurdle. Agricultural queries necessitate sentence-level evidence support from domain knowledge bases, which poses a challenge to precision evidence retrievers. This paper introduces a novel Knowledge-guided Agriculture LLM (KALLM) designed to facilitate multi-task decision-making in agricultural settings. We begin by addressing the data quality issue by establishing an annotation standard and constructing a comprehensive dataset consisting of 220,000 Q&A pairs derived from authoritative agricultural documents. At the token level, we propose a knowledge-coordinated SFT approach that enhances the representation of agriculture-specific tokens by amplifying their significance during the decoding process. At the sentence level, we introduce a self-reflective RAG mechanism based on topic matching to improve the accuracy of evidence retrieval. Experimental results compared with seven competitive open-domain LLMs and the current SFT-RAG pipeline show that our KALLM achieves state-of-the-art performance and is significantly superior to existing generation frameworks in terms of response fluency, accuracy, and domain fidelity.
Loading