Inspiration
The idea for KrishiMate was born from a harsh reality we see in our daily lives: The Price Gap. We realized that a farmer in rural Bilaspur might sell tomatoes for ₹5/kg to a local agent because they lack market knowledge.
What it does
- AI Price Discovery (The Brain): Before listing an item, the farmer types the crop name. Our integrated Gemini AI instantly analyzes real-time data to suggest the Minimum, Average, and Maximum market price in Bilaspur.
2.We eliminated the "Add to Cart" complexity. Buyers simply click a button to Chat on WhatsApp directly with the farmer.
How we built it
Frontend: Pure HTML5, CSS3, and JavaScript. We avoided heavy frameworks to keep load times near zero.
Backend & Database: Google Firebase (Firestore) for real-time data storage and Firebase Authentication for secure user login.
AI Engine: We integrated Google's Gemini 1.5 Flash API. We chose "Flash" for its incredibly low latency, which is crucial for users with spotty internet connections.
Logic Layer: Custom JavaScript modules handle the "Strict Validation" logic, sanitizing user inputs before they even reach the AI or Database to save costs and improve accuracy.
Challenges we ran into
The "Hallucinating AI": Initially, the AI was "too helpful." If a user typed "Nasa Apple", it would try to invent a price for it. We had to spend significant time on Prompt Engineering, creating a "Strict Validator" persona that rejects non-agricultural words and mixed inputs (like "Mango & Laptop").
The "Gemini-Pro" Deprecation: Midway through coding, our API calls started failing with 404 Errors. We realized the gemini-pro model was retired from the free tier. We had to rapidly migrate our codebase to gemini-1.5-flash, which turned out to be a blessing in disguise as it was much faster.
Browser Caching Nightmares: We faced a persistent bug where code updates weren't showing up because the browser was aggressively caching old JavaScript files. We learned to implement Version Busting strategies to force updates.
Accomplishments that we're proud of
Making AI "Strict": We didn't just plug in a chatbot; we engineered it. We are proud of the "Contamination Check" logic that stops spam inputs like "Water + Phone" instantly.
What we learned
Prompt Engineering is Coding User Constraints are Key The Power of Edge Computing
What's next for KrishiMate
We plan to integrate a camera feature where a farmer can simply snap a photo of their harvest, and the AI will auto-detect the crop and quality to suggest a price.
Log in or sign up for Devpost to join the conversation.