The Digital, Data-Driven Demonstration Farm

Research Update: CottonBot – An AI-Driven Cotton Farming Assistant Using Agentic LLM-RAG

At a Glance

ETDS Progress

  • Research Topic: CottonBot – An AI-Driven Cotton Farming Assistant Using Agentic LLM-RAG
  • PI: Glen Rains
  • Team: Deus F. Kandamali, Alex McLemore, Wesley Porter, Erin Porter
  • Main Objective: Leverage LLM-RAG to provide real-time, context aware, and farm-specific cotton farming recommendations, including irrigation decisions, pest management, weed control, and general production guidelines

Motivation

  • Cotton production knowledge is buried in large, complex guidelines, making it difficult for farmers to quickly extract actionable information in real time.
  • Existing IoT soil moisture and weather sensors collect valuable field data but lack real-time intelligence to translate data into decisions (e.g., when and how much to irrigate).
  • There is a critical gap between available agricultural knowledge + sensor data and practical, on-field decision-making support.
  • CottonBot addresses this gap by combining domain knowledge with real-time data to deliver instant, actionable recommendations for farmers.

Proposed Solution

  • Develop CottonBot, an AI-powered decision-support chatbot using Ollama (LLaMA 3) that integrates IoT soil moisture and weather sensor data with domain knowledge.
  • Implement RAG using the 2024 Georgia Cotton Production Guide to extract and deliver context-specific recommendations.
  • Generate real-time, actionable insights for irrigation, fertilization, and field management from combined sensor data + retrieved knowledge.
  • Deploy CottonBot mobile application via a Flutter + FastAPI for accessible, on-field decision support.

Results to Date

An End-to-End RAG pipeline used in CottonBot showing the user interface, the retriever and augmentation processes
  • Best retrieval: all-MiniLM-L6-v2 + FAISS performed highest.
  • Best responses: LLaMA 3.1 (Ollama) produced most accurate outputs.
  • System capability: RAG + agentic tools enabled combined knowledge + sensor-based recommendations.
  • Irrigation support: Model generated field-specific recommendations from soil moisture + weather data.
  • Deployment: Successfully implemented via FastAPI + Flutter mobile app for field trial.​

Next Steps

  • Expand CottonBot to Agri-Bot to support additional crops (peanuts, corn) and livestock by extending the knowledge base with expert-curated resources.
  • Integrate voice recognition for verbal queries and implement an automated feedback system for continuous improvement.
  • Enhance the irrigation decision model by training soil moisture prediction models on larger, more diverse datasets for improved accuracy.
  • Conduct on-field trials (2026 season) to evaluate real-world performance and validate the system.

Citation

Kandamali, D. F., Porter, W. M., Porter, E., McLemore, A., & Rains, G. C. (2025). CottonBot: An AI-driven cotton farming assistant and irrigation advisor using LLM-RAG and agentic AI tools. Smart Agricultural Technology, 12, 101640. https://doi.org/10.1016/j.atech.2025.101640


Discover more from 4D Farm

Subscribe to get the latest posts sent to your email.