HarvestGuard AI
Inspiration
Food security challenges are often identified too late. By the time crop failure, supply shortages, or visible stress become apparent, responders have already lost valuable time to act effectively.
We wanted to build a system that helps people act earlier by transforming scattered environmental signals into a clear and practical early-warning workflow.
We focused on UN SDG 2: Zero Hunger and designed HarvestGuard AI as a decision-support system that helps users detect crop-stress risk, understand the factors driving that risk, and explore appropriate next steps.
What it does
HarvestGuard AI is an AI-powered early-warning platform for crop stress and food-security risk.
A user can search any location, and the system:
- Pulls live environmental signals such as temperature, precipitation, soil moisture, and vegetation proxy data
- Estimates crop-stress risk using a hybrid scoring pipeline
- Explains the strongest drivers behind the result
- Projects short-term risk through forecasting
- Simulates worsening conditions using scenario analysis
- Generates audience-specific action briefs for NGOs, donors, school-feeding teams, and field operators
- Supports a participatory feedback loop so field observations can be compared against the model
The goal is not to replace domain experts, but to help decision-makers move faster from raw signals to earlier and clearer action.
How we built it
We built HarvestGuard AI as an end-to-end system combining data pipelines, machine learning, and AI-driven explanations.
The backend is powered by FastAPI, which handles data ingestion, normalization, and risk computation. The frontend is built with Next.js and TypeScript, providing an interactive dashboard for search, visualization, forecasting, and scenario analysis.
We integrated multiple live data sources, including Open-Meteo for weather data, NASA POWER for environmental signals, and Nominatim for geolocation.
The core intelligence is a hybrid risk engine that combines rule-based scoring with a machine learning classifier. This allows the system to remain robust while still capturing patterns in the data.
For explainability, we implemented feature contribution analysis inspired by SHAP-style reasoning so users can understand why a particular risk score was generated.
An OpenAI-powered layer is used to generate structured, audience-aware action briefs and translate technical outputs into clear, actionable insights.
SQLite is used for storing workflow data and maintaining a feedback loop where field observations can be recorded and compared with model predictions.
Challenges we ran into
One of the main challenges was balancing technical depth with clarity. We wanted the system to be rigorous and data-driven, while still being understandable to non-technical users and judges. This required simplifying the interface and focusing on the most important outputs.
Another challenge was dealing with variability in live environmental data. APIs behave differently across regions, and some signals are weaker or unavailable depending on location. We designed the system to remain useful even under incomplete data conditions.
We also had to address trust. Instead of presenting the system as a perfect predictor, we positioned it as a decision-support tool with explainability, scenario analysis, forecasting, and a feedback loop.
Accomplishments that we're proud of
We are proud that HarvestGuard AI functions as a complete workflow rather than a single model or interface.
It integrates:
- Live environmental data ingestion
- Hybrid AI-based risk scoring
- Explainable outputs
- Scenario simulation
- Short-term forecasting
- Stakeholder-specific recommendations
- Participatory feedback
Most importantly, it helps answer not just what the risk is, but also why it exists, how it might evolve, and what actions different stakeholders can take.
What we learned
We learned that building effective social-impact AI systems requires more than just predictive models.
A useful system must clearly explain its outputs, communicate uncertainty, adapt to different user needs, and incorporate real-world feedback.
We also gained experience in combining live data pipelines, frontend product design, explainable machine learning, and AI-driven communication into a cohesive end-to-end system.
What's next for HarvestGuard AI
In the future, we plan to expand the system with richer geospatial visualizations, improved forecasting models with uncertainty estimation, and region-to-region comparison capabilities.
We also aim to strengthen the feedback loop by incorporating user submissions into model retraining and to provide more advanced reporting tools for operational teams.
Tagline
Predict. Explain. Act.
Built With
- css
- fastapi
- html
- javascript
- langchain
- langgraph
- nasa-power
- next.js
- nominatim
- numpy
- open-meteo
- openai-api
- python
- react
- scikit-learn
- sentinel
- shap
- sqlite
- typescript
- uvicorn
- xgboost
Log in or sign up for Devpost to join the conversation.