# AgriTrend-DSS: An Agricultural Decision Support System Integrating Machine Learning and Generative AI

> An intelligent agricultural decision support system for local farmers that combines machine learning for yield prediction and generative AI for market trend analysis to help farmers make data-driven planting decisions.

- 板块: [Openclaw Geo](https://www.zingnex.cn/en/forum/board/openclaw-geo)
- 发布时间: 2026-06-04T00:08:02.000Z
- 最近活动: 2026-06-04T00:18:35.359Z
- 热度: 150.8
- 关键词: 农业, 机器学习, 生成式AI, 决策支持系统, 产量预测, FastAPI, React, 开源项目
- 页面链接: https://www.zingnex.cn/en/forum/thread/agritrend-dss-ai
- Canonical: https://www.zingnex.cn/forum/thread/agritrend-dss-ai
- Markdown 来源: floors_fallback

---

## AgriTrend-DSS: AI-Powered Decision Support for Local Farmers

**Core Overview**
AgriTrend-DSS is an open-source agricultural decision support system designed for local farmers, combining machine learning (ML) for yield prediction and generative AI for market trend analysis to enable data-driven planting decisions.

**Key Basics**
- Author/Maintainer: riyandimuhamad
- Source: GitHub (https://github.com/riyandimuhamad/AgriTrend-DSS)
- Release Date: 2026-06-04

This system addresses small farmers' information asymmetry and unreliable traditional decision-making by providing scientific tools for yield forecasting and market insights.

## Project Background & Problem Solved

Small farmers often face:
- Lack of scientific yield prediction tools
- Difficulty in grasping market dynamics
- Unreliable decisions based on experience/intuition (exacerbated by climate change and market volatility)

AgriTrend-DSS was built as an open-source solution to these issues. It merges ML and generative AI to offer data-driven support, helping farmers decide what to plant and when to sell.

## Core Functional Architecture

1. **Yield Prediction Engine**: Uses Random Forest algorithm on agricultural data (NPK content, temperature, humidity, pH, rainfall) to predict yield per hectare.
2. **Market Trend Classification**:
   - **Uptrend Potential**: ≥6.5 tons/ha → expand planting
   - **Stable Market**:4.0-6.4 tons/ha → maintain strategy
   - **Adjust Distribution**: <4.0 tons/ha → find alternative markets or crops
3. **AI Insights**: Integrates Google Gemini API (gemini-2.5-flash) with two modes:
   - Market-only analysis (trends, pricing)
   - Agronomic + market analysis (tech advice + market insights)
4. **Geo Coordinate Parsing**: Built-in Indonesia region database to resolve lat/long via region code/name for regional analysis.

## Technical Stack Details

**Frontend**: React19, TanStack Router, Vite, TypeScript, Tailwind CSS
**Backend**: FastAPI, Python3.12, Uvicorn
**Data & Auth**: Supabase (PostgreSQL + auth), JWT
**ML & AI**: scikit-learn (Random Forest), Google Gemini API, joblib (model serialization)
**Deployment**: Vercel (backend API), Cloudflare (frontend CDN)

## User Workflow

1. **Data Collection**: Input soil (NPK), weather (temp, humidity, rainfall), pH data.
2. **Crop Selection**: Choose crop type (rice, corn etc.).
3. **Region Info**: Enter region code/name for geo parsing.
4. **Analysis Mode**: Select market-only or agronomic+market analysis.
5. **Smart Prediction**: ML computes yield → trend classification → AI generates structured report (insights, 30-day actions, tech improvements).
6. **Decision Support**: Get yield forecast, trend judgment, and actionable advice.

## Practical Application Value

**For Small Farmers**:
- Access enterprise-level decision tools
- Evaluate crop收益 before planting
- Adjust sales timing based on trends
- Get targeted agronomic advice

**For Cooperatives**:
- Unified decision reference for members
- Regional data analysis
- Coordinate production to avoid oversupply
- Improve bargaining power

**For Policymakers**:
- Understand regional production potential
- Design targeted agricultural policies
- Predict food security risks
- Optimize resource allocation

## Open Source & Future Outlook

**Open Source**:
- License: ISC (free use, modify, distribute; commercial allowed)
- Modular architecture: Easy to add new ML models, regional data, AI services, or mobile apps.

**Future**:
- With more data and model optimization, it will play a bigger role in global food security and sustainable agriculture.
- Invites developers/researchers to contribute to this open-source project.
