Preparation time
refused to sit still
In-store time used to swing from four minutes off-peak to twenty-five minutes or more during the weekend rush. One average could not describe a kitchen that changed by the hour.
We built Promise Time for Americana, a per-store machine learning system that predicts how long every order spends in the kitchen, so the arrival window a customer sees stays honest.
A static average was a blunt instrument. It broke down at exactly the moments that mattered the most: peak hours, public holidays, and bad weather. Four problems stood in the way of anything better.
In-store time used to swing from four minutes off-peak to twenty-five minutes or more during the weekend rush. One average could not describe a kitchen that changed by the hour.
Each store carried its own capacity, staffing, and menu mix. A single global model trained across the network would have flattened those differences and generalized to none of them.
A driver who arrived before the food waited idle, and the order ran late on the screen. A driver who arrived after cost nothing. Under-prediction hurt far more than over-prediction, and the model had to know that.
Weather, public holidays, and time-of-day patterns drove order volume, yet none of them fed any model. Historical orders sat in per-store CSV files with no live pipeline to read them.
We built Promise Time as a fleet of per-store models, each learning the rhythm of its own kitchen. Every prediction reads time, weather, holidays, live workload, and recent kitchen velocity, then gets corrected against the orders that have just finished. The output feeds the arrival window that the customer sees in the app.
Promise Time trains an independent XGBoost regressor for each of the 11 stores. One store's lunch rush never contaminates another's, and any location can be retrained on its own as its menu, staffing, or footfall shifts. The model estimates in-store time the instant an order is placed, and that estimate is what powers the arrival window on the customer's screen.
The result is the honest arrival window a customer can plan around, set the moment they order and held all the way to the doorstep.
The business cost of error was lopsided, as was the training objective. Promise Time uses an asymmetric mean-squared-error loss that penalizes under-predictions three times harder than over-predictions, with weights set at 3.0 against 1.0.
That single design choice baked the priority into every training run. It is better to have a driver wait two minutes for food than to have food sit five minutes waiting for a driver, and the model now leans that way on its own. When timing does slip, the system surfaces it honestly rather than letting the food go cold on a false promise.
Each prediction reads 52 engineered features grouped into six families. Time features capture peak and off-peak rhythm with cyclic sine and cosine encoding. Holiday features track the days around public holidays when demand spikes. Weather features pull temperature, rain, wind, and humidity, because bad weather means more delivery orders.
Now, workload counts the orders already in progress when a new one lands. Lag features roll the mean in-store time across seven windows, from ten minutes to two hours, to read recent kitchen velocity. Source dummies flag whether the order came from the app, the web, or an aggregator.
Models learn patterns, but they cannot see a fryer that went down ten minutes ago or a no-show on the line. So every prediction passes through a recency adjustment: an inverse-distance-weighted correction over the last 60 minutes of completed orders.
Orders that finished moments ago count for far more than orders from the top of the hour. When a store suddenly slows, Promise Time feels it before the next prediction goes out.
Promise Time ships as a FastAPI service behind a single Uvicorn worker, a deliberate choice. XGBoost already saturates every CPU core, so extra workers would only double the memory each pod holds. Models load on first request and stay cached, keeping P99 prediction latency under 50 milliseconds while roughly 4 GB of per-store models sit in memory.
The whole system runs on Azure, containerized through ACR into AKS with autoscaling on CPU and memory, with weather and holiday lookups, secrets, and monitoring wired in around it.
Promise Time replaced a one-size-fits-all approach with a per-store prediction tuned for the real cost of error, corrected by the minute, and served fast enough to sit inside live dispatch. It is engineered to a tight accuracy bar.
Promise Time turns the kitchen, the least predictable link in the delivery chain, into a signal dispatch can plan around. Across 11 UAE stores, the arrival window a customer sees is no longer a hopeful average. It is a live, per-store prediction built to stay within ±10% of what actually happens.
We design and ship per-store prediction, predictive ETA, and production ML on Azure for delivery and QSR teams. Bring us the blind spot in your operation and we will model it.
