🌾 AgriPrice AI — Helping Farmers Make Smarter Selling Decisions with AI

💡 Inspiration

Agricultural prices can change quickly, and farmers often have to decide when and where to sell their produce with limited information. A good price in one market may not mean a better profit after transportation, storage, and spoilage costs.

We were inspired by a simple question:

What if farmers could use AI to understand future price trends before deciding to sell?

This led us to build AgriPrice AI, an AI-powered market intelligence platform designed to help farmers make more informed selling decisions.

Instead of showing only today's market price, AgriPrice AI combines price forecasting, market comparison, profit calculation, explainable recommendations, multilingual support, voice interaction, and a farmer marketplace into one workflow.


🚀 What We Built

AgriPrice AI allows a farmer to follow a simple flow:

Crop → Location → Market → Quantity → Forecast → Compare → Decide → Sell

The platform provides:

  • 📈 7, 14, and 30-day crop price forecasts
  • 🎯 80% prediction intervals to communicate uncertainty
  • 🟢 SELL NOW / MONITOR / WAIT recommendations
  • ⚖️ Market comparison based on net revenue
  • 🧮 Profit calculator including transport, storage, and spoilage
  • 🤖 AgriAdvisor for questions about selling decisions
  • 🎙️ Voice assistant
  • 🌐 Support for English, Tamil, Telugu, Kannada, and Malayalam
  • 🛒 Farmer marketplace for connecting sellers with buyers
  • 🔍 Explainable predictions showing the major factors influencing the forecast
  • 🛠️ Data upload, cleaning, model evaluation, and retraining capabilities
  • ⚡ Demo mode that works without API keys

The application uses a synthetic demonstration dataset containing 28,086 cleaned daily price records and supports an Agmarknet-compatible data format.


🧠 How We Built It

The core of AgriPrice AI is a machine-learning pipeline designed to compare multiple models rather than relying on a single algorithm.

We evaluated:

  • Ridge / Linear Regression
  • Random Forest
  • Histogram Gradient Boosting
  • XGBoost
  • Naive last-price baseline

For each crop-market series, candidate models are evaluated on held-out recent data, and the model with the best hold-out RMSE is selected.

The system currently contains 25 crop × market models.

The forecasting system also generates prediction ranges instead of presenting a single number as a guaranteed future price.

For a forecast $\hat{P}$, the application communicates an estimated interval around the prediction:

$$ P_{future} \in [P_{low}, P_{high}] $$

This makes the system more transparent about uncertainty.

🔍 Explainable Recommendations

We did not want the application to simply say:

“The AI says WAIT.”

Instead, the recommendation system considers factors such as:

  • Recent price changes
  • Seasonal patterns
  • Historical prices
  • Market arrivals
  • Price volatility
  • Forecast uncertainty
  • Crop shelf life
  • Storage costs
  • Quantity being sold

The result is an explainable recommendation such as:

SELL NOW, MONITOR, or WAIT, accompanied by reasons and caveats.


💰 From Price Prediction to Profit

One of the important design decisions was that the highest market price is not necessarily the highest profit.

AgriPrice AI therefore compares markets using estimated net revenue:

$$

\text{Net Revenue}

\text{Expected Revenue}

\text{Transport Cost}

\text{Storage Cost}

\text{Spoilage Cost} $$

This allows farmers to compare markets based on what they may actually retain rather than simply comparing headline prices.

The application also includes a profit calculator that breaks the calculation into gross revenue, spoilage, transportation, storage, and other costs.


🎙️ Making AI Accessible

A major part of the project was making the technology easier to use.

AgriPrice AI supports:

English · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം

The voice assistant allows users to speak commands and receive responses through the application. It can run predictions, compare markets, switch languages, open relevant sections, and help pre-fill marketplace listings.

The goal was to make the AI interface useful even for users who may not be comfortable navigating a complex English-only dashboard.


🛒 Closing the Loop With a Marketplace

We wanted AgriPrice AI to go beyond:

“Here is the forecast.”

The platform also includes a farmer marketplace where farmers can list their produce using an AI-suggested asking price and connect with interested buyers.

This creates a complete workflow:

Predict → Compare → Calculate → Decide → Find a Buyer

The marketplace is designed for buyer contact and inquiries; payments are not handled directly by the platform.


📚 What We Learned

Building AgriPrice AI taught us that creating an AI product is much more than training a machine-learning model.

1. Prediction is only useful when it supports a decision

A price forecast by itself does not answer the farmer's real question.

The real question is:

“Should I sell now or wait?”

This motivated us to build the explainable recommendation layer around the forecasting model.

2. Uncertainty matters

A model prediction should not be presented as a guaranteed future price. Prediction intervals and confidence labels make the output more honest and useful.

3. Data quality is critical

Before training models, the data needs to be cleaned and validated. Our data-processing layer handles issues such as missing essential values, duplicates, invalid prices, inconsistent ranges, and outliers.

4. User experience matters as much as the model

Even a strong ML model is difficult to use if its output is confusing. We therefore focused on simple dashboards, explanations, multilingual text, voice interaction, and clear recommendations.

5. Economic decisions require more than one variable

Price alone does not determine profit. Transportation, storage, spoilage, quantity, and market selection can all change the final outcome.


🧩 Challenges We Faced

Data limitations

For the hackathon demonstration, we used a synthetic dataset modelled on Indian mandi price patterns. This allowed us to demonstrate the complete ML pipeline while clearly labelling the data as synthetic.

A major challenge was designing the ingestion layer so that it could later accept real agricultural price exports without requiring major changes to the application.

Forecasting different crop-market series

Different crops and markets can behave differently. Instead of assuming that one model would work equally well everywhere, we implemented candidate-model evaluation and selected models based on hold-out performance.

Explaining machine-learning predictions

A prediction without an explanation can be difficult for a user to trust. We therefore added prediction explanations, historical comparisons, seasonal information, and model-driver information.

Multilingual and voice interaction

Supporting five languages while keeping the interface consistent required careful handling of translated UI text, recommendations, advisor responses, and voice commands.

Balancing ambition with reliability

The project combines forecasting, market comparison, profit calculation, voice, multilingual support, a marketplace, data management, and testing. Making these components work together as one coherent product was one of the biggest engineering challenges.


📊 Results

Our demonstration system currently reports:

  • 25 crop × market models
  • 28,086 cleaned daily price rows
  • 6.0% mean MAPE for selected models on the hold-out evaluation
  • 42% mean RMSE improvement over the “price stays the same” baseline
  • 5 supported languages
  • 33 backend tests + 26 browser E2E steps

These results are from the project's synthetic demonstration dataset and are intended to demonstrate the system's capabilities rather than guarantee real-world future prices.


🌱 What's Next?

The next major step is connecting the platform to real agricultural market data and continuously updating the models as new observations become available.

We would also like to expand:

  • Real-time mandi data integration
  • More crops and markets
  • Better regional forecasting
  • Weather and supply-demand signals
  • More Indian languages
  • Improved voice interaction
  • Buyer verification
  • Mobile-first deployment
  • More personalized recommendations for individual farmers

Our long-term goal is to turn AgriPrice AI from a hackathon prototype into a practical decision-support tool that helps farmers make better-informed, data-driven selling decisions.


❤️ Our Vision

Agriculture already generates enormous amounts of data. The challenge is turning that data into information that people can actually use.

AgriPrice AI brings forecasting, economics, explainability, multilingual interaction, and market access together in one platform.

Data + AI = Better Decisions = Better Opportunities for Farmers. 🌾

Built With

Share this project:

Updates

Submission history