
Krishi Sathi AI - AI-Driven Agriculture for Kerala
AI-powered agricultural assistant for Kerala farmers with RAG chatbot, plant disease analysis, weather insights, and government scheme guidance in English and Malayalam
Timeline
2 months
Role
Full Stack Developer
Team
Solo Project
Status
CompletedTechnology Stack
Key Challenges
- Building Kerala-specific RAG chatbot integration with intelligent Groq AI fallback for generic responses
- Implementing bilingual UX (English and Malayalam) across all farmer-facing flows
- Integrating plant disease image analysis API with upload, preview, and treatment recommendations
- Designing OTP-based authentication with protected chatbot and profile routes
Key Learnings
- Multi-API orchestration with primary RAG model and fallback detection logic
- Next.js 14 App Router with server API routes for OTP and chat
- Farmer-focused product design with weather, schemes, and disease modules in one platform
- i18n with React Context and persistent language preferences
Krishi Sathi AI - Empowering Farmers with AI-Driven Agriculture
Overview
Krishi Sathi is an AI-powered agricultural assistant built for Kerala farmers. The platform delivers intelligent chatbot support, plant disease analysis, weather information, and government scheme guidance — in English and Malayalam.
Tagline: Empowering Farmers with AI-Driven Agriculture
GitHub: Tusharkanta407/Krishi-Sathi-v2
Problem Statement
Farmers need localized, trustworthy guidance on crops, diseases, weather, and government schemes — often in their native language. Generic AI tools lack Kerala-specific agricultural context. Krishi Sathi combines a custom RAG model, disease detection, and structured scheme information in one accessible web app.
Key Features
AI Chatbot
- Primary API: Kerala-specific agricultural knowledge from custom RAG model
- Intelligent fallback: Groq AI (Llama 3.3 70B) when responses are too generic
- Multi-language support: English and Malayalam
- Smart detection: switches to fallback when responses like "contact Krishi Bhavan" are detected
Plant Disease Analysis
- Upload plant images for disease detection
- ML-powered analysis via dedicated prediction API
- Detailed reports with treatment recommendations
Weather Information
- Real-time weather for Kerala
- Data tailored for farming decisions
Government Schemes
- Agricultural scheme details, eligibility, and application guidance
Authentication
- OTP-based phone login
- User profiles and chat history
- Protected routes for chatbot features
Architecture
Farmer (Web App - Next.js)
↓
Primary: Kerala RAG Chatbot API
↓ (fallback if generic)
Groq AI (Llama 3.3 70B)
↓
Plant Disease API · Weather · OTP Auth
Tech Stack
| Layer | Technology | |-------|------------| | Frontend | Next.js 14, React, TypeScript | | UI | Tailwind CSS, Shadcn/ui | | AI Primary | Custom Kerala RAG Chatbot API | | AI Fallback | Groq AI | | Auth | Custom OTP system | | Disease ML | Plant disease detection API |
APIs
- Chatbot:
https://krishi-sathi-rag-chatbot.onrender.com/api/chat - Disease: Plant disease prediction API (image upload, POST predict)
- Optional:
GROQ_API_KEYfor enhanced fallback responses
Project Structure
krishi-sathi/
├── app/
│ ├── api/ # chatgpt, send-otp, verify-otp
│ ├── chatbot/
│ ├── login/
│ └── weather/
├── components/
├── contexts/ # i18n language context
├── services/
└── utils/
What I Learned
- Designing fallback logic between domain-specific RAG and general-purpose LLMs
- Building farmer-first UX with bilingual support and low-friction OTP auth
- Integrating multiple external APIs (chat, disease, weather) in one Next.js product
- Detecting low-quality RAG outputs and routing to better responses automatically
Impact
- Localized AI assistant for Kerala agriculture in two languages
- Disease analysis helps farmers act on crop health issues faster
- Scheme and weather modules reduce friction finding actionable farm information
- Production-ready Next.js app deployable on Vercel or similar platforms
Links
- Repository: https://github.com/Tusharkanta407/Krishi-Sathi-v2