Smart Crop AI Advisor for Precision Farming and Pest Detection
Main Article Content
Abstract
Agriculture in India faces persistent challenges: fragmented advisory networks, erratic weather, rising input costs, and limited access to domain expertise for smallholder farmers. This paper presents Smart Crop AI Advisor (SCAA), an intelligent web- based farming assistant that combines Retrieval-Augmented Generation (RAG), convolutional neural networks (CNN), and real-time weather integration to deliver personalized, context- aware agricultural guidance. SCAA employs the all-MiniLM- L6-v2 embedding model to convert knowledge-base documents into dense vector representations, which are indexed in a FAISS similarity store. At inference, the Mistral-7B-Instruct language model retrieves the top-k (k=3) most relevant document chunks and synthesizes a grounded response. Complementary modules handle AI-driven pest and disease identification through image upload, NPK-aware soil analysis, and a five-day weather dashboard sourced from the OpenWeatherMap API. A complete farming guide and seasonal crop recommendation engine further enrich the platform. Experimental evaluation on a custom query set (n=200) shows a BLEU score of 0.74 for chatbot responses, 91.4% accuracy in crop recommendation, and 88.7% accuracy in CNN-based pest detection. The system achieves a mean end-to- end response latency of 2.1 seconds, confirming practical suitability for real-world deployment. SCAA demonstrates that integrating RAG-based language models with domain-specific agricultural data markedly reduces AI hallucination while improving advice relevance for rural farmers.