AgroSure
Ensuring Financial Freedom For farmers
Created on 29th June 2025
β’
AgroSure
Ensuring Financial Freedom For farmers
The problem AgroSure solves
π The Problem We Solve
Farmers across India face enormous challenges due to:
- π Language barriers when accessing insurance policies or government schemes
- π Inaccurate risk prediction, leading to financial loss due to crop failure
- π§Ύ Manual claim processes prone to fraud, delays, or human error
- β Lack of access to reliable, contextual AI assistance tuned to their agricultural needs
These problems reduce trust in insurance, delay financial assistance, and ultimately affect the livelihood of millions of farmers.
π§ What Weβre Building
We are building AgriSure.ai, a multilingual AI insurance & microfinance assistant built specifically for Indian farmers.
Our system leverages cutting-edge AI models across computer vision, NLP, and time-series forecasting to deliver:
π Accurate insights, π yield predictions, π£οΈ voice-based insurance explanation, and π€ fraud-proof claim verification.
π οΈ Core Components & How They Help
π± 1. Loan & Yield Forecasting with Facebook Prophet
"Plan ahead with accurate seasonal yield forecasts and loan eligibility assessment."
- Uses Facebook Prophet for time-series forecasting on crop yield based on:
- Historical yields
- Location-specific weather (via Tomorrow.io API)
- Soil health and rainfall data
- Forecasts are used to:
- Compute climate risk scores
- Determine loan eligibility and insurance needs in advance
πΎ 2. Crop Type Classification with ConvNeXt-Tiny
"Auto-detect the crop type using just an image."
- Uses ConvNeXt-Tiny CNN to classify among multiple crop types (e.g., Wheat, Jute, Cotton, Paddy, etc.)
- Ensures:
- Cross-verification during claim
- Policy eligibility matching
- Automated form-filling based on image analysis
πΎ 3. Damage Classification with EfficientNetV2-RW-M
"Verify whether the crop damage is genuine and how severe it is."
- Trained using real-world crop damage datasets
- Classifies into levels like:
- Healthy
- Mild Damage
- Severe Damage
- Helps auto-validate whether a claim is eligible based on actual damage β reducing fraud and manual checking
π§ 4. RAG-based AI Agent (Fine-tuned for Farmers' Needs)
"Ask anything in your language β from PMFBY policy to insurance claim steps."
- Built using RAG pipeline
- Vector search powered by
all-MiniLM-L6-v2 - Fine-tuned using
KisanVaani/agriculture-qa-english-onlyfor high relevance to farming domain - Supports:
- Voice or text-based queries
- Answers in local language
- Policy interpretation, eligibility checking, subsidy FAQs, etc.
π How It Makes Processes Safer, Smarter, and Simpler
| Task | Traditional Method | AgriSure.ai Solution |
|---|---|---|
| Crop Damage Assessment | Manual Inspection | CV-based classification with EfficientNetV2 |
| Crop Type Verification | Manual input | Auto-detected via ConvNeXt-Tiny |
| Yield Forecasting | No accurate prediction | Prophet-based AI yield estimation |
| Insurance Q&A | Confusing forms, jargon | RAG-based voice explainer in local language |
| Claim Verification | Offline, fraud-prone | GPS + image + weather-based AI analysis |
| Loan Risk Assessment | Manual, slow | Real-time risk scoring using AI forecasts |
π Real-World Impact
- π― Better loan approval with data-driven forecasts
- π§Ύ Faster and fairer insurance claims
- π Inclusive access via local languages and voice input
- π Reduced fraud through AI-based validation
π§ Technologies Used
- π Time-Series Forecasting: Facebook Prophet
- πΌοΈ Vision Models: EfficientNetV2-RW-M (damage), ConvNeXt-Tiny (crop type)
- π RAG + Retrieval Models: LangChain + FAISS +
all-MiniLM-L6-v2 - π¦οΈ External APIs: Tomorrow.io for weather, soil, and climate data
- π GeoVerification: GPS location matching with PM-KISAN/Bhulekh datasets
Challenges we ran into
π§ Challenges We Ran Into
Building AgriSure.ai was not easy. The idea was ambitious β to combine multiple ML paradigms (CV, NLP, time-series) with real-world geospatial and weather data, all tailored for Indian farmers. Here are some of the major challenges we faced:
π 1. RAG Agent Hallucination & Poor Retrieval Quality
We initially built our RAG (Retrieval-Augmented Generation) module using LangChain and FAISS, expecting it to answer farmers' questions from policy PDFs and government FAQ datasets. However, we ran into several issues:
π§ Problems:
- The retriever often returned irrelevant chunks despite semantic search
- The LLM would hallucinate answers when the chunk wasnβt precise
- Multilingual support (Bengali, Hindi) was unstable with default pipelines
- Chunking policies broke the context for longer legal clauses
π οΈ How We Solved It:
- Fine-tuned the retriever using
all-MiniLM-L6-v2for better vector search results - Switched to custom overlapping chunking logic (window size = 350 tokens, stride = 150)
- Integrated language detection + translation wrappers for multilingual queries
- Used KisanVaani agriculture Q&A dataset to fine-tune the answer generation model and reduce hallucination
π§ 2. Model Inference Bottlenecks (Vision Models)
We used EfficientNetV2-RW-M for damage classification and ConvNeXt-Tiny for multi-class crop classification. These models were trained on real-world crop datasets and worked well in isolation. But combining them in a single pipeline caused:
π§ Problems:
- High latency during inference when both models were called
- TorchVision transforms conflicted between datasets
- Model sizes were large, causing memory spikes in constrained environments (Colab, Docker, etc.)
π οΈ How We Solved It:
- Batched image processing and used
@torch.inference_mode()with half precision (float16) where available - Used model caching in a single shared PyTorch device context
- Converted models to TorchScript for lighter deployment
- Rewrote preprocessing transforms using a unified class compatible with both models
π°οΈ 3. Remote Sensing Data Pipeline (Sentinel/Landsat)
We wanted to integrate NDVI and EVI from Sentinel-2 and Landsat into Prophet-based forecasting. While the idea was powerful, the implementation was painful:
π§ Problems:
- Huge file sizes and cloud masking issues in raw .tiff images
- Misalignment between temporal frequency of NDVI updates and Prophetβs daily granularity
- Lack of labeled region metadata for mapping NDVI to farmer fields
π οΈ How We Solved It:
- Used Google Earth Engine (GEE) to extract NDVI time series over bounding boxes
- Downsampled to weekly average NDVI, which aligned better with Prophet's seasonal trend detection
- Created a local region-to-GPS mapping layer using PM-KISAN data to automate bounding box selection
π€ 4. Real-World Dataset Challenges
Working with real-world agri datasets (like crop damage, soil health, or weather forecast) meant:
π§ Problems:
- Missing values, inconsistent formats across CSVs
- Different spatial resolutions (soil data vs satellite tiles)
- No common farmer ID or crop ID to merge across datasets
π οΈ How We Solved It:
- Built a custom ETL pipeline to clean, normalize, and geotag records
- Used spatial joins with Shapely and GeoPandas to align soil data with image tiles
- Imputed missing data using temporal and spatial interpolation (e.g., median fill for NDVI, KNN for soil NPK)
π§ͺ Testing & Debugging RAG + CV + Forecast Together
Getting all systems to work together β RAG for Q&A, CV for damage detection, forecasting for yield β created serious edge-case issues.
- One bug we faced was geo-validation falsely rejecting valid claims because of coordinate format mismatch (
lat,longvslong,lat) - Another issue was inconsistent JSON response structure across modules, causing errors in downstream integration
β We ultimately wrote a unified
ResultBuilderclass to merge results across all AI modules into a single, clean JSON format for our backend.
π Key Learnings
- π§ RAG isnβt just plug-and-play β high-quality chunking, domain-specific tuning, and multilingual bridging are critical.
- π¦ Model integration is more than accuracy β we had to think about speed, memory, and deployment early.
- π Real-world data is messy. But with patience and preprocessing, it becomes your strongest asset.
