Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Smart Farmer Assistant

🌾 Smart Farmer Assistant — Gen AI Cicada-25

Inspiration

Agriculture depends on timely decisions about crops, weather, and farming practices. However, getting relevant and personalized guidance at the right time can be challenging for farmers. We wanted to explore how Generative AI could make agricultural information more accessible and useful through a simple digital assistant.

This inspired us to build Smart Farmer Assistant, an AI-powered application that combines conversational farming assistance, crop management, and weather-based notifications in one platform.

💡 What It Does

Smart Farmer Assistant helps users manage their crops and obtain context-aware farming guidance through the following features:

  • AI-Powered Chat Assistant: Allows users to ask farming-related questions and receive AI-generated guidance.
  • Retrieval-Augmented Generation (RAG): Retrieves relevant context from previous conversations to support more personalized responses.
  • Semantic Search: Uses FAISS vector search and sentence embeddings to find relevant conversational context.
  • Weather-Based Crop Notifications: Integrates weather information through the OpenWeatherMap API to generate crop-specific alerts.
  • Crop Management: Enables users to record and manage crops, locations, planting dates, and growth stages.
  • Notification Dashboard: Organizes notifications into categories and supports read/unread tracking and notification statistics.

The application supports multiple crops, including paddy, wheat, corn, tomato, cotton, potato, and onion.

⚙️ How We Built It

We developed the application using a full-stack architecture with separate frontend, backend, AI, and data-management components.

Frontend: React 19, TypeScript, and Vite provide the user interface and connect users to the application's features.

Backend: Python and FastAPI handle API requests, application logic, crop records, chat interactions, and notifications.

Generative AI and RAG: Ollama with the Llama 3.2 model, LangChain, Sentence Transformers, and FAISS support the conversational AI and retrieval workflow. Google Generative AI is also integrated into the frontend.

Database and Infrastructure: PostgreSQL stores application data, JWT supports authentication, and Docker Compose helps run the application services together.

Weather Integration: The OpenWeatherMap API supplies weather data used to generate relevant crop notifications.

The RAG workflow retrieves relevant context from stored conversations using semantic similarity and uses that context to support more relevant responses. The weather workflow combines weather conditions with crop information and growth stages to generate categorized notifications.

🚧 Challenges We Addressed

One important challenge was connecting multiple components into a single application. The frontend, backend APIs, database, AI services, vector search, and external weather API each have different integration requirements.

Another challenge was designing a useful retrieval workflow for farming conversations. Instead of relying only on a standalone prompt, we incorporated embeddings and FAISS-based semantic search to retrieve relevant context.

We also had to consider how weather information could be translated into crop-specific notifications and how those notifications could be organized so users could easily review them.

📚 What We Learned

Building this project helped us understand how Generative AI can be integrated into a practical full-stack application. We gained experience with RAG architecture, vector databases, semantic search, REST APIs, database integration, external API consumption, and containerized development.

We also learned that an AI-powered application involves more than generating text: data management, retrieval quality, API reliability, and a clear user interface are important parts of the overall system.

🌱 What's Next

Future improvements could include regional-language support, voice-based interaction, integration of verified agricultural knowledge sources, and additional crop-disease assistance. We would also like to evaluate the quality of farming recommendations and improve the reliability and accessibility of the system for farmers with different levels of digital literacy.

🎯 Our Goal

Our goal is to explore how Generative AI can make farming information easier to access and help farmers make more informed crop-management decisions.

Smart Farmer Assistant — bringing AI-powered agricultural guidance closer to farmers.

Built With

  • docker
  • docker-compose
  • faiss
  • fastapi
  • generative-ai
  • google-generative-ai
  • langchain
  • llama-3.2
  • ollama
  • openweathermap-api
  • postgresql
  • python
  • react
  • retrieval-augmented-generation-(rag)
  • sentence-transformers
  • typescript
  • vite
Share this project:

Updates

Submission history