Gone are the bots of the past which interpreted inquiries incorrectly or couldn't maintain context within a conversation. Google's Contact Center as a Service (CCaaS) provides all the tools, services, and APIs you'll need to build your Conversational agent so you can hold intelligent conversations with customers reaching out to you for assistance.
In this course you'll learn how to utilize Conversational Agents built in features to test, debug, and improve your agent. We will show you how to create and maintain test cases, use the validations tool to improve agent functionality, review conversation history logs, and use the console to test and debug.
Objectives
In this lab, you'll explore some of the testing and logging tools available for developing an agent in Conversational Agents. By the end of this module, you'll be able to:
Use Conversational Agent tools for troubleshooting.
Use Google Cloud tools to debug your conversational agent.
Review logs generated by Conversational agent activity.
Resources
The following are some resources that may help you complete the lab components of this course:
Download and refer to the Conversational agent solution when you want to compare your work with the sample solution to this lab.
Download and use the Conversational agent quick start when you missed an earlier lab and need to import a prerequisite solution in order to work on the lab for this module.
Setup and requirements
Setting up
For each lab, you get a new Google Cloud project and set of resources for a fixed time at no cost.
Make sure you signed into Qwiklabs using an incognito window.
Note the lab's access time (for example, and make sure you can finish in that time block.
When ready, click .
Note your lab credentials. You will use them to sign in to the Google Cloud Console.
Click Open Google Console.
Click Use another account and copy/paste credentials for this lab into the prompts.
Accept the terms and skip the recovery resource page.
Assumption: You've already logged into Google Cloud before continuing with the steps below.
Navigate to AI Applications and click on Continue and activate the API.
To create a new conversational agent, go to the AI Applications Apps Console choose Conversational agent as the app type, and click Create.
A new page for Conversational Agents opens. On this page, you should see a pop-up asking you to select a project.
Search the list in the pop-up for the project that matches your assigned Project ID (i.e., ) for this lab. Click on .
Note: If you don't see your Project ID listed, look at the user on the right side to confirm that you are using Conversational Agents as student.
Select Build your own on the Get started with Conversational Agents popup.
On the Create agent page, for the agent display name enter Cloudio-cx.
Select location as .
Ensure the timezone and default language are set appropriately. Set the Conversation start to Flow, and then click on Create button.
Once the agent is created, you will see the design and configuration portion of the Conversational Agents UI.
Task 1. Importing a .blob Conversational agent file
In this task, you can import the conversational agent you worked on for an earlier lab or you can import the conversational agent quick start. Choose the option you feel will help you get the most out of this lab.
Import your conversational agent according to the instructions found in Conversational Agents, Export and restore an agent.
Task 2. Creating a test case
In this task, you'll create a new test case and save it so that you can run it again later without typing in everything all over again.
Let's start by viewing the Test Cases section in the Conversational Agents.
To create the test case, click on Toggle Simulator to open the Simulator pane.
Enter the customer utterance, I want to upgrade my tier, for the ChangeTier intent,
The Conversational Agent should respond with "Which tier do you want?"
Enter gold.
The Conversational Agent should respond with What's the phone number on your account?
Enter 4155551212.
The Conversational Agent should respond with Your tier is now gold. Anything else?.
Click the Create test case button above the simulator (in the upper right of the Simulator pane).
Enter the following in the Create Test Case pop-up window:
Enter the Display Name as Change Tier.
Expand the Basic Settings section and enter the Tags as #gold.
In Notes field enter Customer wants to upgrade to the gold tier.
Click the Save test case button above the simulator.
From the left navigation menu, navigate to Test cases under the TEST & EVALUATE tab.
Select your test case named Change Tier from the list.
However, the Last Run State pane is currently blank. To execute your test case, click the Run selected button and select the Draft environment.
Notice the Last tested pane is now populated with the test you just ran. The Last Run State now shows Pass. The timestamp is more recent than your first test.
You can open the View running operations list by clicking on the hourglass icon in the upper right.
Click on your test case to Edit it.
Notice there are two fields, one for Optional Settings and one for Expected conversation.
Notice the Expected conversation script contains all of the conversation details you entered into the simulator.
Click on t the first user utterance, I want to upgrade my tier, and replace it with I want to change tier.
Click Save.
What does this do? You're probably thinking, correctly, that Conversational Agents might potentially match a different intent if it find a training phrase that more closely matches the customer utterance.
In this particular case, it's ok. Conversational Agent runs through the test case and matches it to the ChangeTier intent just as before.
This is an easy way for you to make simple modifications to your test cases without rebuilding them, but you'll want to be careful not to make changes that result in a different scenario entirely.
Task 3. Reviewing validation data
Navigate to Flows, open the Manage tab, and then click Validations under the Feedback tab
Are there any validation errors or warnings?
Click on the Flow dropdown and choose Default Start Flow if not already preset.
Are there any errors or warnings now?
Note: You may need to refresh the page to see errors and warnings.
Expand the Intent: subscribe intent under Intent issues.
Notice it contains the warning, The annotated text 'Wang' in training phrase 'i want to get a new account for 9255551212 with silver tier and last name is Wang' does not correspond to entity type '@sys.last-name”.
You should see a warning, The page cannot reach END_FLOW/END_SESSION or another flow.
What do you think this means?
Hint: The Anything Else page does not explicitly define an end page or flow. That's ok because we want Cloudio to wait for another request from the user (versus terminate the session).
Task 4. Getting to Google Cloud execution logs
In this task, you'll look at execution logs generated for your Conversational Agent which will help you to debug any issues.
In the Google Cloud console, type "Logging" in the search bar, and then click Logging in the resulting options.
The Logging Explorer opens by default. Don't worry if you don't see much there yet. There will be once we do some more testing.
Click on Last 1 hour (or if it says Last, click on that).
In Relative time enter 15m and press Enter.
Under All severities, look for Debug type logs if you have them. If not, try another log severity type (for instance, Info type).
Notice in the Query pane, you can construct a query to include only logs with specific type or other criteria. For instance,
severity=INFO
This filters out everything except INFO type logs.
You may want to inspect DEBUG type log for webhooks in your Conversational Agent to see what the parameters were and how long they took.
Sometimes you'll see DEBUG level logs that give you an indication of simple typos in your code. For example, let's say you forgot to set the value of the tier parameter in your cloud function.
You might get a log such as the following indicating your cloud function crashed:
Task 5. Debugging from the Conversational Agents interface
Some debugging efforts are best done in the Conversational Agents simulator pane and good old fashioned detective work.
Navigate to the ChangeTier flow under Flows > Build tab in the Conversational Agents.
Click on the Get Tier page.
Click on the phone_number parameter to bring up the configuration pane.
Deselect Required.
Click Save.
Next, you'll run your Change Tier test case that you created earlier in this lab.
Navigate to Test cases under the TEST & EVALUATE tab.
Select your Change Tier test case.
Click on the Run selected button and choose environment Draft.
Did the test case show a status of Fail?
In this scenario, your test case was expecting a valid value for the phone-number but you never actually got a phone-number from the user. Your test case proved that the new scenario will not work for your Conversational Agent.
Navigate to the ChangeTier flow under Flows > Build tab and click on Get Tier page and enable Required option for the phone-number parameter and then click on Save.
Rerun your Change Tier test case.
Did it work this time?
Excellent! You're well on your way to using logs as well as test cases to debug your conversational agent.
Congratulations!
You've created a simple agent in Conversational Agents. In the next section, we'll go over slightly more complex scenarios and build out more of the Cloudio functionality.
Completion
In this lab you may not have created any new functionality for your Conversational Agent, but you've seen what things could look like when they're not working.
Export your agent (optional)
In the Agent dropdown at the top, choose View all agents.
Click on the ellipsis menu (three vertical dots) on the right next to your Conversational Agent.
Select Export.
Your Conversational Agent will be downloaded to your local machine as a *.blob type file. You can use the Restore option to import it later.
Cleanup
In the Cloud Console, sign out of the Google account.
Close the browser tab.
End your lab
When you have completed your lab, click End Lab. Qwiklabs removes the resources you’ve used and cleans the account for you.
You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.
The number of stars indicates the following:
1 star = Very dissatisfied
2 stars = Dissatisfied
3 stars = Neutral
4 stars = Satisfied
5 stars = Very satisfied
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
Copyright 2023 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
Os laboratórios criam um projeto e recursos do Google Cloud por um período fixo
Os laboratórios têm um limite de tempo e não têm o recurso de pausa. Se você encerrar o laboratório, vai precisar recomeçar do início.
No canto superior esquerdo da tela, clique em Começar o laboratório
Usar a navegação anônima
Copie o nome de usuário e a senha fornecidos para o laboratório
Clique em Abrir console no modo anônimo
Fazer login no console
Faça login usando suas credenciais do laboratório. Usar outras credenciais pode causar erros ou gerar cobranças.
Aceite os termos e pule a página de recursos de recuperação
Não clique em Terminar o laboratório a menos que você tenha concluído ou queira recomeçar, porque isso vai apagar seu trabalho e remover o projeto
Este conteúdo não está disponível no momento
Você vai receber uma notificação por e-mail quando ele estiver disponível
Ótimo!
Vamos entrar em contato por e-mail se ele ficar disponível
Um laboratório por vez
Confirme para encerrar todos os laboratórios atuais e iniciar este
Use a navegação anônima para executar o laboratório
Para executar este laboratório, use o modo de navegação anônima ou uma janela anônima do navegador. Isso evita conflitos entre sua conta pessoal e a conta de estudante, o que poderia causar cobranças extras na sua conta pessoal.
In this lab, you'll explore testing and logging tools available for developing your agent in Conversational Agents.
Duração:
Configuração: 0 minutos
·
Tempo de acesso: 90 minutos
·
Tempo para conclusão: 90 minutos