Stop eating cold delivery food.
Ember is a heat-aware food-delivery intelligence layer designed to predict whether a meal will arrive hot, identify where heat is being lost, and help customers, restaurants, and delivery partners act before the experience goes bad.
Core idea: Don't measure food temperature after the problem happens. Predict the risk of a cold meal before it reaches the customer.
Food can leave a restaurant hot and still arrive cold because of preparation time, pickup delays, rider travel time, traffic, weather, packaging, restaurant-to-customer distance, and batching.
Today's delivery experience mostly optimizes for time and logistics. Ember adds another objective: food heat retention.
- π‘οΈ Heat Risk Prediction β estimates the probability that an order will arrive below an acceptable serving temperature.
- β±οΈ Delay Detection β identifies orders spending too long between preparation, pickup, and delivery.
- π¦ Packaging Intelligence β learns which restaurant/package combinations retain heat better.
- π΅ Rider Delay Signals β detects unusually slow delivery segments and surfaces actionable nudges.
- πΈ Cold-Meal Refund Automation β supports rule-based or model-assisted refund decisions.
- β Crowdsourced Heat Ratings β lets customers report whether food arrived hot, warm, lukewarm, or cold.
- π Restaurant Heat Analytics β shows restaurants where heat loss is occurring and which interventions help.
- π Delivery Platform Integration β designed as an API/service that could sit alongside existing delivery platforms rather than replacing them.
The first version should stay brutally simple:
- Customer/order data enters Ember.
- Ember calculates a Cold Food Risk Score.
- The system identifies the main risk factors.
- A recommendation is generated:
none,nudge,priority, orrefund review. - The customer can submit a post-delivery heat rating.
- Ratings feed the prediction model and restaurant analytics.
Order placed
β
Restaurant prep estimate
β
Pickup ETA + route + distance + weather
β
βββββββββββββββββββββββββββββββ
β Ember Heat Engine β
β β
β Heat Risk: 82% π₯ β
β Main risk: pickup delay β
β Expected arrival: 38 min β
βββββββββββββββββββββββββββββββ
β
Action: prioritize pickup / notify rider
β
Delivery
β
Customer heat rating
β
Feedback β model improvement
Ember is initially designed as a modular Python service so the prediction logic can evolve independently from APIs, integrations, and the user interface.
ββββββββββββββββββββββ
β Delivery Platform β
β / Restaurant Data β
βββββββββββ¬βββββββββββ
β
βΌ
ββββββββββββββββββββββ
β Ember API β
βββββββββββ¬βββββββββββ
β
βββββββββββββββββββββΌββββββββββββββββββββ
βΌ βΌ βΌ
Heat Prediction Delay Analysis Rating System
β β β
βββββββββββββββββββββΌββββββββββββββββββββ
βΌ
ββββββββββββββββββββββ
β Decision / Actions β
β nudge β’ priority β
β refund β’ analytics β
βββββββββββ¬βββββββββββ
βΌ
ββββββββββββββββββββββ
β Database / Events β
ββββββββββββββββββββββ
Ember/
βββ app/
β βββ api/ # HTTP/API routes
β βββ core/ # Configuration and shared infrastructure
β βββ models/ # Domain and API schemas
β βββ services/ # Business logic
β β βββ heat_prediction.py
β β βββ delay_analysis.py
β β βββ refund_engine.py
β β βββ rating_engine.py
β βββ main.py # Application entry point
βββ data/
β βββ raw/ # Raw datasets (gitignored)
β βββ processed/ # Processed datasets (gitignored)
βββ models/ # Trained model artifacts (gitignored)
βββ tests/ # Automated tests
βββ docs/ # Architecture and research notes
βββ .env.example
βββ .gitignore
βββ pyproject.toml
βββ LICENSE
βββ README.md
The initial model does not need expensive deep learning. Start with interpretable features:
| Feature | Why it matters |
|---|---|
| Preparation time | Food cools while waiting to be completed |
| Pickup delay | Hot food sitting idle is a major risk |
| Delivery duration | Longer exposure generally increases cooling |
| Restaurant-customer distance | More travel means more heat loss |
| Weather | Ambient temperature affects cooling |
| Packaging type | Insulation strongly affects retention |
| Food category | Different meals cool at different rates |
| Order batching | Extra stops can increase delivery time |
| Historical restaurant performance | Captures recurring operational problems |
| Historical rider/route delay | Captures predictable logistics risk |
The first prediction target can be:
P(cold_on_arrival | order, restaurant, route, weather, packaging, timing)
Later versions can use survival analysis, gradient boosting, time-series features, or physics-informed cooling models.
POST /api/v1/predictions/heat-risk{
"restaurant_id": "rest_123",
"food_category": "biryani",
"distance_km": 7.2,
"estimated_delivery_minutes": 36,
"pickup_delay_minutes": 8,
"packaging_type": "standard",
"ambient_temperature_c": 31
}Example response:
{
"heat_risk": 0.82,
"risk_level": "high",
"expected_state": "lukewarm_or_cold",
"recommended_action": "priority_pickup"
}POST /api/v1/ratings{
"order_id": "ord_123",
"temperature_rating": "cold",
"packaging_rating": 2
}- Repository created
- Project structure
- FastAPI service
- Health endpoint
- Order schema
- Heat-risk API
- Synthetic order dataset
- Baseline cooling model
- Feature engineering
- Baseline ML model
- Evaluation pipeline
- Explainable risk factors
- Customer heat rating
- Restaurant dashboard
- Refund rules engine
- Rider delay detection
- Event logging
- Collect real delivery data
- Partner with restaurants
- Compare predicted vs reported temperature
- Measure refund reduction
- Measure customer satisfaction
Ember should optimize for measurable outcomes, not just model accuracy.
Model metrics
- ROC-AUC / PR-AUC
- Calibration error
- Brier score
- MAE for temperature prediction
Product metrics
- Cold-order rate
- Average delivery heat rating
- False refund rate
- Refund cost per order
- Pickup-delay reduction
- Customer complaint reduction
A strong research angle is disruption-aware food temperature prediction for last-mile delivery: combining delivery events, route characteristics, environmental conditions, packaging, and historical feedback to predict thermal quality at arrival.
This can eventually become both a research project and a deployable product.
Ember is being developed incrementally. Start with the smallest useful component, add tests, and keep the prediction system explainable.
MIT Β© 2026 DHARAVATH SATVIK