Litcius/Paper detail

CottonBot: An AI-driven cotton farming assistant and irrigation advisor using LLM-RAG and agentic AI tools

Deus F. Kandamali, Wesley M. Porter, Erin Porter, Alex J. McLemore, Glen C. Rains

2025Smart Agricultural Technology7 citationsDOIOpen Access PDF

Abstract

• Agentic LLM+RAG assistant delivers field-specific irrigation recommendations. • Integrates soil-moisture sensors, weather forecasts and LLM (DAP)-aware policy. • all-MiniLM-L6-v2 + FAISS achieved top retrieval; Chroma eased prototyping. • Local deployment with Ollama + FastAPI + Flutter enables low-cost mobile use. Digital agriculture is transforming crop management by enabling data-driven decision-making. This study introduces CottonBot, an AI-powered assistant designed to support cotton farmers with comprehensive farming guidelines, including pest management, soil fertilization, weed control, nematode management, and real-time, context-aware, farm-specific irrigation recommendations. Unlike traditional retrieval augmented generation (RAG) based systems that rely solely on static knowledge bases, CottonBot integrates RAG with agentic large language model (LLM) tools, utilizing farm-specific soil moisture sensors and local weather forecast APIs to deliver dynamic, actionable, and field-specific recommendations. The system leverages open-weight LLMs and runs locally through Ollama framework, ensuring cost-efficiency, data privacy, and accessibility in resource-limited settings. The study’s experimental setup combined RAG with LLM-based agentic tools. Within the RAG framework, we evaluated multiple embedding models using two retrieval backends: FAISS (Facebook AI similarity search) and Chroma (a vector database). The embedding model, all-MiniLM-L6-v2 paired with FAISS achieved the highest retrieval performance, while Llama 3.1 produced the most faithful and semantically accurate responses. For real-time irrigation support, CottonBot’s agentic tool interprets weighted soil moisture data to provide crop-specific recommendations, demonstrating its utility beyond text retrieval. Finally, CottonBot was deployed as a cross-platform mobile application using FastAPI and Flutter for both iOS and Android. Results indicate that CottonBot enhances decision-making support for cotton farmers, leading to more efficient water use and improved crop yields.

Topics & Concepts

IrrigationAgricultural engineeringAgriculturePrecision agricultureComputer scienceEmbeddingSoftware deploymentEnvironmental scienceAsset (computer security)EngineeringAvatarArtificial intelligenceSmart Agriculture and AIICT in Developing CommunitiesMobile Crowdsensing and Crowdsourcing