<?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 Rahul Bajaj on Medium]]></title>
        <description><![CDATA[Stories by Rahul Bajaj on Medium]]></description>
        <link>https://medium.com/@wmgtsbajajra?source=rss-7fb65dde9c45------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VQAQqRfyIOg1yQxE8WW8vQ.png</url>
            <title>Stories by Rahul Bajaj on Medium</title>
            <link>https://medium.com/@wmgtsbajajra?source=rss-7fb65dde9c45------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 06:11:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wmgtsbajajra/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[Textual Titans: A Large Language Model Odyssey]]></title>
            <link>https://medium.com/walmartglobaltech/textual-titans-a-large-language-model-odyssey-d36eab1e2743?source=rss-7fb65dde9c45------2</link>
            <guid isPermaLink="false">https://medium.com/p/d36eab1e2743</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Rahul Bajaj]]></dc:creator>
            <pubDate>Fri, 05 Jul 2024 06:02:22 GMT</pubDate>
            <atom:updated>2024-07-10T19:57:34.622Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lwc_CGzXw2hoJk06" /><figcaption>Image generated using Stable Diffusion 2</figcaption></figure><blockquote>“It’s not who I am underneath, but what I do that defines me.” — Bruce Wayne</blockquote><p>These words might be coming from a fictional character but isn’t it what artificial intelligence is trying to convey these days. Wanna know something interesting, the above image is also generated by <strong>AI</strong>.</p><p>Natural Language Processing (NLP) and language models play a pivotal role in revolutionizing retail and Ecommerce. These technologies enable personalised product recommendations, chatbots for customer service, sentiment analysis of customer reviews, and efficient search algorithms. By analyzing vast amounts of text data, NLP helps retailers understand customer preferences, predict trends, and optimize pricing strategies. Language models enhance customer interactions by providing tailored responses and improving user experience. Moreover, NLP aids in fraud detection, inventory management, and supply chain optimization. In essence, leveraging NLP and language models empowers retailers to enhance customer satisfaction, streamline operations, and drive revenue growth in the competitive ecommerce landscape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*_zEPI6c1Iiz9odBNpN8Qpg.png" /><figcaption>AI Hierarchy</figcaption></figure><h3>The Dawn</h3><p>Generative AI is a subset of traditional machine learning and the machine learning models that underpin generative AI have learned these abilities by finding statistical patterns in massive datasets of content that was originally generated by humans. Generative AI models can generate a wide range of outputs, such as text, images, music, and even voice. Large language models, a type of generative AI, are particularly noteworthy. They are trained on vast amounts of text data and can generate human-like text based on the input they receive.</p><p>Natural Language Processing (NLP) has evolved significantly since its inception. Traditional models like TF-IDF (Term Frequency-Inverse Document Frequency) and Markov Chains were the initial models used in NLP. The TF-IDF model was used to measure the importance of a term within a document and a collection of documents, but it lacked the ability to understand the context and semantics of the phrases. Markov Chains model was used to predict the probability of each next word in a sentence based on the previous word, however, it only considered immediate predecessors, thus lacking long-term dependency understanding.</p><p>RNNs while powerful for their time, were limited by the amount of compute and memory needed to perform well at generative tasks. With just one previous word seen by the model, the prediction can’t be very good. As we scale the RNN implementation to be able to see more of the preceding words in the text, we have to significantly scale the resources that the model uses. To successfully predict the next word, models need to see more than just the previous few words. Models needs to have an understanding of the whole sentence or even the whole document. The problem here is that language is complex. In many languages, one word can have multiple meanings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aZnUr5jdJiokeHUiv8UqJg.png" /><figcaption>RNN Block</figcaption></figure><p>The problem was addressed by the introduction of Long Short-Term Memory (LSTM) networks. LSTMs, a special kind of RNN, are capable of learning long-term dependencies and remembering information for extended periods, which is particularly beneficial in NLP for understanding the context over a sequence of words. This has greatly improved the performance of NLP tasks, resulting in more human-like language understanding.</p><h3>Eureka!!!</h3><p>Transformer architecture came into the picture with <strong>“Attention is all you need”</strong> which disrupted the generative setup at that time with significant performance improvement over RNN. Unlike sequential models such as Recurrent Neural Networks (RNNs) or Long Short-Term Memory (LSTMs), Transformers process all data points in parallel, making them more efficient for handling large text data. They also address the problem of long-term dependencies in a sequence by directly relating distant data points.</p><p>Transformers are the foundation of many state-of-the-art models in NLP, such as BERT, GPT-4, and T5, driving advancements in machine translation, text summarization, and other language tasks. Despite their complexity, their ability to handle context and maintain scalability makes them a vital tool in AI.</p><p>Transformers have the capability of creating a semantic understanding by looking terms around the focus token. Transformers use a technique called self-attention in which attention-weights are calculated from one term every other term in the phrase. Attention weights helps in focussing on tokens which needs more concentration and importance in reflecting the actual meaning of the phrase in language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*ptRLJuem0HZnOgkYsvLk4g.png" /><figcaption>Transformer Schematic Diagram</figcaption></figure><p>There are 3 major components in transformer architecture: <strong>Tokenizer</strong>, <strong>Encoder</strong> and <strong>Decoder</strong>.</p><p>A sentence or phrase is passed through the tokenizer to transform it into a sequence of tokens or numeric values. <em>Tokenization is the process in which words are converted into numerical values</em> for performing mathematical operations. Each token is then passed through the embedding layer to create a fixed length vector representation. These embeddings are understood to represent the context of each token in high dimensional space. Embeddings generated for tokens are pushed into Encoder and Decoder. Transformer architecture scales well because of its capability to process data in parallel. To retain the relative position of token the phrase, positional encodings are also pushed into the encoder and decoder unit along with the token embeddings. These units contain the self-attention units which computes the attention weights. These attention-weights are a representation of significance of a term with respect to all other terms in the phrase. Additionally, both encoder and decoder employ multi-head attention mechanism. The approach utilises multiple self-attentions units to find attention weights from various perspectives which helps the model to explore multiple semantic avenues accounting even for linguistic ambiguity. Output from the attention layers is pushed to fully connected feed forward network. Output from feed forward network of the decoder unit are the probability scores of the next token in sequence. Scores corresponding to each token in the model tokenizer dictionary are yielded. The scores are further processed by the softmax layer to determine the next predicted token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/0*GHwNT1ra9BGIwOsF.png" /><figcaption>Tokenize (<a href="https://teetracker.medium.com/llm-fine-tuning-step-tokenizing-caebb280cfc2">Source</a>)</figcaption></figure><p>During the inference phase, decoder uses the output from self-attention and feed forward network of the encoder to get the semantic and contextual knowledge of the input sequence. It generates the complete sequence in a loop until input tokens are supplied or the break condition is reached.</p><h3>The Cousins</h3><p>There are 2 variations of the original transformer architecture which are used for numerous natural language tasks. These variations are trained with varied training objectives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*Y9JrFdoKDmYhYioC9gCi8A.png" /><figcaption>Auto Encoding Model Architecture</figcaption></figure><p>Encoder only architecture models also known as <strong>Autoencoding models</strong> contain only the encoder unit from the original transformer architecture and trained using masked language modelling technique. Such models have Bidirectional context for a token and not limited just to the pre- occurring tokens in the sequence. These models are favourable for tasks like text categorisation and entity recognition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RXEU5CKAWaInFJ3x.png" /><figcaption><a href="https://www.holisticai.com/blog/from-transformer-architecture-to-prompt-engineering">Source</a></figcaption></figure><p>Decoder only architecture models also known as <strong>Autoregressive models</strong> contain only the decoder unit from the original transformer architecture and trained using causal language modelling. Such models only have visibility of the previous set of tokens and are primarily focussed on text generation tasks. These models tries to establish statistical distribution of the tokens in the language dictionary used to train the model. Due to harder training constraints of only unidirectional lookup, these models can perform varied tasks and carry out zero-shot learning tasks effectively.</p><h3>Unsettling Peace</h3><p>Large language models have been trained on trillions of tokens over many weeks and months, and with large amounts of compute power. These foundation models, as we call them, with billions of parameters, exhibit emergent properties beyond language alone, and researchers are unlocking their ability to break down complex tasks, reason, and problem solve. The way we interact with language models is quite different than other machine learning and programming paradigms. In those cases, we write computer code with formalized syntax to interact with libraries and APIs. In contrast, large language models are able to take natural language or human written instructions and perform tasks much as a human would.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*720HYEMC_9FSyI75fkUVHg.png" /><figcaption>LLM Interaction</figcaption></figure><p>Interaction with traditional machine learning and deep learning systems is through programming languages and computer code following a pre-defined syntax. Contrastingly, interaction with LLMs is using Natural language and more particularly in form of instructions for accomplishing certain tasks.</p><p>In inference or prediction phase, the complete input to the LLM is known as <strong>Prompt</strong>. The prompt comprises of user question and optionally the context with respective to which the question needs to be answered. Including context within the prompt for improved model performance and obtaining desirable output from the model is called <strong>In-context learning</strong>. It is important to note that all LLMs have a limit on the number of words or tokens that can be ingested which is referred to as context window. Output from the model is “<strong>Completion</strong>” which is the process of running inference from the LLM based on given prompt which is composed of both the generated text and original prompt. Completion is structured in such a way as LLM works on next word generation wherein if the prompt contains a question, LLM generated the corresponding answer.</p><h3>Size matters (sometimes)</h3><p>Large language models implicitly gain a wide range of knowledge and subjective understanding while being trained with humongous amount of data. As size of the models increase, their width of information and propensity of understanding also improves. The large number of parameters learned during the training process allows to perform complex tasks and process information even without specialised training for the task. Interestingly, smaller models when trained or fine-tuned on specialised tasks tend to perform well.</p><p>Supplying models with in-depth context and examples to produce improved output for the task is called in-context learning. LLMs get their instruction as prompt about the task to be performed. Larger models acquire knowledge on wide range of topics during pre-training phase and showcase superior performance on zero-short inference. Comparatively, smaller models would require more elaborate description of the task and examples might help in achieving the desired goals. Process of adding one example in prompt is called one-shot inference and adding two or more than two examples is called few shot learning. An important point to note is length of prompt that can be handled is limited by the model’s context window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cr95cHZMHr9f_gnnEV03uw.png" /><figcaption>In-context Learning</figcaption></figure><p>Extending the capabilities of an LLM may include supplementing with external data sources which might include APIs, Database etc. We will talk about the topic in detail in subsequent articles.</p><h3>Summing up</h3><p>NLP has come a long way since it’s inception and with newer capabilities in place, it is easier to solve the most challenging problems of the industry.</p><p>The field of GenerativeAI is evolving by the hour and it becomes increasingly imperative for engineers and data scientists to arm themselves up with the most novel tech enabling the future. Google, Meta, Microsoft along with Mistral AI and HuggingFace have led the revolution in open source space to put these gigantic models and innovative tools in the hands of every engineer to experiment. Democratising AI is the need of the hour.</p><h3>References &amp; credits:</h3><p>Vaswani, Ashish, et al. “Attention is all you need.” <em>Advances in neural information processing systems</em> 30 (2017)</p><p>Dong, Qingxiu, et al. “A survey on in-context learning.” <em>arXiv preprint arXiv:2301.00234</em> (2022)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d36eab1e2743" width="1" height="1" alt=""><hr><p><a href="https://medium.com/walmartglobaltech/textual-titans-a-large-language-model-odyssey-d36eab1e2743">Textual Titans: A Large Language Model Odyssey</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>
        <item>
            <title><![CDATA[WYOM: Wear Your Own Makeup]]></title>
            <link>https://medium.com/walmartglobaltech/wyom-wear-your-own-makeup-a9a667cbe195?source=rss-7fb65dde9c45------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9a667cbe195</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[ai-in-ecommerce]]></category>
            <dc:creator><![CDATA[Rahul Bajaj]]></dc:creator>
            <pubDate>Mon, 18 Oct 2021 08:05:26 GMT</pubDate>
            <atom:updated>2021-10-18T08:05:26.204Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D38o-xGFDhnK_BNDr8eUGw.jpeg" /><figcaption>Image by <a href="https://unsplash.com/photos/ceWgSMd8rvQ">Unsplash</a></figcaption></figure><p><strong><em>“Joy is the best makeup” ~ </em></strong><em>Anne Lamott</em></p><p>I concur with the thought that there is no better jewelry than a smile and no better makeup than joy. However, in my humble opinion, the concept of “Reversibility of Rays” from Physics works in real life too. Sometimes wearing your attitude with a touch of makeup can bring exuberance in moments of life. Because the freedom of doing what you like is the true sense of joy a human can experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*46CkqFyiil59zN9YtEmB5Q.png" /></figure><p>Technology is assisting us in our daily challenges. From waking up in the morning with the help of an alarm clock to a smart speaker reciting a lullaby to help an infant sleep, everything is a gift of technology. As an engineer, I am vested with the power to make peoples’ lives easier and what means better than AI. The magic of blessing an electronic machine with the power of vision and making astute decisions to overcome real-life obstacles is the true sense of enablement. Rest assured it is much more useful and intelligent than Michael’s virtual friend Harvey <em>(The Office — S3 Travelling Salesman)</em>.</p><p>E-commerce has now been in place for decades and organizations are constantly working in making the online shopping experience pleasant and hassle-free for the customers. Platform engagement and the quality of customer journey define the success of the online retail system. Purchasing makeup and beauty products online are a tough nut to crack without having the actual feel of the item and the ability to comprehend the colors. The customer has to bet completely on one’s visual faculties in determining the suitable article for them. Additionally, there is too much ambiguity involved in forming the product perception. Often, the product received is not at par with the item page perception due to ambivalence in deciphering the specifications of the real product visually. Pandemic made the process of buying beauty products even more challenging. It robbed the consumers off try &amp; buy purchasing routine.</p><p><strong><em>“In the middle of difficulty lies opportunity” ~ Albert Einstein</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*FxKjSR6YlG4CxAot" /><figcaption>Image by <a href="https://unsplash.com/photos/1dwRuFgDr0o">Unsplash</a></figcaption></figure><h3>What is WYOM?</h3><pre>WYOM(Wear Your Own Makeup) is an augmented reality tool powered by AI. It enables the customers to upload and visualize a try on of the beauty products on the images uploaded by them</pre><h3>Why do we need WYOM(Virtual Makeup Try on)?</h3><p>Modern technologies let people test hundreds of products on their smartphone screens. This is especially prominent in the fashion and beauty industries: people were reluctant to try products that touched someone else’s body even before the pandemic. Testing and ordering products remotely prove to be an effective way to increase sales. The feature tends to bring substantial business impact:</p><ul><li><em>According to reports, virtual makeup try-on customers are 3 times more likely to buy make-up products, and order size is expected to be 20% large.</em></li><li><em>Virtual make-up try-on makes shopping convenient and enhances users engagement. Customer engagement is expected to increase to seven-fold</em></li><li><em>56% of the users&#39; first actions upon arriving at a new page is to begin exploring product images without reading titles, descriptions, or scrolling down the page to get a more comprehensive overview. WYOM will help in reducing customer uncertainty and product returns. Thus, improving customer loyalty and retention rates</em></li><li><em>The users can choose the right product right away which saves a ton of money on repackaging the unneeded goods. In some cases, AR try-on decreased returns by up to 36%.</em></li></ul><h3>The Execution</h3><p>Custom modification of the Bilateral Segmentation Network is used for Real-time Semantic Segmentation to identify our focus areas of lips and hair. Semantic Segmentation requires both rich spatial information and sizeable receptive field. Spatial information is preserved and high-resolution features are generated through the Spatial Path of BiSeNet. Meanwhile, the Context Path helps in identifying sufficient receptive field. The features obtained are thus fused to identify the target areas to be used for further intelligent color shading. We employ Gaussian blur and apply the color masking technique to give it a natural look.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*pwaLXRJD3gZO9mTXJxcRyQ.png" /><figcaption>Original Image Without Makeup (<a href="https://in.pinterest.com/pin/649222102502716565/">Source</a>)</figcaption></figure><p>I created a prototype for WYOM which includes trying lip colors and hair colors as a part of the beauty product category.</p><p>Let us assume that the given image is provided by the customer for a virtual lip color try-on.</p><p>As a result, the following images with the required lip color, based on product swatch, will be obtained for better consumer engagement and improved shade perception leading to higher retention rates and customer loyalty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*WxutlKVKAjNei6nNThaEZA.png" /><figcaption>Resultant Images from WYOM Lip color Try-On</figcaption></figure><p>If you carefully observe, even the wrinkled skin of lips is naturally shaded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*OuA8BxYwMwI8QtxejRxMRQ.png" /><figcaption>Original Image Without Makeup (<a href="https://in.pinterest.com/">Source</a>)</figcaption></figure><p>Similarly, we have shaded the hair with shades of e-commerce hair color products.</p><p>The color tone and flow in hairstreaks seem natural in the resultant images generated using WYOM</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Avs0FF6LT0x86t1xR8xhAA.png" /><figcaption>Resultant Images from WYOM Haircolor Try-On</figcaption></figure><h3>Summing Up</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*6DvDgHQEAbuS4zYygwMKBQ.png" /><figcaption>It’s me wearing Hot Pink lip color applied using WYOM</figcaption></figure><p>Beauty products are for everyone. It’s really fascinating to see the effect of beauty products irrespective of the fact that someone has used such items before or not.</p><p>The article threw some light on the innovations in the beauty industry. We talked about how eCommerce retailers can leverage leading AI trends to manage the business and improve the bottom line.</p><p>We cannot wait to transform the customer experience for other beauty products like eye makeup, nail paints, contour, etc. The possibilities are enormous. We are treading on the path to bring the ultimate virtual makeover for customers. Stay tuned to hear about the next retail disruption.</p><h3>Other Articles</h3><ul><li><a href="https://medium.com/walmartglobaltech/t%C3%AAte-%C3%A0-t%C3%AAte-the-chatbot-creator-56a5b9b36c2">Tête-à-Tête -The ChatBot Creator</a></li><li><a href="https://medium.com/walmartglobaltech/ai-in-e-commerce-automated-video-generation-1b93b9d17ba8">AI in E-Commerce: Automated Video Generation</a></li><li><a href="https://medium.com/walmartglobaltech/neural-networks-exposed-hello-world-5a2f5984f936">Neural Networks Exposed: Hello World!</a></li></ul><h3>References &amp; credits:</h3><ul><li><a href="https://www.banuba.com/blog/case-study-how-beauty-brands-profit-with-virtual-makeup-try-on">How Beauty Brands Profit With Virtual Makeup Try-On [Case Study]</a></li><li><a href="https://hbr.org/2020/10/how-ar-is-redefining-retail-in-the-pandemic">How AR Is Redefining Retail in the Pandemic</a></li><li><a href="https://arxiv.org/abs/1808.00897">BiSeNet: Bilateral Segmentation Network for Real-time Semantic Segmentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9a667cbe195" width="1" height="1" alt=""><hr><p><a href="https://medium.com/walmartglobaltech/wyom-wear-your-own-makeup-a9a667cbe195">WYOM: Wear Your Own Makeup</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>
        <item>
            <title><![CDATA[Neural Networks Exposed: Hello World!]]></title>
            <link>https://medium.com/walmartglobaltech/neural-networks-exposed-hello-world-5a2f5984f936?source=rss-7fb65dde9c45------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a2f5984f936</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Rahul Bajaj]]></dc:creator>
            <pubDate>Fri, 04 Jun 2021 11:32:14 GMT</pubDate>
            <atom:updated>2021-06-04T11:32:14.964Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WLc36ovkF7yQx6PTlwMZeg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*XVRXwdna_QBAz9Z4.jpg" /><figcaption><a href="https://www.wisdomgeek.com/wp-content/uploads/2020/10/Recurrent-Neural-Networks.jpg">Source</a></figcaption></figure><p>I identify myself as an Engineer, a problem solver who fell for AI &amp; Data Science in his formative years. Always wanted to bring the best of both worlds, the analytical reasoning of an engineer and the brilliance of a data scientist by becoming a Machine Learning Engineer/Applied Data Scientist(the way I see it). It is important to understand the mathematics and concepts behind the beauty of data science and it is equally important to shape a mere concept into reality and transform it into an actual product. Being a hands-on engineer and well versed with the challenges &amp; the significance of execution and experimentation required to obtain the desired output. With an ode to Dr. APJ Abdul Kalam, Tony Stark(Iron man), Elon Musk, and Howard Wolowitz, I am initiating this series wherein we’ll witness the crude side of neural networks abstracted under the sophisticated sleeve of state-of-the-art ML/DL libraries. So, let’s embark on a journey of enlightenment and demystifying the world of AI.</p><p>For coding the neural networks, we have python to the rescue. Audiences who would like to learn Python can do it the hard way(not literally) <a href="https://learncodethehardway.org/python/">Learn Python the hard way</a>.</p><h3>The AI Family</h3><p>Though Neural Networks gained popularity after 2010 the intuition dates back to the 1940s. They gained popularity after winning competitions and predicting/generating values which was deemed impossible otherwise. I personally feel Neural Networks gained momentum with the <strong><em>advancements in computation devices</em></strong> and the exponential <strong><em>growth in data generation</em></strong>. With the increase in processing speeds and GPU coming into the picture, training neural networks became practical for business purposes. “Data is the new oil”, this statement is sufficient to explain the importance of data for modern businesses(Also, for the new Facebook/Whatsapp privacy policy) and the imperativeness to feed them with the new fuel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a3CEmO2AwZ8dYanf.png" /><figcaption>AI Hierarchy(<a href="https://www.edureka.co/blog/wp-content/uploads/2018/03/AI-vs-ML-vs-Deep-Learning.png">Source</a>)</figcaption></figure><p>Any procedure imitating human behavior can be considered under the wide umbrella of Artificial Intelligence. The tasks pertaining to the statistical subset of AI can be labeled as Machine Learning. Deep Learning is a subgroup of machine learning dealing with Multi-Layer Perceptrons/Neural Networks.</p><h3>Neural Network Structure</h3><p>Neural Networks are very similar in structure to the nerve cell also known as neurons. Each node in neural networks mimics the behavior of neurons in the biological nervous system. Though a single node is not practically effective but does wonders when fused with other nodes to form a neural network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*lOYKyo8jGvZo0B3E" /><figcaption><a href="https://miro.medium.com/max/800/0*XVTzs5PHRzX5Vuyc">Source</a></figcaption></figure><h3>Mathematical Overview</h3><p>There are certain parameters that neural networks need to “Learn” to generate predictions. The parameters include the weights and biases of each node. Let me give you an idea of what weights and biases actually mean, consider an equation <strong>y=mx+c, </strong>where y is the value we need to identify(target variable), x is the input, m is the slope of the line(weight) and c is the constant(bias). m and c are the parameters to be identified in case we need to find the value of y from x.</p><p>Now, how do we calculate how many parameters our neural network has to learn?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/0*kQTMcppGxddXvpSv.png" /><figcaption>Neural Network Layers (<a href="https://www.researchgate.net/profile/Will-Serrano/publication/313408173/figure/fig8/AS:669010169438243@1536515862984/Artificial-Neural-Network-Deep-Learning-model.png">Source</a>)</figcaption></figure><p>Consider the above figure, a neural network with 1 input layer, 3 hidden layers, and 1 output layer. The input layer consists of 3 nodes: a1, ak, and ax. The output layer consists of 2 nodes: nk and nv. Now, focus on the interaction of the input layer with Layer 1, every node of Layer 1 is connected to every node of the input layer. So, each node in Layer 1 will learn 3 weights(1 for each input node). Similarly, we can extend our observation to subsequent layers and we get (3*5 + 5*5 + 5*5 + 5*2) = <strong>75</strong> weights. Since each node in the hidden layers and output layer will contain a bias component, the total tally of parameters reaches <strong>92 (75 weights + 17 biases).</strong></p><p>Our deep learning model will optimize the above parameters to predict the final result. Weights and biases impact the result in different ways, weight tends to change the magnitude of input and can reverse the sign of the value whereas bias makes an overall effect on the output. The final output from the node is the result of an activation function applied over the result obtained after the computation of weights and biases which introduces non-linearity(makes the node “fire”) and differentiates itself from classical machine learning algorithms. Hence, the final equation comes out to be:</p><blockquote>outputFromNode = activationFunction(inputs * weights + bias)</blockquote><p>Commonly used activation functions are ReLU, Leaky ReLU, sigmoid, softmax, tanh.</p><p>Now, it’s time we code the Layer Output Computation Utility using basic Python. Below is the code for reference. Currently, we won’t be utilizing any activation function to compute the layer output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MRr4o9zTS64vzvPdqRabYw.png" /><figcaption>Layer Output Computation Utility</figcaption></figure><p>Voila! you just coded the output from a neural network layer in pure Python without any help from external libraries. However, there is still a lot of scope before we arrive at a sophisticated neural network model which performs well in real-life scenarios.</p><h3>Conclusion</h3><p>You can find all the codes for this series in the <a href="https://github.com/bajajra/Neural-Networks-Exposed">Github repository</a> (Don’t forget to star🌟 it). These generic code snippets will help you build your very own neural network from scratch. Though we have reached the end of our first article it’s only the beginning of an exciting adventure. Meet you in the next one!</p><h3>Other Articles</h3><ul><li><a href="https://medium.com/walmartglobaltech/t%C3%AAte-%C3%A0-t%C3%AAte-the-chatbot-creator-56a5b9b36c2">Tête-à-Tête -The ChatBot Creator</a></li><li><a href="https://medium.com/walmartglobaltech/ai-in-e-commerce-automated-video-generation-1b93b9d17ba8">AI in E-Commerce: Automated Video Generation</a></li></ul><h3>References</h3><ul><li><a href="https://mitpress.mit.edu/books/introduction-machine-learning">Introduction to Machine Learning</a></li><li><a href="https://web.stanford.edu/~hastie/ElemStatLearn/">Elements of Statistical Learning: data mining, inference, and prediction. 2nd Edition.</a></li><li><a href="https://learncodethehardway.org/python/">Learn Python the Hard Way</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a2f5984f936" width="1" height="1" alt=""><hr><p><a href="https://medium.com/walmartglobaltech/neural-networks-exposed-hello-world-5a2f5984f936">Neural Networks Exposed: Hello World!</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>
        <item>
            <title><![CDATA[AI in E-Commerce: Automated Video Generation]]></title>
            <link>https://medium.com/walmartglobaltech/ai-in-e-commerce-automated-video-generation-1b93b9d17ba8?source=rss-7fb65dde9c45------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b93b9d17ba8</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ecommerce-automation]]></category>
            <category><![CDATA[ai-in-ecommerce]]></category>
            <dc:creator><![CDATA[Rahul Bajaj]]></dc:creator>
            <pubDate>Thu, 15 Apr 2021 13:08:55 GMT</pubDate>
            <atom:updated>2021-04-15T13:08:55.772Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*G3WYsVKvIThdj3Nx.gif" /><figcaption><a href="https://in.pinterest.com/pin/126241595790429814/">Image Source</a></figcaption></figure><p><em>“The first step is to establish that something is possible; then probability will occur.”</em></p><p>~<em> Elon Musk</em></p><p>The quote comes from the Engineer I admire the most. <strong>“The Real Tony Stark”</strong></p><p>This is my second article that pertains to the <strong>AI </strong>track. Here’s the <a href="https://medium.com/walmartglobaltech/t%C3%AAte-%C3%A0-t%C3%AAte-the-chatbot-creator-56a5b9b36c2">link</a> to my previous article if you haven’t read it already. Yes! Yes! Yes! I am awestruck and fascinated by the magic and huge applications of Artificial Intelligence(also by the <strong>“Buzzword”</strong>). But it’s time that we understand that neither the world is Hogwarts(Harry Potter reference) nor AI a magical wand. We all are ordinary Muggles trying to use Tensorflow, Scikit Learn, Pytorch, etc. as Felix Felicis(Liquid Luck).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*r6i0UXeTo-6gaknc.gif" /><figcaption><a href="https://tenor.com/view/salt-bae-salty-saltbae-gif-7529894">Source</a></figcaption></figure><p>Organizations, these days, are adding Machine Learning and Artificial Intelligence to their applications the way Salt Bae adds salt to its steak. This pic summarises Google I/O 2018 too.</p><p>The role of AI isn’t limited to the external business side. It can also be leveraged for better workflow within the organization as well.</p><p>The Top 5 commercial sectors employing AI are:</p><ol><li>Healthcare</li><li>Education</li><li>Marketing</li><li><strong>Retail and E-commerce</strong></li><li>Financial Market and Services</li></ol><p>We’ll focus on AI in E-commerce in this article.</p><p>The use of <strong>artificial intelligence in online shopping </strong>is transforming the E-commerce industry by predicting shopping patterns based on the products that shoppers buy and when they buy them. This new wave of eCommerce is changing the way brand-customer engagement takes place as brands continue to refine and innovate their digital strategies. E-com is the fastest growing and evolving channel and hence needs a machine not just to derive insights but also provide recommendations on-an ongoing basis.</p><p>Customer experience is not limited to hyper-personalization but takes into account the content quality of the item listings on the e-commerce platform. Generating videos for an immersive experience to buyers is one of the many applications. Utilizing current content for a specified item to kindle a new outlook towards the same product and boost the GMV(Gross Merchandise Value) potential.</p><p>You must be thinking — “Why this video?”, “What impact does it make?” **Jibber Jabber**</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/0*KZ_befsCx51Xrac4.jpg" /><figcaption><a href="https://www.pinterest.com/pin/416512665514052920/">Image Source</a></figcaption></figure><blockquote>Visualization works from a human perspective because we respond to and process visual data better than any other type of data. In fact, <strong>the human brain processes images 60,000 times faster than text</strong>, and 90 percent of information transmitted to the brain is visual. Since we are visual by nature, we can use this skill to enhance data processing and organizational effectiveness.</blockquote><p>Answering the question, Yes it does seem like a significant impact. The following pointers will support the argument:</p><ul><li>96% of consumers find video helpful when making online purchasing decisions.</li><li>79% of online shoppers would rather see a video to get information about a product than read the text on a page.</li><li>The right product video can increase conversions by over 80%.</li><li>90% of customers say videos help them make buying decisions.</li><li>Video can also help reduce negative reviews, by clearly stating what the product offers and what it doesn’t.</li></ul><p>In a holistic view, it improves the customer journey via seller listing quality, providing an enhanced shopping experience. Following are the different types of videos produced for offer listing on e-commerce platforms:</p><ol><li>Product highlights video</li><li>Customer experience video</li><li>Explainer video</li><li>Comparison video</li></ol><p>The amount of effort &amp; cost involved in developing and curating the video can be overwhelming. It can be difficult for the seller to go through the hassle of video production and make it uniform and following the standards of the e-commerce platform. Realizing this challenge, the platforms are providing automated video generation as a service. They are also providing the facility to upload the seller-produced video as a service to enhance the customer experience.</p><p>Let’s drop to the part where AI comes into the picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/0*KqLhMJwOWF3qQS-h.gif" /><figcaption><a href="https://giphy.com/gifs/animation-loop-demon-3oFzlVJAzNUDwvpcc0">Source</a></figcaption></figure><p>Sellers would expect the platform to generate a professional video to attract buyers. The images and the description pointers provided by the seller are constraints to be kept in mind while producing a video.</p><p>A finer customer experience would include a piece of upbeat background music which makes the online shopping session even more engaging. Adding AI-generated voice-over would not only be more explanatory but also assists visually-impaired people to be a part of the same customer journey.</p><p>An intuitive approach for automated video generation with AI voice-over is described below --</p><p>A simple video can be generated by organizing provided images as a sequence with description pointers beside those images, simply using open source libraries like <a href="https://opencv.org/">OpenCV</a>. The code for the same can be found <a href="https://www.geeksforgeeks.org/python-create-video-using-multiple-images-using-opencv/">here</a>.</p><p>For adding AI voice-over, a number of end-to-end neural Text to Speech (TTS) engines are available. <strong>Tacotron2</strong> is one of them and has achieved state of the art performance. It works great with short chunks of text but suffers to model long ones. Long texts can be handled by adopting the multi-head attention mechanism to replace the RNN(Recurrent Neural Network) structures within Tacotron2.</p><p>Neural Speech Synthesis transformer can be trained using <a href="https://keithito.com/LJ-Speech-Dataset/">LJ Speech dataset</a> consisting of 13,100 short audio clips of a single speaker reading passages from 7 non-fiction books. A transcription is provided for each clip. Clips vary in length from 1 to 10 seconds and have a total length of approximately 24 hours. The output from the LJSpeech models can then be projected to pre-trained vocoders from <a href="https://github.com/fatchord/WaveRNN">WaveRNN</a> and <a href="https://github.com/seungwonpark/melgan">MelGAN</a>. They will act as an audio processor that will capture the characteristic elements of the audio features.</p><p><em>Python code snippet to generate AI voiceover</em></p><pre># Synthesize text</pre><pre>sentence = &#39;Hello World! It&#39;s Rahul Bajaj&#39;</pre><pre>out_normal = model.predict(sentence)</pre><pre>############################</pre><pre># Pushing out put to vocoder</pre><pre>sys.path.append(MelGAN_path)</pre><pre>import torch</pre><pre>import numpy as np</pre><pre>##############################</pre><pre>vocoder = torch.hub.load(&#39;seungwonpark/melgan&#39;, &#39;melgan&#39;)</pre><pre>vocoder.eval()</pre><pre>mel = torch.tensor(out_normal[&#39;mel&#39;].numpy().T[np.newaxis,:,:])</pre><pre>##############################<br>if torch.cuda.is_available():</pre><pre>  vocoder = vocoder.cuda()</pre><pre>  mel = mel.cuda()</pre><pre>with torch.no_grad():</pre><pre>  audio = vocoder.inference(mel)</pre><pre>##############################</pre><pre># Display audio</pre><pre>ipd.display(ipd.Audio(audio.cpu().numpy(), rate=22050))</pre><p><em>Python snippet to add audio in the background</em></p><pre>import moviepy.editor as mp</pre><pre>def add_music_to_video(path):</pre><pre>video = mp.VideoFileClip(path + &quot;/transformed_video.mp4&quot;)</pre><pre>audio = mp.AudioFileClip(path + &quot;/presentation.mp3&quot;)</pre><pre>audio = audio.subclip(0,video.duration)</pre><pre>print(audio.duration,video.duration)</pre><pre>final = video.set_audio(audio)</pre><pre>final.write_videofile(path + &quot;/Generated_video.mp4&quot;,codec= &#39;libx264&#39; ,audio_codec=&#39;aac&#39;)</pre><pre>print(&quot;Music is added Successfully&quot;)</pre><p>The above set of instructions would help you get an up and running prototype video. The actual challenge would be establishing the semantic relationship between the input image and the corresponding description pointer.</p><p>For the above task, I propose a <strong>Unified Multi-modal Fusion Architecture</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gb7if6EoayXsQMoLfW9N0Q.png" /><figcaption><strong>Unified Multi-modal Fusion Architecture</strong></figcaption></figure><p>The model will enable correlative information retrieval to automate the selection of images for a particular description text. The sequence of appearance of each image can either be decided based upon the sequence of description points or the confidence value of each image’s relevance to the information conveyed.</p><h3>Summing-up</h3><p>In short, everyone wants to have a proactive approach rather than a reactive one. AI attracts the attention of institutions due to its predictive powers which enable them to have an edge over any situation. While some are just trying to find a better version of Tarot Card Readers😜.</p><p>So, you have finally reached the end of AI in E-commerce: Automated Video Generation. It’s time to checkout the learning added to our cart. Hope this article helps understand the impact and provides an intuitive implementation.</p><p><em>Cheerio! Long Live and Prosper…</em></p><h3>References &amp; credits:</h3><ul><li><a href="https://datafloq.com/read/5-industries-using-artificial-intelligence/7242">5 industries that are using Artificial Intelligence the most</a></li><li><a href="https://www.webretailer.com/b/amazon-product-videos/">Amazon Product Videos: Everything Sellers Need to Know</a></li><li><a href="https://www.t-sciences.com/news/humans-process-visual-data-better">Humans Process Visual Data Better</a></li><li><a href="https://arxiv.org/abs/1809.08895">Neural Speech Synthesis with Transformer Network</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b93b9d17ba8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/walmartglobaltech/ai-in-e-commerce-automated-video-generation-1b93b9d17ba8">AI in E-Commerce: Automated Video Generation</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>
        <item>
            <title><![CDATA[Tête-à-Tête -The ChatBot Creator]]></title>
            <link>https://medium.com/walmartglobaltech/t%C3%AAte-%C3%A0-t%C3%AAte-the-chatbot-creator-56a5b9b36c2?source=rss-7fb65dde9c45------2</link>
            <guid isPermaLink="false">https://medium.com/p/56a5b9b36c2</guid>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[chatbot-design]]></category>
            <category><![CDATA[rasa]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[bot-creator]]></category>
            <dc:creator><![CDATA[Rahul Bajaj]]></dc:creator>
            <pubDate>Thu, 10 Dec 2020 06:35:44 GMT</pubDate>
            <atom:updated>2020-12-10T06:35:44.428Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Source" src="https://cdn-images-1.medium.com/max/800/0*ZdZUsx02p4zAhGIl.gif" /><figcaption><a href="https://in.pinterest.com/pin/507921664221914259/">Image Source</a></figcaption></figure><p><strong><em>“I believe that at the end of the century the use of words and general educated opinion will have altered so much that one will be able to speak of machines thinking without expecting to be contradicted.”</em></strong></p><p><em>~ Alan Turing</em></p><p><strong>Hello World!</strong> Growing up, Ironman used to be my favourite superhero(still is) and I couldn’t pass over the vital contribution of <strong>JARVIS</strong> in saving the world with great Tony Stark. He just had to instruct JARVIS what to do and ….poof…. “Task Completed Mr. Stark” .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/0*VjGd2h31ly6eFxcz.jpg" /><figcaption>Ironman with JARVIS (<a href="https://techaeris.com/2013/11/07/new-google-now-update-easter-egg-reported/">Image Source</a>)</figcaption></figure><p>Wikipedia defines chatbot as:</p><blockquote>A chatbot is a software application used to conduct an on-line chat conversation via text or text-to-speech, in lieu of providing direct contact with a live human agent.</blockquote><p>From the definition, you must have guessed JARVIS is an <strong>MCU </strong>(For Non-Millennials MCU is <strong>Marvel Cinematic Universe</strong>) exaggeration of intelligent chatbots. I know what you are thinking, is it really possible to make such a sophisticated machine? I will answer this in the words of <em>Oscar Wilde -</em></p><p><strong><em>“Shoot for the moon. Even if you miss, you’ll land among the stars”</em></strong></p><p>The Origin of chatbots dates back to 1960s when <strong>ELIZA</strong> was developed at MIT. It was followed by <strong>PARRY</strong> which imitated being a schizophrenia patient. <strong>Jabberwacky</strong>, <strong>Dr. Sbaitso</strong>, <strong>ALICE</strong>, <strong>SmarterChild</strong>, <strong>Siri</strong>, <strong>Google Now</strong>, <strong>Cortana</strong> so on and so forth have donned different robes to serve us in numerous ways since then.</p><p>Today, chatbots are even smarter, can be both proactive and reactive in their approach and can even imitate a real human being(both in intellect and emotions).</p><p>Over the past couple of years, chatbots have become remarkably sophisticated negotiators. And these are no mere assertions. As we move, here are some ambitious <a href="https://snip.ly/0qfohn#https://www.smallbizgenius.net/by-the-numbers/chatbot-statistics/">chatbot usage stats</a> to keep in the back of your mind:</p><ul><li>Chatbots can cut operational costs by up to 30%.</li><li>85% of customer interaction will be handled without human agents by 2021.</li><li>50% of businesses plan to spend more on chatbots than on mobile apps.</li></ul><p><em>Why do we need chatbots?</em></p><pre>- <strong>Case Deflection</strong>: Chatbots can answer commonly asked questions resulting in fewer cases getting logged.</pre><pre>- <strong>Reduced wait times</strong>: Customers spend less time waiting in the queue. They get commonly answered questions in a chat window instead of a call, waiting for an email or any other channel.</pre><pre>- <strong>Saved time for agents</strong>: As chatbots are deflecting common questions, agents can spend time in complex issues.</pre><pre>- <strong>Intelligent responses through NLU (Natural Language Understanding)</strong>: Using NLU, bots can learn how to respond to customers in humanly way.</pre><p><a href="https://www.luis.ai/">Microsoft’s LUIS</a>, Google’s <a href="https://dialogflow.cloud.google.com/#/login">Dialogflow</a> and <a href="https://www.ibm.com/in-en/cloud/watson-natural-language-classifier">IBM Watson</a> are some of the other sophisticated chatbot creators available in the market. In the open source domain, <a href="https://rasa.com/">RASA</a> is leading the way.</p><p>The motive behind <em>tête-à-tête’s </em>creation was to aid the organisations and people, to produce and operate bots, not backed by data science workforce/knowledge. It would facilitate in constructing bots at scale.</p><p>Enough blabbering from my end. <em>Tête-à-Tête bot</em>, please continue…..</p><pre><strong><em>Tête-à-Tête bot</em></strong><em>: </em>Hi! I am here to tell you about my creator. Go!</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/0*d3uTMHV5SvvV1_Fo.gif" /><figcaption><a href="https://in.pinterest.com/pin/31877109849322638/">Image Source</a></figcaption></figure><h3>The Burning Question</h3><h3>What is Tête-à-Tête?</h3><blockquote><em>Tête-à-Tête</em> is Natural Language Understanding Platform which helps to create and optimise AI-powered interactive chatbots. The console will be able to generate the required components in a plug and play manner along with their models for deployment.</blockquote><p><em>“tête-à-tête”</em> literally means a private conversation between two people. The platform will enable to build constant companions for business and personal needs.</p><h3>What does Tête-à-Tête do?</h3><ul><li>Design a novel architecture/pipeline for intelligent processing and streamlining dataflow in the chatbot creation process.</li><li>Deliver a tool to build bots seamlessly without having to interact with the back-end architecture.</li><li>Compare the performance of multiple architectures and suggest the most promising architecture in the tool.</li></ul><h3>Basic Terminologies</h3><p><a href="https://www.helpshift.com/glossary/entity-in-chatbot/"><strong>Entity</strong></a> refers to the modifier the user uses to describe their issue, intent is what they really mean. Entity depicts key details in the user’s text such as the location, time, name etc.</p><p><a href="https://www.helpshift.com/glossary/intent-in-chatbot/"><strong>Intent</strong></a> refers to the goal that we are trying to achieve through the chatbot. It typically encapsulates a category of tasks to be performed.</p><h3>Architecture</h3><p>The platform consists of 3 major components-</p><p><strong>1Grip: </strong>This component majorly handles <strong>Preprocessing pipeline</strong>, <strong>Entity Extraction</strong>, <strong>Vectorisation.</strong></p><p><strong>Preprocessing</strong> includes removing <a href="https://en.wikipedia.org/wiki/Noisy_data">noise</a>, removing <a href="https://en.wikipedia.org/wiki/Stop_word">stop words</a>, <a href="https://en.wikipedia.org/wiki/Stemming">stemming</a>, <a href="https://en.wikipedia.org/wiki/Lemmatisation">lemmatisation</a> etc.</p><p><strong>Entity Extractor</strong> will help in gaining essential information by organising the raw input which will result in understanding of morphological richness of the utterance.</p><p>In <strong>Vectorisation</strong>, input utterances are converted to sequence of word embeddings to be processed by neural network.</p><p><strong>2Cody: </strong>This component is the decision maker and categorises the utterance to a specific intent.</p><ul><li>Classification of intent from the vector formed from the phrase including the entities identified</li><li>Classification of intent from the vector formed from the phrase without including the entities identified</li><li>Identification of intent based upon the set of entities identified (Unstructured classifier)</li><li>This component will also identify the final intent from the weighted average from the confidence values of intents predicted from the above classifiers</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*PGXWq7Njq5Dm883Q.gif" /><figcaption>LSTM cells (<a href="https://towardsdatascience.com/illustrated-guide-to-lstms-and-gru-s-a-step-by-step-explanation-44e9eb85bf21">Image Source</a>)</figcaption></figure><p>Classifier 1, which is a statistical one, will make predictions based upon the set of entities identified.</p><p>Classifier 2 &amp; Classifier 3 are RNN(Recurrent Neural Network). Recurrent Neural Networks suffer from short-term memory. If a sequence is long enough, they’ll have a hard time carrying information from earlier time steps to later ones. LSTM have internal mechanisms called gates that can regulate the flow of information. Classifier 2 is fed with the tensor with tokens including entities and Classifier 3 is fed with the tensor without taking into account the entities.</p><p>A wrapper voting classifier takes into account the results obtained from these three classifiers and predicts the final intent.</p><p><strong>3Action Invoker: </strong>Last but not the least, this component actually bring our whims and fancies to life, based upon the intent identified the platform will execute the pre-defined functions/methods. Every intent is mapped to a response or an action to be performed. It may be a single string response or a complex transaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ken5rHkbq--SmkRi6LQYOw.png" /><figcaption>Architecture</figcaption></figure><h4>Everyone is unique and special in their own way. Let me tell my special qualities:</h4><ul><li>Auxiliary data generation using paraphrasing of training samples</li><li>Plug n Play methodology to include any kind of pre-processor, entity extractor &amp; classifiers which makes it highly customisable and personalisation possible</li><li>Support for transformers like BERT</li><li>Special ingestion methods catering to FAQ only bot, eliminating the need to annotate data enabling to take the system up and running in no time</li><li>Can be used both as a state as well as stateless machine by maintaining context</li><li>Dynamic layer generation in neural network architecture to avoid curse of dimensionality and also extract complete essence</li></ul><h3>Summing-up</h3><p>Chatbots are evolving everyday, opening doors to new dimensions and will come in handy to use cases which we never thought could be automated. There is a huge unused utility potential which organisations are getting familiar with which must be harnessed to make this world a better place.</p><p>It’s time to break the loop of this article. This blog talked about the intuitive parts of T<em>ête-à-Tête. </em>In the next article, we will bring the implementation as well as the GitHub repository of the project to help everyone with the code.</p><p><strong><em>Adios!! Amigo </em></strong>(<em>Chatbot </em>on sleep….zzzzz)</p><h3>References &amp; credits:</h3><p><a href="https://en.wikipedia.org/wiki/Chatbot">https://en.wikipedia.org/wiki/Chatbot</a></p><ul><li><a href="https://onlim.com/en/the-history-of-chatbots/">The History Of Chatbots - From ELIZA to ChatGPT - Onlim</a></li><li><a href="https://towardsdatascience.com/illustrated-guide-to-lstms-and-gru-s-a-step-by-step-explanation-44e9eb85bf21">Illustrated Guide to LSTM’s and GRU’s: A step by step explanation</a></li><li><a href="https://medium.com/datadriveninvestor/top-10-best-ai-chatbots-f68705a8f559">TOP 10 Best AI Chatbots</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56a5b9b36c2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/walmartglobaltech/t%C3%AAte-%C3%A0-t%C3%AAte-the-chatbot-creator-56a5b9b36c2">Tête-à-Tête -The ChatBot Creator</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>