Large language models (LLMs) offer new opportunities for agricultural education and decision support, yet their adoption is limited by domain-specific terminology, ambiguous retrieval, and factual inconsistencies. This work presents AgroLLM, a domain-governed agricultural knowledge system that integrates structured textbook-derived knowledge with Retrieval-Augmented Generation (RAG) and a Domain Knowledge Processing Layer (DKPL). The DKPL contributes symbolic domain concepts, causal rules, and agronomic thresholds that guide retrieval and validate model outputs. A curated corpus of nineteen agricultural textbooks was converted into semantically annotated chunks and embedded using Gemini, OpenAI, and Mistral models. Performance was evaluated using a 504-question benchmark aligned with four FAO/USDA domain categories. Three LLMs (Mistral-7B, Gemini 1.5 Flash, and ChatGPT-4o Mini) were assessed for retrieval quality, reasoning accuracy, and DKPL consistency. Results show that ChatGPT-4o Mini with DKPL-constrained RAG achieved the highest accuracy (95.2%), with substantial reductions in hallucinations and numerical violations. The study demonstrates that embedding structured domain knowledge into the RAG pipeline significantly improves factual consistency and produces reliable, context-aware agricultural recommendations. AgroLLM offers a reproducible foundation for developing trustworthy AI-assisted learning and advisory tools in agriculture.
Samuel et al. (Wed,) studied this question.