Skip to content
AgroSure

AgroSure

Ensuring Financial Freedom For farmers

Created on 29th June 2025

β€’

AgroSure

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-only for 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

TaskTraditional MethodAgriSure.ai Solution
Crop Damage AssessmentManual InspectionCV-based classification with EfficientNetV2
Crop Type VerificationManual inputAuto-detected via ConvNeXt-Tiny
Yield ForecastingNo accurate predictionProphet-based AI yield estimation
Insurance Q&AConfusing forms, jargonRAG-based voice explainer in local language
Claim VerificationOffline, fraud-proneGPS + image + weather-based AI analysis
Loan Risk AssessmentManual, slowReal-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-v2 for 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,long vs long,lat)
  • Another issue was inconsistent JSON response structure across modules, causing errors in downstream integration

βœ… We ultimately wrote a unified ResultBuilder class 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.

Discussion

Builders also viewed

See more projects on Devfolio