<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Arpit Sharma on Medium]]></title>
        <description><![CDATA[Stories by Arpit Sharma on Medium]]></description>
        <link>https://medium.com/@arpit.sharma_26620?source=rss-5dc1c9bc14f0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VKBY5kF87morGXxam2ai_g.png</url>
            <title>Stories by Arpit Sharma on Medium</title>
            <link>https://medium.com/@arpit.sharma_26620?source=rss-5dc1c9bc14f0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 13:08:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arpit.sharma_26620/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Using Context to Improve Intent Classification in Walmart’s Shopping Assistant]]></title>
            <link>https://medium.com/walmartglobaltech/using-context-to-improve-intent-classification-in-walmarts-shopping-assistant-28f62d40fd17?source=rss-5dc1c9bc14f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/28f62d40fd17</guid>
            <category><![CDATA[voice-commerce]]></category>
            <category><![CDATA[voice-assistant]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[intent-classification]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Arpit Sharma]]></dc:creator>
            <pubDate>Tue, 30 Mar 2021 18:10:46 GMT</pubDate>
            <atom:updated>2021-03-30T18:10:46.511Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xxesml8vh1yEP7bPHkdoFw.png" /></figure><p>Recently, there has been a notable <a href="https://voicebot.ai/2019/02/14/juniper-estimates-3-25-billion-voice-assistants-are-in-use-today-google-has-about-30-of-them/">advancement in the field of voice assistants</a>. Consequently, in 2019 we introduced our voice shopping assistant for Walmart customers on <a href="https://www.walmart.com/ideas/discover-online-grocery/google-assistant-voice-ordering-for-walmart-grocery-pickup-delivery/354497">Google Assistant</a> and <a href="https://corporate.walmart.com/newsroom/2019/11/11/hey-siri-add-to-walmart-introducing-a-new-shortcut-for-online-grocery">Apple Siri</a>. At Walmart our mission is to build the best shopping assistant in the world to help our customers save time and money. Our vision is to assist the customers in performing the tedious task of buying stuff by visiting stores and websites. Realizing the vision becomes even more important in today’s fast-paced life.</p><p>Building a voice based assistant is challenging. It is especially tough in domains such as retail/shopping where the product taxonomy is both wide (has various different categories of products) and deep (has various different types of products in a category). Another major challenge in building voice based shopping assistants is to precisely understand an utterance in a dialog without providing much context. For example,</p><blockquote>if a user says <strong>‘</strong> <strong>add bananas’ </strong>and follows by saying <strong>‘five’ </strong>then she intends to add <strong>five bananas</strong> to her cart.</blockquote><blockquote>if a user says <strong>‘five’ </strong>at the beginning of her conversation with the shopping assistant then her intention is <strong>unknown</strong> (i.e., it does not represent any e-commerce action at the start of a conversation).</blockquote><blockquote>if a user says <strong>‘</strong> <strong>set a pickup slot’ </strong>and follows by saying <strong>‘five’ </strong>then she intends to set a pickup slot of 5 am or 5 pm, probably the one closest to the requesting time.</blockquote><p>Handling such scenarios require the Natural Language Understanding (NLU) component in the assistants to utilize the context (<em>What transpired previously in the conversation</em>) while predicting the intent associated with an utterance. In this work we integrated inter-utterance contextual features in the NLU component of our voice shopping assistant at Walmart to improve its intent classification.</p><h3>Basic Components of a Voice Assistant and Role of NLU</h3><p>There are four main aspects of a voice assistant, namely, Speech-to-Text, NLU, Dialog Management (DM) and Text-to-Speech. The <a href="https://medium.com/walmartglobaltech/joint-intent-classification-and-entity-recognition-for-conversational-commerce-35bf69195176">NLU component</a> identifies intent(s) and entities in a user utterance. The dialog manager uses the output of the NLU component to prepare a suitable response for the user.</p><p>The NLU systems in the currently available voice enabled shopping assistants do not focus on inter-utterance context and hence the onus of context disambiguation lies upon the dialog manager. Although it is possible to capture a small number of such cases in the dialog manager, it becomes difficult for it to scale for large number of contextually dependent utterances. For example, let us again consider the user utterance <strong>‘five’</strong> after the utterance to <strong>add something to cart</strong>. Then a dialog manager can predict its intent by using the rule:</p><blockquote><strong>IF</strong> the previous intent was ‘<strong>add to cart’ AND </strong>the current query is an <strong>integer</strong></blockquote><blockquote><strong>THEN </strong>the current intent is <strong>‘add to cart’</strong></blockquote><blockquote><strong>ELSE </strong>the current intent is <strong>‘unknown’</strong></blockquote><p>But such a general rule can not be created for many other queries without overfitting to the actual words used in the conversation. For example,</p><blockquote>‘organic please’ (where the <strong>previous intent </strong>was<strong> ‘add to cart’ </strong>and the <strong>current intent </strong>is<strong> ‘filter search results’</strong>) and</blockquote><blockquote>‘stop please’ (where the<strong> previous intent </strong>was<strong> ‘add to cart’</strong> and the<strong> current intent </strong>is<strong> ‘stop conversation’</strong>).</blockquote><p>In this work, we handled the context in the NLU component and reduced the contextual disambiguation burden from the dialog manager.</p><h3>How Did We Use Context?</h3><p>We used two different deep neural networks based architectures for two separate implementations of our approach. Following are the details of the architectures.</p><h4>Bi-LSTM and GRU</h4><p>The first architecture is inspired by the work in an <a href="http://giusepperizzo.github.io/publications/Mensio_Rizzo-HQA2018.pdf">RNN based Multi-turn QA approach</a>. It has two main components. First, a <a href="https://medium.com/@raghavaggarwal0089/bi-lstm-bc3d68da8bd0">Bi-LSTM</a> encoder which generates a vector encoding of an input utterance. The vector represents a summarized version of a user utterance. It is generated from the embeddings of the words in the utterance. The Second component is a <a href="https://towardsdatascience.com/understanding-gru-networks-2ef37df6c9be">GRU</a> layer whose inputs consist of the output of a <a href="https://medium.com/@b.terryjack/introduction-to-deep-learning-feed-forward-neural-networks-ffnns-a-k-a-c688d83a309d">feed forward layer</a> with respect to the embedding generated by the Bi-LSTM encoder, along with the <a href="https://medium.com/@michaeldelsole/what-is-one-hot-encoding-and-how-to-do-it-f0ae272f1179">one-hot encoding</a> of the previous utterance’s intent. The output of this layer (which also includes a <a href="https://towardsdatascience.com/softmax-function-simplified-714068bf8156">Softmax </a>step at the end) is the intent of the current input utterance. Figure 1 below shows the architecture diagrammatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BJKpyrBJ_AoFl9afDOIxjQ.png" /><figcaption>Figure 1: Deep Learning Architectures of Bi-LSTM and GRU Approach</figcaption></figure><p>The encoding layer in the Figure 1 above is a module that generates the vector representation of the words in the input user utterance. There are various off-the-shelf options available to plug in this layer including <a href="https://medium.com/@zafaralibagh6/a-simple-word2vec-tutorial-61e64e38a6a1">Word2Vec</a>, <a href="https://medium.com/analytics-vidhya/word-vectorization-using-glove-76919685ee0b">Glove</a>, <a href="https://allennlp.org/elmo">Elmo</a> and <a href="https://towardsdatascience.com/bert-explained-state-of-the-art-language-model-for-nlp-f8b21a9b6270">BERT</a>. In this work we experimented with BERT and Glove to retrieve the initial word embedding.</p><h4><strong>Bi-LSTM and Feed-Forward Layer</strong></h4><p>Similar to the Bi-LSTM and GRU architecture mentioned above, the second one also has two components, a Bi-LSTM layer followed by a feed forward layer. The output of the Bi-LSTM layer is concatenated with the one-hot encoding of the <em>intent</em> of the previous user utterance in the user-assistant conversation and entered as an input to a feed forward layer, which includes a <a href="https://towardsdatascience.com/softmax-function-simplified-714068bf8156">Softmax layer</a> at the end. The output of the feed forward layer is the most probable intent of the input utterance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q8mO6UiN_PEZHuMCslrOEg.png" /><figcaption>Deep Learning Architectures of Bi-LSTM and Feed-Forward Layer Approach</figcaption></figure><p>As in the first architecture, in this work we experimented with BERT and Glove to retrieve the initial word embedding in the encoding layer.</p><h3>How Well Did It Work?</h3><p>The main goal of this work was to improve the intent classification in the NLU component of Walmart’s shopping assistant by using inter-utterance context. Consequently, we tested our approach on the real user logs of <a href="https://www.walmart.com/ideas/discover-online-grocery/google-assistant-voice-ordering-for-walmart-grocery-pickup-delivery/354497">Walmart’s voice shopping assistant</a>. We found that about <strong>40% of the overall user-assistant interactions were in need for a contextual intent classification</strong>. We also found that <strong><em>adding a product to e-cart </em></strong>and <strong><em>searching for a product</em></strong> on Walmart were the two most popular, contextual user-assistant interactions. About 98% of all the contextual interactions were related to those intents. We observed <strong>great performance (90% on contextual and 87.68% overall)</strong> of our best performing, contextual intent classification approach (Bi-LSTM and GRU based implementation with BERT language model) on the <strong>add to cart</strong> and <strong>search</strong> related user queries.</p><blockquote>In this work we improved the voice assistant’s understanding of the <strong><em>add to cart</em></strong> queries. It leads to an improved <a href="https://databox.com/improve-add-to-cart-conversion-rate#head1"><strong><em>add to cart</em></strong> <strong>success rate</strong></a>, an important criteria of determining the performance of an e-commerce application.</blockquote><p>The Table 1 below presents the experimental results of the two implementations of our approach (with different language models plugged in). More details on the experiments and the results are available in our <a href="https://sites.google.com/view/ecnlp/past-workshops/acl-2020?authuser=0">ECNLP 3</a> article titled <a href="https://www.aclweb.org/anthology/2020.ecnlp-1.6/"><strong><em>Improving Intent Classification in an E-commerce Voice Assistant by Using Inter-Utterance Context</em></strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FBesF5V1yKVk56KjR_6LyQ.png" /></figure><h3>What Do We Conclude?</h3><p>As hypothesized, the experimental results show that the</p><blockquote>contextual update in the NLU module improves the intent classification.</blockquote><p>It also takes the burden of intent based contextual disambiguation away from a dialog manager. We experimented with two distinct implementations of our approach and compared them by using the real user logs.</p><h3>What’s Next?</h3><p>Though, in this work our main focus was on the contextual disambiguation of intents, the entities are also contextually dependent. For example,</p><blockquote>‘five’ uttered after ‘add bananas’ may refer to the quantity five whereas if uttered after ‘pick a delivery time’ may refer to the time of day five (am/pm).</blockquote><p>We are currently working towards using contextual features to disambiguate between entities and improve the entity tagging as well.</p><h3>References and Further Readings</h3><p>Our work was published in the <a href="https://www.aclweb.org/anthology/2020.ecnlp-1.6.pdf"><em>Proceedings of The 3rd Workshop on e-Commerce and NLP (ECNLP)</em>. 2020</a> with the title <strong><em>Improving Intent Classification in an E-commerce Voice Assistant by Using Inter-Utterance Context</em></strong></p><p><a href="https://medium.com/walmartglobaltech/joint-intent-classification-and-entity-recognition-for-conversational-commerce-35bf69195176">Our previous work on joint intent-entity training</a></p><p><a href="https://medium.com/walmartglobaltech/building-a-conversational-assistant-platform-for-voice-enabled-shopping-6d174cdc4131">Beginning of our shopping assistant journey</a></p><p><a href="http://giusepperizzo.github.io/publications/Mensio_Rizzo-HQA2018.pdf">Multi-turn QA: A RNN Contextual Approach to Intent Classification for Goal-oriented Systems</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28f62d40fd17" width="1" height="1" alt=""><hr><p><a href="https://medium.com/walmartglobaltech/using-context-to-improve-intent-classification-in-walmarts-shopping-assistant-28f62d40fd17">Using Context to Improve Intent Classification in Walmart’s Shopping Assistant</a> was originally published in <a href="https://medium.com/walmartglobaltech">Walmart Global Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>