{"id":193082,"date":"2023-08-10T16:36:29","date_gmt":"2023-08-10T08:36:29","guid":{"rendered":"https:\/\/www.grab.com\/sg\/?post_type=editorial&#038;p=193082"},"modified":"2024-05-15T14:31:12","modified_gmt":"2024-05-15T06:31:12","slug":"grab-search-bar-machine-learning-data-science","status":"publish","type":"editorial","link":"https:\/\/www.grab.com\/sg\/inside-grab\/stories\/grab-search-bar-machine-learning-data-science\/","title":{"rendered":"How AI helps our search bar seemingly read minds"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"193082\" class=\"elementor elementor-193082\" data-elementor-post-type=\"editorial\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ea668e0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ea668e0\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-bd784a1\" data-id=\"bd784a1\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6817deb gr21-boxed-content  editorial-gr21-boxed-content elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6817deb\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9e28f3c\" data-id=\"9e28f3c\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1b357fd elementor-widget elementor-widget-text-editor\" data-id=\"1b357fd\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>The Grab search bar is meant to provide a friendly, easy-to-use start point for users on the Grab app.<\/p><p>To be useful, the search bar has to seemingly read the user\u2019s mind as it offers the closest match to their search terms with related suggestions. And it has to be fast too, or people will get impatient and leave the app.<\/p><p>Doing this for Southeast Asia means our artificial intelligence (AI) engines have to work with local languages and understand the nuances.\u00a0<\/p><p>For instance, \u201cclinic\u201d in Malaysia is used interchangeably with its Malay spelling, \u201cklinik\u201d. Someone craving some McDonald\u2019s might type \u201c<a href=\"https:\/\/sg.news.yahoo.com\/malaysian-public-t-enough-mekdi-071440035.html\">mekdi<\/a>\u201d into the search bar\u2014a colloquial Malaysian term that a search engine trained on generic data sets might not recognise.\u00a0<\/p><p>Capturing these <a href=\"https:\/\/www.grab.com\/sg\/enterprise-blog\/grab-an-advantage-with-grabs-local-knowledge\/\">local nuances<\/a> means extending our platform to cater to hyperlocal variations in language and meaning. To do so, we tap into natural language processing models with our own Southeast Asia-specific data sets.<\/p><h5>Closing the vocabulary gap with AI\u00a0<\/h5><p>Local addresses can be tricky. We noticed that users in Thailand often type \u0e04\u0e2d\u0e19\u0e42\u0e14 (condo) as a synonym for \u0e2d\u0e1e\u0e32\u0e23\u0e4c\u0e17\u0e40\u0e21\u0e19\u0e17\u0e4c (apartment). In Singapore, road names often draw on Malay elements like \u201cbukit\u201d, \u201cjalan\u201d, and \u201clorong\u201d, and people type these in abbreviations\u2014bt, jln, and lor, respectively.<\/p><p>To make it easier for users typing in a mobile device, Grab\u2019s search engine needs to recognise and rephrase queries into the right search terms before matching them with the user\u2019s intended points of interest (POIs).\u00a0<\/p><p>We\u2019ve achieved this by developing an inhouse AI-enabled synonym module. Here\u2019s how it works.<\/p><p><strong>Step 1: Figure out what matches what<\/strong><\/p><p>We know \u201cmekdi\u201d correlates to \u201cMcDonalds\u201d as a POI. To find more pairings like this, we trained large language models (LLMs) with a database of user queries matched to real-world POIs.<\/p><p>The model is able to expand and learn as people use the app. So when a user looks through their search results and picks out the correct POI that they had in mind, the model understands that a search for the first term should include the POI in the results. A user searching for \u201cmekdi\u201d will tap on a McDonald\u2019s outlet, strengthening that synonym pairing in our database.<\/p><p><strong>Step 2: Refine these matches<\/strong><\/p><p>Initially, our teams routinely performed manual vetting to remove mismatched pairs of search terms. Our AI also generates related search terms to help broaden search results, and in the early days, our data science teams helped the engine learn by classifying related terms together.<\/p><p>Today, this process is fully automatic. Our model keeps refining itself by validating searches across the hundreds of thousands of other similar searches by users.<\/p><p>To use the mekdi example, a wrong button tap from a user may initially connect \u201cmekdi\u201d to \u201cMOS Burger\u201d. But thousands of other users tapping \u201cMcDonald\u2019s\u201d in the search results teaches the engine that MOS Burger is the wrong synonym, and it weeds that out in future.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bb768f0 elementor-widget elementor-widget-image\" data-id=\"bb768f0\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"340\" src=\"https:\/\/assets.grab.com\/wp-content\/uploads\/sites\/4\/2023\/08\/10163019\/Search-bar-1-700x340.png\" class=\"attachment-large size-large wp-image-193088\" alt=\"\" srcset=\"https:\/\/assets.grab.com\/wp-content\/uploads\/sites\/4\/2023\/08\/10163019\/Search-bar-1-700x340.png 700w, https:\/\/assets.grab.com\/wp-content\/uploads\/sites\/4\/2023\/08\/10163019\/Search-bar-1-250x121.png 250w, https:\/\/assets.grab.com\/wp-content\/uploads\/sites\/4\/2023\/08\/10163019\/Search-bar-1-768x373.png 768w, https:\/\/assets.grab.com\/wp-content\/uploads\/sites\/4\/2023\/08\/10163019\/Search-bar-1-1536x745.png 1536w, https:\/\/assets.grab.com\/wp-content\/uploads\/sites\/4\/2023\/08\/10163019\/Search-bar-1-18x9.png 18w, https:\/\/assets.grab.com\/wp-content\/uploads\/sites\/4\/2023\/08\/10163019\/Search-bar-1-120x58.png 120w, https:\/\/assets.grab.com\/wp-content\/uploads\/sites\/4\/2023\/08\/10163019\/Search-bar-1.png 1562w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">The dropdown suggests similar words and related phrases for \u201cMacs\u201d, a common slang term for McDonald\u2019s.<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-72d0cdf elementor-widget elementor-widget-text-editor\" data-id=\"72d0cdf\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><strong>Step 3: Adding contextual information<\/strong><\/p><p>Finally, synonyms must also be understood in context to be useful. While \u201cbt\u201d is a common short form for \u201cbukit\u201d in Singapore, a user may book a ride to a building called \u201cBT Care Centre.\u201d So our search engine can\u2019t always reformulate \u201cBT\u201d to \u201cbukit\u201d as a blanket rule.<\/p><p>The model needs to assess the whole phrase, then decide if the related word applies in each case.<\/p><p>It might sound lengthy, but this multi-step verification process happens in mere milliseconds.<\/p><h5>Correcting for common spelling mistakes<\/h5><p>Common dictionary spell-checkers notoriously over-correct for names and streets in Southeast Asia, typically frustrating users by forcing them to retype their queries.<\/p><p>To make our module understand what typos to correct and what aren\u2019t mistakes, we turned to the core source of truth\u2014our users. We gathered months of user search logs and matched queries with the POIs that they ended up selecting.<\/p><p>For example, \u201cPratinum Mall\u201d in Bangkok should show a corrected result for \u201cPlatinum Mall\u201d, but also show related results for the Pratunam area, where the mall is located and where users have shown they also want to visit when they use Platinum as a POI.<\/p><p>With this database of matches, we trained our model to detect the most common typos, and got a better correction rate than off-the-shelf solutions.\u00a0<\/p><p>The search experience is one of the main ways the Grab app communicates with the user, to learn and help them find what they need sooner. We hope it continues to bring smooth journeys for all.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f1353b1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f1353b1\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2cfb14e\" data-id=\"2cfb14e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"parent":180237,"menu_order":0,"template":"grab21-default","acf":[],"_links":{"self":[{"href":"https:\/\/www.grab.com\/sg\/wp-json\/wp\/v2\/editorial\/193082"}],"collection":[{"href":"https:\/\/www.grab.com\/sg\/wp-json\/wp\/v2\/editorial"}],"about":[{"href":"https:\/\/www.grab.com\/sg\/wp-json\/wp\/v2\/types\/editorial"}],"version-history":[{"count":12,"href":"https:\/\/www.grab.com\/sg\/wp-json\/wp\/v2\/editorial\/193082\/revisions"}],"predecessor-version":[{"id":213817,"href":"https:\/\/www.grab.com\/sg\/wp-json\/wp\/v2\/editorial\/193082\/revisions\/213817"}],"up":[{"embeddable":true,"href":"https:\/\/www.grab.com\/sg\/wp-json\/wp\/v2\/editorial\/180237"}],"wp:attachment":[{"href":"https:\/\/www.grab.com\/sg\/wp-json\/wp\/v2\/media?parent=193082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}