Telling how accurate an address is, solving for incorrect user location| Zomato

Telling how accurate an address is, solving for incorrect user location| Zomato

Play this article

What were the Problems?

Incorrect user location, which leads to -

• Increase in delivery time
• Increase in driver-customer calls
• Decrease in driver utilization
• Inefficient clubbing
Wrong address rejections in extreme cases

Delivery partner (DP) marking incorrect complete location -

DP payout frauds : Zomato pays Delivery partners for an order. proportional to the distance they’ve travelled, now if the the delivery partner marks the location where they’ve delivered the order, X Kms. away from actual delivery location, we will have to pay them extra for those X Kms.
• Increase in delivery time which in-turn decreases driver utilization

How did I solve it?

Introducing Address Confidence.

Address confidence score is the measure of accuracy/correctness of the coordinates or geo-location of every address. We assign address confidence to customer saved addresses, as well as restaurant addresses.

Here Address Constitutes of Geo-location only, i.e lat/lng.
Orange Cluster : where user marked their location
Green cluster : Cluster formed by GPS pings of delivery partners when they marked the order complete

Actual(green) location vs User Marked(Orange) location

How is customer address confidence calculated?

Address IDs are segregated into 2 categories on basis of number of orders since last 6 months

  • If the Orders are >=3 than only 1 parameter is used:
    • Completed latitude/longitude marked by Rider for the Trip
  • If the Orders < 3 than following 3 parameters are used:
    • Completed latitude/longitude marked by Rider for the Trip
    • Quality of S2 Cell the Address ID lies in (in terms of drop error)
    • GPS ping lat/lng of the user while placing an order and while adding the Address

Using the Completed lat/lng we compute the cluster and basis the distance between centroid of the Densest Cluster and other parameters we assign Confidence to the Address ID

Drop error is defined as the distance between user marked address and actual address where order is delivered(in mtrs.)

Address Confidence scores are in similar Pattern to HTTP status Codes, i.e 1xx, 2xx, 3xx, 4xx, 5xx
1xx : Confidence scores for new added adrs. having low number of orders
2xx : Confidence scores for adrs. having high number of orders
3xx : Confidence scores for adrs. requiring correction in their coordinates
.
.

Examples of High/Medium/Low confidence addresses :

High Confidence Address

Medium Confidence Address

Address Requiring Correction in their Geo-location

How Do We correct the Geo-location of Addresses ?

In a case when the address is to be corrected, we try to predict the customer’s correct location. If we have high confidence in this predicted location, then we update the customer location from the backend itself.

If we do not have high confidence in the customer predicted location, then we send a frontend prompt asking the customer to manually correct his/her location.

Prompts that are sent to Customers