Query Understanding Engine in Traveloka Universal Search

Part 1: Introduction on why query understanding is a game changer for Traveloka Search Engine.

Ismail Afiff
Traveloka Engineering Blog
5 min readFeb 11, 2020

--

Fig 1. Search result in Accommodation Product (without query understanding engine — yet) vs in Universal Search (with query understanding engine)

Editor’s Note: This is the first in a series of three posts by Ismail Afiff, a Principal Software Engineer with the Universal Search team, on the Query Understanding Engine that powers Traveloka Universal Search, specifically on the urgencies and deployment benefits that would be advantageous for building complex queries within the Traveloka app. Read the second part:Goal and Implementation.”

The Universal Search team is responsible for delivering solutions that allow users to fulfill their travel and lifetstyle needs through smart query understanding and recognition.

Have you tried exploring and searching using the new universal search bar at the top of the Traveloka app? Did you notice something new with the search capability? If you think that it can now understand complex queries better, giving more relevant results and meaningful recommendations, you’re spot on. It is because we are introducing a new, unprecedented feature in Traveloka search, a Query Understanding Engine.

With the introduction of Query-Understanding-Engine, Traveloka Universal Search now can recognize and understand a lot of complex queries such as “Flight Jakarta Singapore”, “Attractions in Sentosa”, “Hotel near Sydney Opera House”, “Voucher Seribu Rasa Cp”, and many more. And as a result, turning those queries into more meaningful results and recommendations.

Pre Query-Understanding-Engine Era

Fig 2.Search in Eats Product (without query understanding engine — yet) vs Universal Search. Showing the effect of query understanding engine.

Before the introduction of query understanding, Traveloka’s search engine is designed only for single-entity searching. What this means is, it is developed to infer only a single entity from a query. It performs well if the query is meant for only single entity such as queries: “Universal Studios Singapore”, “Marina Bay Sands”, “Sydney”, etc.

Consequently, the old search engine is not able to comprehend more complex queries. It fails to identify query “Hotel Bali” consists of a “Hotel” (accommodation) and a “Bali” (GeoLocation). It will simply find products that have “Hotel Bali” name on it, resulting in “Whiz Prime Hotel Balikpapan” and “Astara Hotel Balikpapan” as the top results.

The limited capability of the old search engine means understanding query’s intention such as Flight from origin to destination, Attraction in an area, Hotel near a place-of-interest, Restaurant voucher near me, etc is impossible.

We try to circumvent this huge limitation using various tricks by including the entity’s geo, its attributes and various factors into searchable entries. Nevertheless, the result is still far from ideal. It still can’t come up with satisfying results, even for a simple “Hotel Bali” query. The old search engine couldn’t understand that the user intention is searching for Accommodation that is located in Bali. It will only returns entities with “hotel bali” name on it.

If you want to know more regarding the old search engine implementation, I’ve written a great deal on it in these articles, part 1, part 2.

Benefits of Query Understanding

The benefit of query understanding is immense.

The obvious one is the ability to give more accurate results for a more complex query, beyond a simple single entity search. This is because the query- understanding-engine is better in inferring user intention compared to the old search engine. Without the query understanding engine, query “cafe monas” will give erroneous results since it tries to find entities with “cafe monas” on it. It fails to understand that user intention is finding a Restaurant with type Cafe near or inside National Monument (Monas).

Fig 3. Example of Universal Search Result

Furthermore, the invaluable benefit of the new query understanding also comes in a more relevant recommendation. Take query “Tour Labuan Bajo” as an example, since the engine understands that the user intention is to find Attraction and Activities with type Tour in Labuan Bajo, Traveloka is able to recommend user’s possible needs for that trip such as city guides, or accommodations located in Labuan Bajo. This will benefit not only the user itself but also Traveloka as a whole. Users will have a better preparation for the trip while Traveloka’s product exposure is increased.

Fig 4. Search results and recommendations for query “Tour labuan bajo” in universal search.

The recommendation system simply wouldn’t work without query understanding. Without the engine, it is difficult to understand that the user might have an intention to visit Labuan Bajo.

Query-Understanding-Engine implementation in Traveloka

There are several ways to implement query understanding engine. Some argue that Machine Learning method is superior to understand the query context, while others argue that for shorter and simpler query, lookup combined with rules might be a better choice. There is no silver bullet for it, each has its own strengths and weaknesses. That’s why sometimes the implementation is a combination of the two.

In choosing the appropriate algorithm for Traveloka Search we also need to consider Traveloka users’ searching behaviour. By analysing user’s behaviour, we can come up with an algorithm that is suitable for the task.

There are a lot more things to discuss on query understanding implementation in Traveloka Universal Search. It will be explored in great detail in part 2 of the series. Stay Tuned.

I am really fortunate to face this fascinating, open-ended search algorithm challenge with my team at Traveloka, one of the largest online travel companies in Southeast Asia. If you’re a software engineer interested in developing state-of-the-wart search system, helping millions users to find their next adventures, have a look at the opportunities on Traveloka’s careers page!

--

--

Ismail Afiff
Traveloka Engineering Blog

Software Engineer, working on Information Retrieval. Passionate about Photography and Classical Guitar.