<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Laurence Dupont - AI Virtual Voice Experts with Google Dialogflow CX - CCAI - Nu Echo</title>
	<atom:link href="https://www.nuecho.com/author/ldupont/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.nuecho.com/author/ldupont/</link>
	<description>Nu Echo</description>
	<lastBuildDate>Tue, 07 Jun 2022 16:37:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.nuecho.com/wp-content/uploads/2019/11/cropped-favicon-32x32.png</url>
	<title>Laurence Dupont - AI Virtual Voice Experts with Google Dialogflow CX - CCAI - Nu Echo</title>
	<link>https://www.nuecho.com/author/ldupont/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Exploring Approaches for a Question Answering System</title>
		<link>https://www.nuecho.com/exploring-approaches-for-a-question-answering-system/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=exploring-approaches-for-a-question-answering-system</link>
		
		<dc:creator><![CDATA[Laurence Dupont]]></dc:creator>
		<pubDate>Tue, 07 Jun 2022 16:16:47 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<guid isPermaLink="false">https://www.nuecho.com/?p=9458</guid>

					<description><![CDATA[<p>Problem Definition The scientific literature presents several ways to approach the problem, but we were more specifically interested in the answer selection task. This task aims to predict the correct answer among a set of candidate answers. It assumes that there is always a correct answer for each question. However, in a real Q&#38;A system, [&#8230;]</p>
<p>The post <a href="https://www.nuecho.com/exploring-approaches-for-a-question-answering-system/">Exploring Approaches for a Question Answering System</a> first appeared on <a href="https://www.nuecho.com">AI Virtual Voice Experts with Google Dialogflow CX - CCAI - Nu Echo</a>.</p>
<p>The post <a href="https://www.nuecho.com/exploring-approaches-for-a-question-answering-system/">Exploring Approaches for a Question Answering System</a> appeared first on <a href="https://www.nuecho.com">AI Virtual Voice Experts with Google Dialogflow CX - CCAI - Nu Echo</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span style="font-weight: 400;">Problem Definition</span></h2>
<p><span style="font-weight: 400;">The scientific literature presents several ways to approach the problem, but we were more specifically interested in the answer selection task. This task aims to predict the correct answer among a set of candidate answers.</span></p>
<p><img decoding="async" class="size-full wp-image-9463 aligncenter" src="https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-Short-Version-1.png" alt="" width="645" height="131" srcset="https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-Short-Version-1.png 645w, https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-Short-Version-1-480x97.png 480w" sizes="(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 645px, 100vw" /><br />
<span style="font-weight: 400;">It assumes that there is always a correct answer for each question. However, in a real Q&amp;A system, sometimes we do not want to provide an answer, for example if a user asks an out-of-domain question. The answer triggering task offers this possibility.</span></p>
<p><img decoding="async" class="size-full wp-image-9465 aligncenter" src="https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-Short-Version-2.png" alt="" width="601" height="174" srcset="https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-Short-Version-2.png 601w, https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-Short-Version-2-480x139.png 480w" sizes="(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 601px, 100vw" /></p>
<p>&nbsp;</p>
<h2><span style="font-weight: 400;">System Definition</span></h2>
<p><span style="font-weight: 400;">To accomplish the answer triggering task for a given question, the chosen implementation performs two subtasks:</span></p>
<ol>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">A machine learning model (a classifier) ​​accepts as input a vector representation of the question and returns the probabilities by class. Each class is associated with a question-answer pair.</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">The highest probability is compared to a threshold to determine whether the answer will be returned or not.</span></li>
</ol>
<p><img decoding="async" class="size-full wp-image-9467 aligncenter" src="https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-Short-Version-3.png" alt="" width="733" height="223" srcset="https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-Short-Version-3.png 733w, https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-Short-Version-3-480x146.png 480w" sizes="(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 733px, 100vw" /><br />
<span style="font-weight: 400;">Experiments were then carried out to find the best combination of vectorization model and classifier to perform the first subtask.</span></p>
<h2><span style="font-weight: 400;">Experiments</span></h2>
<p><span style="font-weight: 400;">For the experiments, the banking dataset </span><a href="https://github.com/PolyAI-LDN/task-specific-datasets"><span style="font-weight: 400;">BANKING77</span></a><span style="font-weight: 400;">, created by the conversational solutions company PolyAI, was used. The vectorization model and classifier combinations were evaluated on the test set with the accuracy metric, which calculates the percentage of correct predictions.</span></p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400;">Vectorization Models</span></h3>
<p><span style="font-weight: 400;">Among the different vectorization models, the one that performed the best is Google&#8217;s Universal Sentence Encoder (USE). It is a neural network pretrained simultaneously on several semantic tasks which accepts a text as input and outputs a sentence embedding (a vector representation of the sentence). The pretraining is done on large text corpora like Wikipedia, which allows it to capture the semantic similarity of sentences never seen before, as shown in the example below.</span></p>
<p><img decoding="async" class="alignnone size-full wp-image-9461 aligncenter" src="https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-Semantic-similarity.png" alt="" width="509" height="401" srcset="https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-Semantic-similarity.png 509w, https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-Semantic-similarity-480x378.png 480w" sizes="(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 509px, 100vw" /></p>
<p style="text-align: center;"><i><span style="font-weight: 400;">Semantic similarity of sentences taken from BANKING77 with USE. </span></i><a href="https://www.tensorflow.org/hub/tutorials/semantic_similarity_with_tf_hub_universal_encoder"><i><span style="font-weight: 400;">Reference</span></i></a></p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400;">Classifiers</span></h3>
<p><span style="font-weight: 400;">The evaluated classifiers include a k-nearest neighbor classifier (KNN) and a neural network. The main advantage of the KNN over the neural network is that it does not need to be trained, it just memorizes the training data. Adding new questions to the model therefore does not require retraining. Another advantage is that its predictions are interpretable. To predict the class of a test example, the KNN finds its k-nearest neighbors and returns the majority class. The number of neighbors as well as the distance function are configurable hyperparameters.</span></p>
<p><span style="font-weight: 400;">To illustrate how a KNN works, a simplified example is provided below for a binary classification problem with 2-dimensional data.</span></p>
<p><img decoding="async" class="size-full wp-image-9459 aligncenter" src="https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-graphs.png" alt="" width="582" height="227" srcset="https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-graphs.png 582w, https://www.nuecho.com/wp-content/uploads/2022/06/Blog-EN-Exploring-Approaches-for-a-Question-Answering-System-graphs-480x187.png 480w" sizes="(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 582px, 100vw" /></p>
<p style="text-align: center;"><i><span style="font-weight: 400;">Example for a KNN with k=3 and Euclidean distance. For the test example in gray, we will<br />
predict the class in blue (majority class among the 3 nearest neighbors).</span></i></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">First, experiments were performed with a KNN with </span><a href="https://en.wikipedia.org/wiki/Cosine_similarity"><span style="font-weight: 400;">cosine distance</span></a><span style="font-weight: 400;">. Afterwards, other experiments were carried out with a learned distance function (</span><a href="http://contrib.scikit-learn.org/metric-learn/introduction.html"><span style="font-weight: 400;">metric learning</span></a><span style="font-weight: 400;">) in order to improve performance. The purpose of the algorithm was to bring together the examples of the same class and to distance the examples belonging to different classes. In both cases, the accuracy obtained with the neural network was superior, which led to the latter being chosen as the classifier.</span></p>
<h2><span style="font-weight: 400;">System Evaluation</span></h2>
<p><span style="font-weight: 400;">The experiments described above have established that the best model was the one combining the Universal Sentence Encoder with an MLP. To evaluate this model, a comparison was performed on the answer triggering task with the NLU intention classification models of Dialogflow ES and Rasa. To do this, a new “out_of_scope” intent containing </span><a href="https://github.com/ycemsubakan/covid_chatbot_data"><span style="font-weight: 400;">questions about COVID-19</span></a><span style="font-weight: 400;"> has been added to the BANKING77 test set. For all models, rejecting out-of-domain examples proved more difficult than properly classifying in-domain examples. However, overall, it was the USE model combined with a neural network that stood out. This evaluation has therefore demonstrated that this model can be used to develop an effective and efficient Q&amp;A system.</span></p>
<p><span style="font-weight: 400;">For more details on the models used, the methodology followed and the results of the experiments, we invite you to consult <a href="https://www.nuecho.com/wp-content/uploads/2022/06/White-Paper-EN-Exploring-Approaches-for-a-Question-Answering-System.pdf" target="_blank" rel="noopener">this article</a></span><span style="font-weight: 400;">.</span></p><p>The post <a href="https://www.nuecho.com/exploring-approaches-for-a-question-answering-system/">Exploring Approaches for a Question Answering System</a> first appeared on <a href="https://www.nuecho.com">AI Virtual Voice Experts with Google Dialogflow CX - CCAI - Nu Echo</a>.</p><p>The post <a href="https://www.nuecho.com/exploring-approaches-for-a-question-answering-system/">Exploring Approaches for a Question Answering System</a> appeared first on <a href="https://www.nuecho.com">AI Virtual Voice Experts with Google Dialogflow CX - CCAI - Nu Echo</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Developing Conversational IVR Using Rasa Part 3: Dialogue Management</title>
		<link>https://www.nuecho.com/developing-conversational-ivr-using-rasa-part-3-dialogue-management/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=developing-conversational-ivr-using-rasa-part-3-dialogue-management</link>
		
		<dc:creator><![CDATA[Laurence Dupont]]></dc:creator>
		<pubDate>Tue, 23 Jul 2019 13:00:57 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[IVR]]></category>
		<guid isPermaLink="false">https://zux.zsm.mybluehost.me/?p=4167</guid>

					<description><![CDATA[<p>Dialogue requirements Our banking IVR is a self-service application in which a caller can execute tasks like paying a bill or getting an account balance. The dialogue includes a loop that allows the caller to carry out tasks as many times as he or she wants: &#160; The application accommodates expert users by allowing them [&#8230;]</p>
<p>The post <a href="https://www.nuecho.com/developing-conversational-ivr-using-rasa-part-3-dialogue-management/">Developing Conversational IVR Using Rasa Part 3: Dialogue Management</a> first appeared on <a href="https://www.nuecho.com">AI Virtual Voice Experts with Google Dialogflow CX - CCAI - Nu Echo</a>.</p>
<p>The post <a href="https://www.nuecho.com/developing-conversational-ivr-using-rasa-part-3-dialogue-management/">Developing Conversational IVR Using Rasa Part 3: Dialogue Management</a> appeared first on <a href="https://www.nuecho.com">AI Virtual Voice Experts with Google Dialogflow CX - CCAI - Nu Echo</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1>Dialogue requirements</h1>
<p>Our banking IVR is a self-service application in which a caller can execute tasks like paying a bill or getting an account balance. The dialogue includes a loop that allows the caller to carry out tasks as many times as he or she wants:</p>
<p><img decoding="async" class="wp-image-4171 size-full aligncenter" src="https://www.nuecho.com/wp-content/uploads/2019/07/1-1.jpg" alt="" width="499" height="566" /></p>
<p>&nbsp;</p>
<p>The application accommodates expert users by allowing them to quickly complete their tasks:</p>
<p><img decoding="async" class="wp-image-4173 size-full alignnone" style="display: block; margin-left: auto; margin-right: auto;" src="https://www.nuecho.com/wp-content/uploads/2019/07/2-1.jpg" alt="" width="479" height="207" /></p>
<p>&nbsp;</p>
<p>It also adapts to less experienced users by providing them with a more directed dialogue when needed:</p>
<p><img decoding="async" class="wp-image-4175 size-full aligncenter" src="https://www.nuecho.com/wp-content/uploads/2019/07/3-1.jpg" alt="" width="487" height="348" /></p>
<p>&nbsp;</p>
<p>The IVR supports mixed initiative strategies like digressions:</p>
<p><img decoding="async" class="wp-image-4177 size-full aligncenter" src="https://www.nuecho.com/wp-content/uploads/2019/07/4-1.jpg" alt="" width="486" height="335" /></p>
<p>&nbsp;</p>
<p>As well as change requests or corrections:</p>
<p><img decoding="async" class="wp-image-4179 size-full aligncenter" src="https://www.nuecho.com/wp-content/uploads/2019/07/5.jpg" alt="" width="476" height="212" /></p>
<p>&nbsp;</p>
<p>The dialogue also handles error recovery, including errors that are specific to the voice channel:</p>
<p><img decoding="async" class="wp-image-4181 size-full aligncenter" src="https://www.nuecho.com/wp-content/uploads/2019/07/6.jpg" alt="" width="480" height="613" /></p>
<p>&nbsp;</p>
<p>This is only an overview of the patterns handled by our dialogue model; several others are already implemented. We are also planning on adding other dialogue strategies, such as cancelling a task or handling more complex <a href="https://www.nuecho.com/news-events/corrections-in-conversational-ivr-part-1/" target="_blank" rel="noopener">corrections</a> and <a href="https://www.nuecho.com/news-events/corrections-in-conversational-ivr-part-2/" target="_blank" rel="noopener">change requests</a>.</p>
<h1>Implementation: why we opted for a deterministic approach</h1>
<p>Early on, we decided to rely on a deterministic approach for our use cases. The main reasons why machine learning was less adapted to our current use cases are as follows:</p>
<ul>
<li>Task related dialogues are predictable and relatively directed</li>
<li>Tasks can be executed repeatedly and the application behavior should be identical every time</li>
<li>Tasks should be interrupted and resumed reliably</li>
<li>Tokens of information that are collected for a given task are not relevant for another</li>
<li>Tasks are independent and must not interact with each other</li>
</ul>
<p>In addition, our requirements for error recovery and change management were rather strict.</p>
<h1>Deterministic approach</h1>
<p>Our deterministic approach consists in managing actions using a stack. A stack is a data structure of type last in first out; in other words, the last item added to the stack is the first one to be removed. The action at the top of the stack is the one in focus. When we add an action to a stack, it becomes in focus. When the action in focus is completed, it is removed from the stack and the dialogue goes back to the previous action. This allows to interrupt and resume actions in a predictable and robust manner.</p>
<p>This can be illustrated as follows:</p>
<p><img decoding="async" class="wp-image-4183 size-full aligncenter" src="https://www.nuecho.com/wp-content/uploads/2019/07/7.jpg" alt="" width="797" height="190" /></p>
<p>&nbsp;</p>
<p>Here is an example of the state of a stack for a dialogue in which the user interrupts the ongoing action (digresses) to ask for a list of their accounts. Once the digression to hear the list of accounts is completed, this action is removed from the stack and the focus comes back to the previous action, that is, the bill payment action.</p>
<p><img decoding="async" class="wp-image-4208 size-full aligncenter" src="https://www.nuecho.com/wp-content/uploads/2019/07/88.jpg" alt="" width="638" height="802" srcset="https://www.nuecho.com/wp-content/uploads/2019/07/88.jpg 638w, https://www.nuecho.com/wp-content/uploads/2019/07/88-239x300.jpg 239w" sizes="(max-width: 638px) 100vw, 638px" /></p>
<p>In addition to allowing us to manage digressions elegantly, our approach allows us to define isolated contexts for each action. This ensures that they remain independent.</p>
<p>Next are some additional details on how this was implemented using Rasa.</p>
<h3>Custom policy</h3>
<p>In Rasa, a <a href="https://rasa.com/docs/rasa/core/policies/" target="_blank" rel="noopener">policy</a> is what allows to predict/specify the next <a href="https://rasa.com/docs/rasa/core/actions/" target="_blank" rel="noopener">action</a> to be executed in the dialogue depending on context (<a href="https://rasa.com/docs/rasa/api/events/#force-a-followup-action" target="_blank" rel="noopener">tracker</a>). Out-of-the-box, Rasa offers a combination of deterministic and machine learning based policies. It is also possible to create our own policy. This is what we did by implementing a deterministic policy that alternates between waiting for the next user input and triggering an action used as an action manager (responsible for managing the action stack). Since we do not make predictions as to what action must be executed, our policy does not use <a href="https://rasa.com/docs/rasa/core/stories/" target="_blank" rel="noopener">stories</a> and does not require a training phase. This is the only policy that we use.</p>
<h3>Action manager</h3>
<p>We have created an abstraction to manage the action stack that was described above. The stack is a complex object that we store in an <a href="https://rasa.com/docs/rasa/core/slots/#unfeaturized-slot" target="_blank" rel="noopener">unfeaturized slot</a>. The action to be executed depends on the user’s input as well as the state of the stack.</p>
<h3>Custom dialogue patterns</h3>
<p>One frequent dialogue pattern is information token collection, or slot-filling. This pattern is used, for instance, by the bill payment action. Rasa provides an action for this pattern: the <a href="https://rasa.com/docs/rasa/core/forms/" target="_blank" rel="noopener">FormAction</a>. However, we needed to support other, more complex patterns than what is offered by the FormAction, for example: slot confirmation when the speech recognition confidence score is low, final confirmation at the end of an action, etc. We have therefore created a custom class “Task” that handles these more complex patterns. Some of our actions inherit this class. We appreciate that Rasa offers the flexibility that we need to implement our own dialogue management strategies.</p>
<h3>Unit test framework</h3>
<p>Since we have implemented our dialogues using a deterministic approach, we were able to build our own unit test framework to test our dialogues. This allowed us to increase our application’s reliability.</p>
<h1>Next steps</h1>
<p>Although we have been relying on a deterministic approach to develop our banking use cases, we are also currently experimenting with machine learning to develop dialogues for different use cases.</p>
<ul>
<li>Here are some of the next items that we will explore:</li>
<li>Use the <a href="https://rasa.com/docs/rasa/core/policies/#embedding-policy" target="_blank" rel="noopener">Recurrent Embedding Dialogue Policy</a> to support <a href="https://blog.rasa.com/attention-dialogue-and-learning-reusable-patterns/" target="_blank" rel="noopener">uncooperative user behavior</a></li>
<li>Use <a href="https://rasa.com/docs/rasa-x/" target="_blank" rel="noopener">Rasa X</a> to learn from real conversations</li>
<li>Create more natural dialogues by using recorded prompts instead of TTS</li>
<li>Try to integrate machine learning in our deterministic model</li>
</ul>
<p>We will share our experience in future posts as we move forward. Stay tuned!</p><p>The post <a href="https://www.nuecho.com/developing-conversational-ivr-using-rasa-part-3-dialogue-management/">Developing Conversational IVR Using Rasa Part 3: Dialogue Management</a> first appeared on <a href="https://www.nuecho.com">AI Virtual Voice Experts with Google Dialogflow CX - CCAI - Nu Echo</a>.</p><p>The post <a href="https://www.nuecho.com/developing-conversational-ivr-using-rasa-part-3-dialogue-management/">Developing Conversational IVR Using Rasa Part 3: Dialogue Management</a> appeared first on <a href="https://www.nuecho.com">AI Virtual Voice Experts with Google Dialogflow CX - CCAI - Nu Echo</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
