Inspiration
Krishi Seva AI – Bharat was inspired by a simple but powerful problem: farmers often struggle to access fast, reliable, and structured crop protection guidance in their own language.
Agricultural knowledge is available across research papers, PDFs, extension manuals, and scattered resources, but it is rarely accessible in real time during field-level decision making.
I wanted to build a production-ready GenAI system that could bridge this gap using Retrieval-Augmented Generation (RAG), combining agricultural expertise with low-latency AI responses for practical farmer use.
The goal was not just to build another chatbot, but to create a reliable agricultural intelligence system capable of supporting disease diagnosis, pest management, integrated pest management (IPM), and spray recommendations across real-world farming scenarios.
What it does
Krishi Seva AI – Bharat is a multilingual agricultural RAG assistant designed for crop disease diagnosis and crop protection support.
It helps answer questions such as:
- Panama disease in banana
- Cotton bollworm IPM
- Rice blast disease management
- Biopesticide recommendations
- Vegetable pest biological control
- Disease symptoms, diagnosis, and treatment tables
The system provides:
- Context-grounded responses using agricultural PDFs
- Structured markdown table outputs
- RAG → Hybrid → Fallback architecture
- Low-latency inference for real-time use
- Precision-focused agricultural recommendations
This makes the system practical for both farmers and agritech deployment use cases.
How I built it
The system was built using:
- Python
- LangChain
- FAISS Vector Database
- HuggingFace Embeddings (all-MiniLM-L6-v2)
- Groq API
- LLaMA 3.3 70B
- Streamlit for UI
- FastAPI for API deployment
- Hugging Face Spaces for public deployment
The workflow includes:
- PDF ingestion from agriculture domain documents
- Chunking and embedding generation
- FAISS vector indexing
- Retrieval pipeline using semantic similarity
- Context-grounded prompt engineering
- Response generation using Groq LLM
- Modular evaluation pipeline for precision, recall, relevance, latency, and token cost
This created a reliable production-ready agricultural AI system.
Challenges I ran into
Some major challenges included:
- FAISS index failures during deployment
- Git LFS handling for vector index files
- Retrieval precision tuning for domain-specific queries
- Preventing hallucinations in LLM responses
- Balancing recall and faithfulness
- Ensuring low latency while maintaining strong answer quality
Several iterations were required to stabilize the retrieval pipeline and achieve strong evaluation metrics.
Accomplishments that I'm proud of
The strongest achievement was reaching:
- Precision@K: 1.0
- Strong recall performance
- 100% RAG mode execution
- Stable low-latency inference
- Real deployment on Hugging Face Spaces
This validated that the system was not just a prototype, but a production-ready RAG solution for agriculture.
I am especially proud that the project connects GenAI with real-world farmer impact rather than only theoretical AI demonstrations.
What I learned
This project helped me deeply understand:
- Production-grade RAG architecture
- Retrieval optimization
- Prompt engineering for grounded responses
- FAISS debugging and vector database handling
- Evaluation beyond simple LLM outputs
- Real-world deployment challenges in GenAI systems
It also strengthened my thinking as both a Data Scientist and an AI Product Builder.
What's next for Krishi Seva AI – Bharat
Next improvements include:
- Support for more Indian regional languages
- Voice-based farmer interaction
- Image-based crop disease diagnosis
- Satellite and weather signal integration
- Mobile-first deployment for field usage
- Enterprise-scale agritech integrations
The long-term vision is to make Krishi Seva AI – Bharat a scalable agricultural intelligence platform for farmers across Bharat.

Log in or sign up for Devpost to join the conversation.