Skip to main content

Uber Eats now updates recommendations within seconds

· Do Minh Tuan · Business Hackers 🚀

Uber Eats now updates recommendations within seconds

Uber published an engineering write-up on how it rebuilt the recommendation system behind the Uber Eats home feed. The two changes it describes are a move from day-old data to near real-time features, and a move from scoring restaurants one at a time to ranking the whole list at once.

I like this one because the interesting decision is what the model gets to look at and when, rather than the model itself.

A recommendation system has two halves. There are features, which are the signals it uses, things like what you clicked, what you ordered and how far away the restaurant is. And there is the model, which turns those signals into a score. Public conversation tends to focus on the model. I would put most of the practical gains in the features.

Day-old data is a product problem

Uber's previous setup used offline features updated in a daily batch. Batch processing means collecting a day of activity, running a job, and having the results ready later. It is cheap and simple and completely blind to what happened this morning.

The post makes the point with a food example. Order pizza on a Friday and the system learns you like pizza. By Sunday, that is the wrong recommendation, and it will keep being wrong until the batch runs again.

Uber moved to what it calls near real-time feature freshness, reducing latency from roughly 24 hours to seconds. Latency here just means the delay between an event happening and the system being able to use it. If you tap three taco places in a row, that is now visible to the ranker immediately.

This is harder than it sounds. Serving a feature in seconds means a streaming pipeline, a store that can answer lookups fast, and a way to handle the case where a feature is missing because the stream is behind. Every one of those is an operational commitment, and the failure mode is subtle: stale features do not crash anything, they just make the feed slightly worse in a way nobody can see in a dashboard. That silence is what worries me most about this kind of system.

Transformers and why sequence matters

Uber also moved from hand-crafted features to transformer-based sequence modelling. A transformer is the architecture behind most modern language models. The relevant property here is that it handles order and context, so a sequence of actions is read as a sequence rather than a bag of counts.

The difference is easy to feel. A bag-of-actions model sees that you clicked sushi, pizza and sushi. A sequence model sees that the sushi clicks came after you searched for something nearby, which is a different story. The post describes it as reading clicks like words in a sentence, and that is close enough.

Sequence modelling also has a cost. It needs history, it needs the history in order, and it needs the same processing at training and serving time. If the training pipeline builds sequences one way and serving builds them another, the model's behaviour quietly diverges. I think this is one of the most common failures in systems like this, and it is invisible until someone compares the two.

Pointwise versus listwise

The second change is about ranking. Pointwise scoring asks one question per item: what is the chance this user likes this restaurant? Then it sorts by score. The result can be a feed of ten places that are all fine and all the same.

Listwise ranking, using what Uber calls a Generative Recommender, scores the list as a whole. The system is choosing a set, not sorting a queue, so it can trade a slightly lower individual score for variety of cuisine, distance or price. That is how you avoid a wall of identical options.

I find this the more transferable idea. If you have ever looked at a search results page and thought 'why are these eight results basically the same product', you have seen a pointwise system doing what it was asked. Ranking a set is a better match for what a person actually wants.

What a small team should copy

The Redis pattern in the post is the cheap version of real-time features: keep the last few actions per user in a fast in-memory store, and let the ranker read them. In-memory means the data lives in RAM rather than on disk, which is why it can answer in microseconds. A sorted set or a short list capped at five items is enough to change what the next page shows.

That is worth doing before any model work. It is a small piece of engineering, it is easy to reason about, and it gives you the data you would need later if you ever train something. I would start there, and I would resist the urge to call it machine learning.

What I would not copy is the assumption that fresher data always helps. It helps when intent changes fast, as it does with food. For a furniture store, the last five clicks are noise, and a weekly signal may be better. Freshness is a property you choose per domain, not a universal good.

The organisational version of that point is that a real-time system needs an owner. Somebody has to watch the lag between an event and its arrival in the feature store, because a pipeline that falls an hour behind looks healthy from the outside. I assume Uber has that person. A team of four probably does not, and the failure is silent.

The thing I would want to know from Uber is how they detect a feature pipeline that has quietly fallen behind. Seconds-old data that is actually four hours old looks exactly like seconds-old data in a model, and the only way to catch it is to measure the lag itself. I would ask for that number before I trusted a real-time feed in production.

Written with AI assistance, reviewed and edited by Do Minh Tuan.