Inspiration

Agriculture is the backbone of Rwanda, yet many smallholder farmers still rely on guesswork, leading to low yields and financial instability. We wanted to build Igisubizo Muhinzi to give farmer data-driven advice. We were inspired by the potential of the NISR Seasonal Agricultural Survey (SAS) to transform raw government statistics into an actionable mobile advisor

What it does

Igisubizo Muhinzi App is an evidence-based crop advisor. A farmer inputs their location, the current planting season (A or B), their land slope, and what seeds or fertilizers they have.

  • The Brain: Our custom Random Forest model analyzes these factors against 101,259 historical success records to predict the crop most likely to thrive.
  • The Claude AI Core: The system is integrated with Claude AI to act as the "Intelligence Layer." Once the model predicts a crop, Claude AI interprets the technical data (slope, season, and inputs) to provide a vital recommendations.

How we built it

We followed a rigorous Data Science pipeline:

  • Data Engineering: Merged multi-seasonal STATA microdata from NISR, cleaning over 100k records.
  • Machine Learning: Built and tuned a Random Forest Classifier. We achieved a refined accuracy of 28.7% across 21 crops, focusing on "Success Scenarios" (plots yielding above the regional median).
  • Full-Stack Integration: Developed a FastAPI backend to orchestrate the flow between our ML model and the Claude API, serving the results to a Flutter frontend.
  • Expert Layer: Integrated a Large Language Model (LLM) to act as a bridge between technical predictions and human-friendly agricultural advice.

Challenges we faced

  • Data Complexity: Working with raw STATA microdata required extensive cleaning and encoding of 30 different districts and 21 crop types.
  • Seasonality: Aligning data from both Season A and Season B to create a "Season-Aware" model was difficult but essential for accuracy in Rwanda's climate.
  • API Stability: Implementing a resilient "Retry Strategy" for our backend to ensure farmers in areas with unstable internet still receive their advice.

Accomplishments we're proud of

  • Training a model on actual national survey data rather than synthetic datasets.
  • Achieving 76% Precision for Maize recommendations, providing highly reliable advice for Rwanda's most critical staple crop.
  • Building a full-stack solution that works entirely in Kinyarwanda and English.

What we learned

We learned that data is only as good as its accessibility. A 30% accurate model in the hands of a farmer is more valuable than a 90% accurate model sitting in a government PDF. We also mastered the art of hybrid AI -combining predictive ML with generative reasoning.

Built With

Share this project:

Updates