Inspiration
Farmers often know their crop, quantity, and nearby markets, but one important question is still difficult:
Where should I sell, and when?
The market showing the highest price is not always the market that gives the farmer the most money.
Transport cost, mandi commission, packing, crop spoilage, travel distance, market timing, and the need for quick cash can completely change the final result.
Most platforms show farmers market prices.
FASAL goes one step further.
It turns those prices into a clear decision.
Our goal is simple:
Help a farmer earn more without taking unnecessary risk.
What it does
FASAL is a risk-aware crop selling decision system.
A farmer enters or speaks a few simple details:
- crop and quantity
- current location
- maximum travel distance
- vehicle capacity
- when the money is needed
- preferred risk level
FASAL then compares realistic market and day combinations.
For every option, it considers:
- expected selling price
- transport cost
- mandi commission
- packing and handling cost
- crop spoilage
- market operating days
- travel limits
- vehicle limits
- price uncertainty
- downside risk
FASAL does not simply choose the market with the highest price.
It chooses the option that is expected to leave the farmer with the strongest risk-adjusted income after all costs.
The farmer receives one clear recommendation:
Where to sell.
When to sell.
How much money to expect.
How much better it is than selling locally.
FASAL also generates a Decision Receipt showing:
- expected net income
- complete cost calculation
- expected improvement
- probability of beating the local option
- conservative bad-case income
- safe fallback option
- reason for rejecting riskier alternatives
The goal is to turn complicated market information into one decision the farmer can understand and verify.
How we built it
FASAL is built as a complete decision engine, not as a chatbot or price dashboard.
The backend uses FastAPI with strict data validation.
At the centre of the system is a stochastic optimization engine.
It creates multiple possible future price scenarios and tests every valid market and selling day.
The engine considers both expected income and downside risk using CVaR.
This means FASAL can reject an option that looks profitable on average if it becomes too dangerous when market conditions go wrong.
Every recommendation must also satisfy real-world limits such as:
- market opening days
- farmer's cash deadline
- maximum travel distance
- vehicle capacity
- available forecasts
- crop spoilage over time
The AI layer has a limited role.
It can help understand farmer speech and convert it into structured information.
It does not calculate money, probabilities, or the final recommendation.
Those decisions are produced by the deterministic optimization engine.
We also built:
- multilingual input
- browser voice input
- audio readout
- mobile-first interface
- offline receipt access
- deterministic scenario generation
- replay mode without internet
- append-only Decision Receipts
- tamper-evident receipt hashes
- exact financial reconciliation
- automated testing
- security checks
- reproducible backtesting
- Docker deployment
- a 30-second Judge Mode
For the current prototype, we use a clearly labelled synthetic engineering dataset to demonstrate the complete system.
We do not claim historical farmer income improvements until those results are validated using real, versioned market data.
Challenges we ran into
The biggest challenge was understanding that the highest price is not always the safest or most profitable decision.
A distant market may offer a better price but also require more transport cost, more time, and more spoilage risk.
A farmer may earn less even though the selling price is higher.
FASAL therefore had to calculate the complete decision rather than compare prices.
Another challenge was dealing with uncertainty.
Market prices change.
Produce deteriorates.
Weather, transport, and market conditions can change quickly.
Instead of hiding this uncertainty, FASAL includes it directly in the decision.
We also wanted the system to remain honest.
It would have been easy to show impressive profit numbers without proving how they were calculated.
Instead, every important value can be traced through the Decision Receipt.
Finally, we had to make a complicated optimization system easy to use.
A farmer should not need to understand probability distributions or optimization algorithms.
The final interface therefore focuses on one simple answer:
Sell here, on this day, for this reason.
Accomplishments that we're proud of
We are proud that FASAL is not just a visual prototype.
The recommendation shown to the farmer comes from the actual optimization engine.
Every rupee in the Decision Receipt can be traced back to:
- crop price
- quantity
- transport
- commission
- packing
- handling
- spoilage
- timing
- risk
FASAL can also explain why it rejected another market.
For example, one market may offer a higher average income but also create a much larger chance of loss.
FASAL can choose a slightly lower expected return when it gives the farmer much better protection.
We are also proud of the system's safety features:
- guaranteed local-sale fallback
- strict input validation
- reproducible decisions
- append-only receipts
- version tracking
- tamper-evident hashes
- no hidden AI financial calculations
- no unsupported impact claims
Most importantly, FASAL gives the farmer a decision instead of another dashboard.
What we learned
The biggest lesson was simple:
The best market price and the best farmer decision are not always the same thing.
Real income depends on much more than price.
Transport, commission, crop condition, timing, distance, and uncertainty all matter.
We also learned that uncertainty should be shown honestly.
A farmer should know:
- the expected outcome
- what could happen in a bad case
- what the safer fallback is
Another important lesson was that AI should not control every part of a product.
AI is useful for natural conversation.
But when the system is making financial decisions, the calculations should be transparent, reproducible, and testable.
We also learned that trust is part of engineering.
A recommendation becomes more useful when the farmer can see exactly why it was made.
What's next for FASAL
The next step is to connect FASAL more closely with the physical condition of the crop.
We want to build a low-cost IoT Harvest Node using sensors for temperature and humidity.
The node could stay with a crop crate or storage area and continuously measure the conditions affecting spoilage.
That would create a real feedback loop:
Crop sensors → spoilage estimate → market decision → farmer income
For example, if tomatoes are deteriorating faster than expected because of heat and humidity, FASAL could immediately reconsider whether waiting another day or travelling to a distant mandi is still worth the risk.
We also plan to connect:
- official mandi price sources
- weather information
- transport and route data
- real market calendars
- crop-specific spoilage models
- more crops and varieties
- more mandis and states
- farmer-specific cost profiles
- local-language voice conversations
- partial-lot selling
- FPO and cooperative dashboards
- SMS and WhatsApp alerts
- post-sale outcome tracking
Our long-term goal is not to replace mandis, traders, or farmer experience.
It is to give farmers stronger decision power using real market data, real crop conditions, and transparent engineering.
FASAL should become the decision layer between harvesting a crop and choosing where, when, and how to sell it.
Built With
- agriculture
- ai
- data-analytics
- docker
- esp32
- fastapi
- iot
- machine-learning
- optimization
- python
Log in or sign up for Devpost to join the conversation.