TLDR: This research introduces an AI-based knowledge assistant for goat farmers, leveraging Retrieval-Augmented Generation (RAG). It addresses limitations of Large Language Models (LLMs) by integrating structured knowledge (tables, decision trees) and a dual-retrieval mechanism (local knowledge base and online search). The system covers five key domains of goat farming, achieving high accuracy in various Q&A tasks and demonstrating robustness for practical applications, with future plans for multimodal integration and enhanced information filtering.
Goat farming plays a vital role in global agriculture, especially in rural areas where it provides income and food security. However, farmers often face challenges in accessing and interpreting diverse knowledge sources for effective health management and decision-making. Traditional methods and even advanced technologies like Precision Livestock Farming (PLF) often provide raw data or generic alerts without actionable advice, leaving a significant gap between data and practical decisions.
Large Language Models (LLMs) have emerged as powerful tools for knowledge communication across many industries. Yet, their application in livestock farming has been limited by issues such as generating plausible but incorrect information (hallucination), fragmented knowledge across various formats, and outdated information due to reliance on fixed training data.
To address these challenges, researchers have developed an intelligent knowledge assistant system specifically designed to support health management in farmed goats. This system leverages a technology called Retrieval-Augmented Generation (RAG), which helps LLMs ground their responses in verified, domain-specific information, thereby mitigating the risk of hallucinations.
Enhancing Knowledge Understanding
A key innovation of this system is its ability to process heterogeneous data formats. The researchers proposed two structured knowledge processing methods: table textualization and decision-tree textualization. These methods convert complex information from tables (like nutritional formulations) and hierarchical decision trees (used for disease diagnosis) into natural language. This allows the LLM to better understand and reason over structured data, which is crucial since much critical farming knowledge is not in conventional text.
Based on these methods, a comprehensive knowledge base for goat farming was established. This knowledge base spans five essential domains: Disease Prevention and Treatment, Nutrition Management, Rearing Management, Goat Milk Management, and Basic Farming Knowledge. This structured approach improves the LLM’s capacity to generalize across various farming scenarios.
Dual-Retrieval for Real-time Information
The system also integrates a dual-retrieval mechanism to ensure access to both curated domain-specific knowledge and up-to-date information. A local retrieval module accesses the established knowledge base, providing highly relevant content. Additionally, an online search module is activated when local content is insufficient or when users explicitly request real-time updates, ensuring that farmers have access to the latest industry knowledge.
Also Read:
- Small Language Models Show Promise in Formal Logic Reasoning for Ontology Engineering
- GAMA: Securing AI Multi-Agent Systems with Smart Anonymization and Enhanced Reasoning
Robust Performance and Future Directions
To evaluate the system’s effectiveness, six ablation experiments were conducted. The results were impressive, demonstrating that the heterogeneous knowledge fusion method achieved the best performance, with mean accuracies of 87.90% on the validation set and 84.22% on the test set. Across text-based, table-based, and decision-tree-based question-and-answer tasks, accuracy consistently exceeded 85%, validating the effectiveness of integrating structured knowledge within a modular design.
Error analysis identified omission (missing key information) as the most common error, highlighting opportunities to further improve retrieval coverage and context integration. While the online search module showed potential for addressing knowledge gaps, further refinement in filtering and prioritizing external information sources is needed to ensure reliability.
In conclusion, this research highlights the robustness and reliability of the proposed system for practical applications in goat farming. Future work aims to expand the system into a multimodal intelligent assistant, capable of processing visual and auditory inputs, and to integrate knowledge graphs for improved accuracy of external content retrieval. This will further enhance the system’s practicality and adaptive intelligence for the complex world of goat production. You can read the full research paper here.


