Development of an AI system for reducing food waste (Food Waste AI)
Food waste accounts for 30-40% of purchased products in restaurants and 15-20% in retail. The AI system reduces this through accurate demand forecasting, dynamic inventory management, intelligent pricing of expiring items, and optimized use of leftovers.
Sources of food waste
Primary causes:
- Overproduction: they made more than they sold
- Overordering: purchased more than necessary
- Expiry: failed to sell before expiration
- Spoilage: storage failure, cold chains
By chain links:
- Production and farms: overproduction
- Distribution: damage during transportation
- Retail: expired, substandard
- Catering: overproduction, plate waste
- Households: the largest share of all losses
AI systems for businesses (retail, catering) affect distribution and sales.
Demand Forecasting for Retail
The problem of perishable goods: Dairy, bread, vegetables/fruits – 1-7 days. A 5% forecast error = real money debited.
Special methods:
- Intermittent demand: for niche positions (organic, premium) with rare sales
- Shelf-life aware replenishment: ordering based on the remaining shelf life
def shelf_life_adjusted_order(forecast, current_inventory, expiry_dates, min_shelf_life_at_sale=2):
"""
The remainder that will be sold before the expiration date minus 2 days
= Sellable inventory
Net need = forecast - sellable_inventory
"""
sellable = sum(qty for qty, exp in zip(current_inventory, expiry_dates)
if (exp - today).days >= min_shelf_life_at_sale)
return max(0, forecast - sellable)
Dynamic Markdown Pricing
Expiring items should be sold while they still have value. Dynamic markdown:
def calculate_markdown(current_price, days_remaining, daily_demand, units_remaining):
"""
Optimal Discount: Maximize Revenue from Remaining Stock
under restriction: sell everything before the deadline
"""
# Probability of selling all units at current price
prob_sell = survival_model.predict_proba(days_remaining, units_remaining, daily_demand)
if prob_sell > 0.8:
return 0 # no need to lower
# Optimal discount: price × demand(price) = max revenue
optimal_price = price_optimizer(daily_demand, price_elasticity, days_remaining, units_remaining)
markdown_pct = (current_price - optimal_price) / current_price
return markdown_pct
# Typical markdowns: D-3 before expiration: -15%, D-1: -30%, D0: -50%
For restaurants - Daily Specials: Leftover ingredients → AI generates high-margin "Dish of the Day" offers using ingredients with expiring dates. Recipe database + inventory → LLM generates dish descriptions.
Production Planning for Catering
Optimizer setup:
def calculate_mise_en_place(cover_forecast, menu, inventory, prep_times):
"""
Cover forecast → expected food orders
→ ingredients to prepare
→ comparison with current inventory
→ what needs to be prepared, in what quantity
"""
expected_dishes = cover_forecast @ menu.dish_probability_matrix
expected_ingredients = expected_dishes @ menu.recipe_matrix
# Buffer for walk-ins and variability
prep_with_buffer = expected_ingredients * 1.15
# Minus what is already ready
net_prep = prep_with_buffer - current_prepped_inventory
return net_prep
Batch cooking optimization: For large volumes, cook in batches. AI determines the optimal batch size: a balance between freshness (smaller = better taste) and labor efficiency (larger = fewer kitchen adjustments).
IoT waste monitoring
Smart bin system:
- Scales under garbage bins (Winnow, Orbisk): automatic weighing
- Chamber above the tank + CV: classification of what is emitted
- Real-time data → the chef sees waste by item
# Example of waste monitoring system output
daily_waste_report = {
'total_kg': 12.3,
'value_usd': 45.80,
'top_wasted_items': [
{'item': 'Salmon', 'qty_kg': 2.1, 'cause': 'overproduction'},
{'item': 'Mixed salad', 'qty_kg': 1.8, 'cause': 'plate_waste'},
{'item': 'Croissants', 'qty_kg': 1.4, 'cause': 'expired'}
]
}
Donations and B2B sales of leftovers
Automatic surplus management:
- 24 hours before expiration: publish on Too Good To Go / Eatwith (magic bag)
- In 12 hours: Offer to local charities via the Last Mile API
- 6 hours: transfer to the food bank (logistics via our own courier or platform)
Legally: GOST R 55787-2013 regulates the transfer of products to social protection organizations.
System metrics:
- Food waste reduction: 20-35% от baseline
- Food Cost %: decrease by 1-3 percentage points.
- Markdown recovery rate: revenue from discount sales / cost of potentially written-off inventory
- Waste per cover (restaurants): kg/guest
Deadlines: A basic system with demand forecasting and a Markdown engine will take 4-5 weeks. A full-fledged platform with IoT scales, a donation API, and a recipe optimizer will take 3-4 months.







