If you’re already a Hitchhiker, log in to access this content.
Location Detection in the Algorithm| Hitchhikers Platform
What You’ll Learn
In this section, you will learn:
- Why a user’s location is important in Answers
- How we detect user location
Why is location important?
A user’s location is very important if we are searching for any entity that has a location attribute. Even if a user doesn’t input something like “near me” or a specific location, we can usually guess that they’ll want to see entities with locations nearest to them first, all other things being equal.
Because of this, we use location in our ranking decisions. We’ll first apply any of the relevant filtering to return results returned, and then we’ll sort the entities based on proximity to the user.
How do we determine location?
There are three ways we determine a user’s location:
IP Address: We can use a user’s network IP address. This is the least accurate, but will usually be available as a starting point. Common issues with IP-derived location are if you’re on a shared network or on a VPN.
HTML5 Geolocation (Browser Opt-In): This is the most accurate, but has to be explicitly allowed by a user. A user will be prompted to share their location only if we identify they have ‘near me’ intent within their query. Here are some examples of ‘near me’ intent.
- Close By
- Close to me
- Near Me
- In the area
User Query Intent: Of course, if a user specifies a location in the query, that will be the most accurate indicator of the location they’re trying to search for. In order to determine this from a natural language query, we first use Named Entity Recognition and a machine learning model called BERT to understand whether a term has location intent. We then consider the locations in the Knowledge Graph in order to determine the best match against the Address Line 1, City, Region, and Countries of your entities in Answers.
Note: Address Line 1 is currently only supported for US-only experiences.
For example, with a query like “Locations in Springfield”, we first will need to determine that “Springfield” is a
We might have several candidates for “Springfield” however - see below. How can we choose between these?
- Springfield, MO
- Springfield, MA
- Springfield, IL
- Springfield, VA
If we know the only city that has locations in the Knowledge Graph is Springfield, VA, we’ll filter on the location that will return results, as that is what the user is most likely searching for.