DEV Community

Cover image for How I Trained an AI Model to Decide Which Uber Eats Orders Are Worth Accepting — and Regained 50% Lost Income
kittam888 SK
kittam888 SK

Posted on

How I Trained an AI Model to Decide Which Uber Eats Orders Are Worth Accepting — and Regained 50% Lost Income

📦 Many assume training AI requires GPUs and complex neural networks.
But to solve real-world problems—like optimizing Uber Eats deliveries—a simple decision model can make a huge difference.

Let me show you how I built a basic AI system to answer one core question:

✅ Will this order result in extra compensation?
❌ Or is it just a time-wasting trip?

🧠 Step 1: Defining the Goal — It's a Classification Problem
Unlike prediction tasks (e.g. forecasting total pay), my focus was classification:

Will this order trigger a compensation? Yes or No?

In New Zealand, Uber Eats sometimes provides extra pay if an order takes longer than expected due to unavoidable factors like restaurant delays, poor weather, or long customer handovers (e.g. customers not answering the door at night).

But the exact compensation logic is not transparent.
That’s where my AI comes in.

🧪 Step 2: Collecting Real Data
Over several weeks, I manually tracked over 50 real Uber Eats deliveries. For each job, I recorded:

Offered pay

Estimated duration

Actual delivery time

Route distance

Whether extra pay was triggered

This hands-on dataset became the training ground for my model.

🔍 Step 3: Pattern Recognition (Threshold Behavior)
I noticed something odd but consistent: Extra compensation kicks in only after you exceed a certain time threshold, and that threshold varies based on the base fare.

Here’s a general guide from my findings:

minutes

Orders completed just under this threshold? No extra pay.
Cross it? You might see a small bonus appear.

I modeled this as a classification boundary using a simple decision tree classifier.

🤖 Step 4: Training the Model
I fed my labeled data into a basic AI model:

Inputs: Estimated time, base fare, trip distance, delivery time

Output: "Will it get compensated?"

Using Python's scikit-learn, I trained a decision tree with high interpretability. It looks something like this:

python
Copy
Edit
from sklearn.tree import DecisionTreeClassifier
model = DecisionTreeClassifier(max_depth=4)
model.fit(X_train, y_train)
With just a few features, the model began correctly classifying whether a job would likely result in compensation.
Enter fullscreen mode Exit fullscreen mode

📉 Efficiency Matters: Why One Order Combo Cost Me More
One early mistake taught me a powerful lesson on time efficiency:

Accepted: a $10 order (ETA 20 min)

Added: a $4 add-on (ETA 5 min) → 2 orders, 25 min expected total

Actual delivery: 40 minutes

Total pay: $14, no extra

But if I had only accepted the $4 order, with prep delay and delivery time of 32 minutes, I could’ve still earned $14 with compensation, while saving distance and effort.

🚫 Two jobs ≠ double earnings.
✅ One smart job can earn more, with less work.

📊 Visualizing the Logic
I created two core visuals:

Decision Tree — with rules like “if base fare < $8 and duration > 30 min → likely compensate”

Threshold Curve — mapping fare vs. time required for compensation

These tools now guide my daily decision-making and reduce bad bets.

💡 What’s Next
In the next article, I’ll explore how this same AI logic can help delivery platforms improve customer satisfaction.

Example:
If Uber knows a job includes a long driveway, rainy night, or gaming customer with headphones, it can offer slightly higher pay upfront. More drivers will accept → faster delivery → happier customers.

AI shouldn’t just benefit the company — it should align everyone’s incentives.

In short: Smart AI doesn’t replace workers — it empowers them.
AI can help platforms and drivers work together better for win-win results.

Stay tuned. 🚦

© Gavin Tam, 2025. All rights reserved. This content may not be republished without permission.

https://kittam888.medium.com/️-how-i-trained-an-ai-model-to-decide-which-uber-eats-orders-are-worth-accepting-and-e7b40676887b

Top comments (0)