AI-powered agricultural intelligence platform for Zimbabwe — AI4I 2026 Track 3
# RimAI — Zimbabwe Agricultural Intelligence Platform
An AI-powered agricultural intelligence platform combining machine learning yield/risk
prediction, explainable AI, weather intelligence, and institutional decision support for
Zimbabwe's farmers, AGRITEX extension officers, and Ministry of Agriculture.
Built for the **2026 AI for Impact Challenge (AI4I) — Track 3: Development**.
---
## Architecture
```
Data Layer (real: FAOSTAT, NASA POWER, NOAA ENSO — synthetic: disclosed agronomic augmentation)
│
▼
Feature Engineering (rainfall anomaly, soil moisture proxy, NDVI proxy, ENSO phase, ...)
│
▼
Machine Learning Models (Ridge regression — yield · XGBoost — risk classification)
│
▼
Explanation Engine → Economic Impact Engine → Recommendation Engine
│
▼
Farmer / AGRITEX / Ministry / Admin Dashboards (Flask + Jinja2, one shared pipeline)
```
See the full technical design and AI-necessity rationale in the written proposal
(`docs/` in the submission package, not this repo).
## Project Structure
```
rimai/
├── app.py # Flask application: routes, auth, RBAC, DB schema
├── core/ # Prediction & reasoning engines
│ ├── harvest_model.py Yield (Ridge) + risk (XGBoost) prediction, PROVINCE_META
│ ├── crop_advisor.py Combines weather + rotation + pest + prediction into one analysis
│ ├── explanation_engine.py Turns model output into cited "why" explanations
│ ├── agronomy_engine.py Crop rotation and pest-risk rule logic
│ ├── farm_manager.py Farm Health Score, Daily Brief, Smart Calendar, Farm Memory
│ └── rimai_assistant_free.py Rule-grounded Virtual Agronomist chat (no external LLM)
├── data_pipeline/ # Data ingestion, synthetic data management, model validation
│ ├── fetch_faostat.py Real FAOSTAT yield history (with disclosed fallback)
│ ├── build_master_dataset.py Merges yield history with NASA POWER weather
│ ├── weather_service.py Live …