arrow_back

Managing Environments with Conversational Agents

로그인 가입
700개 이상의 실습 및 과정 이용하기

Managing Environments with Conversational Agents

실습 1시간 30분 universal_currency_alt 크레딧 5개 show_chart 중급
info 이 실습에는 학습을 지원하는 AI 도구가 통합되어 있을 수 있습니다.
700개 이상의 실습 및 과정 이용하기

SCBL095

Lab objectives

In this lab, you will explore the management of Conversational Agents environments. By the end of this lab, you will be able to:

  • Create versions of your conversational agent.
  • Create environments where your conversational agent will be published.
  • Load a saved version of your conversational agent to an environment.
  • Change which version is loaded to an environment.

Resources

The following are some resources intended to help you complete the lab components:

Setup and requirements

Setting up the lab

Before you click the Start Lab button

Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources will be made available to you.

This Qwiklabs hands-on lab lets you do the lab activities yourself in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials that you use to sign in and access Google Cloud for the duration of the lab.

What you need

To complete this lab, you need:

  • Access to a standard internet browser (Chrome browser recommended).
  • Time to complete the lab.

Note: If you already have your own personal Google Cloud account or project, do not use it for this lab.

Note: If you are using a Pixelbook, open an Incognito window to run this lab.

Task 1. Getting started with Conversational Agents

In this task, you'll get logged into Conversational Agents and create a new agent.

  1. Enable the Dialogflow API and Vertex AI Applications API.

  2. In your Google Cloud Console, navigate to AI Applications > Conversational agent.

  3. Click on Build your own when prompted to create an agent.

  4. Name your agent Flight Booker .

  5. Set the location to .

  6. Ensure timezone and default language are set appropriately. Set the Conversation Start to Flow.

  7. Click on Create. Once the agent is created, you will see the design and configuration of the Conversational Agents UI.

    agent_flow.png


Task 2. Importing a .blob Conversational Agent file

In this task, you will import a Conversational Agent from an earlier lab.

  1. Click the up-and-down arrows at the action bar of the Conversational Agents UI.

  2. Click Restore Agent from the expanded menu options.

  3. Select the Cloud Storage radio button if not already selected.

  4. Enter gs://cloud-training/T-CECCAI-I/T-CCAICDCX-I/lab-solns/Cloudio-cx-speak-to-person.blob for URI.

  5. Click Restore.

    Refer to the Conversational Agents restore documentation as needed.

    Now you have a conversational agent that has everything completed from an earlier lab.

Note: If you'd like to retain a copy of the sample agent, download gsp929-start-agent.blob to your local hard drive.


Task 3. Creating environments

  1. In the Google Cloud Console, navigate to Conversational Agents > Environments.

  2. Click + Create to create a new environment.

  3. Enter QA for the display name.

  4. Click on Save.

    You'll see a message saying Version must be provided for start flow resource. Why do you think this is?

    Hint: We haven't yet created a published version of the Default Start Flow (or any other flow for that matter).

  5. Select Versions in the main side menu.

  6. Click the Flows tab and then on Default Start Flow.

  7. Click + Create to create a version of the flow.

  8. Enter Cloudio main v1 basic chat bot for the display name and description.

  9. Click Save.

    You should now see the Default Start Flow in the Versions list with the number of # versions equal to 1.

  10. Select Environments to return to configuring a new environment.

  11. Click + Create.

  12. Enter QA for the display name.

  13. Choose Cloudio main v1 basic chat bot from the Version dropdown list next to the Default Start Flow.

  14. Click Save.

    You may see a message such as:

    Version 'projects/qwiklabs-gcp-03-407df58d36b0/locations/us-central1/agents/e2779218-b813-4844-a0ea-ec2ef504636d/flows/00000000-0000-0000-0000-000000000000/versions/1' is not ready to serve because its training is RUNNING. Wait for training to finish or fix the version if its training failed.

    This is caused when Conversational Agents is still capturing and training your conversational agent. Try saving again after waiting a few moments.

    You should now see your new QA environment in the list.


Task 4. Managing environments

Next, you can test out your versioned conversational agent in the environment you created.

  1. Click on Toogle Simulator in the upper right to open the simulator pane and select the QA environment that you just created.

  2. Enter Is there a customer service rep I can talk to? in the text box.

    You should get a response from the agent saying "Please stand by while I connect you with a customer service representative."

    This is one of the ways you can run test cases in different environments.

    Next, you'll make a change to your conversational agent and save it as a new version.

  3. Navigate to Conversational Agents > Flows > Build.

  4. Click on the Speak to Person page.

  5. Click on the Entry fulfillment that says Please stand by while I connect you with a customer service representative.

  6. Change the Agent says prompt to I'll get you to a live agent right away.

  7. Click on Save.

  8. Go back to Conversational Agents > Versions > Flows.

  9. Repeat the versioning steps above to create a new version of your Default Start Flow called Cloudio main v2 basic chat bot.

  10. Repeat the steps above to create a new environment called Dev that uses the new version of your Default Start Flow.

    You should now see the number of versions incremented to 2 for the Default Start Flow in the Versions list.

Note: You may again get an error similar to the following, so just wait a few moments and try saving again. "Version 'projects/qwiklabs-gcp-00-fe6cab958249/locations/us-central1/agents/6792c492-5f79-4ccf-8f17-e757b34f38b9/flows/00000000-0000-0000-0000-000000000000/versions/2' is not ready to serve because its training is RUNNING. Wait for training to finish or fix the version if its training failed."
  1. Click on QA in your Environments section.

  2. Select your Cloudio main v2 basic chat bot from the dropdown.

  3. Click on Save.

    Now your latest version of your flow is loaded to the QA environment.

    Next you'll go back to the toggle simulator to test your new Cloudio main v2 basic chat bot version.

  4. Enter Is there a customer service rep I can talk to? in the text box and select the Environment to be Dev.

    You should get a response from the agent saying I'll get you to a live agent right away. indicating that it was running the v2 of your agent.

Note: You could have run the test against your conversational agent in Draft. By selecting a specific environment, the test is running the version of your conversational agent loaded to the specified environment (which may be different from what you're currently working on in Conversational Agents in Draft mode). Another benefit is you can test different versions without going through the process of retraining the model (which can take some time for larger, more complex conversational agents).

That's it! Now you can manage different versions and run tests in different environments.


Task 5. Creating Playbook versions

  1. In the Conversational Agents Console, navigate to Playbooks.

  2. Click + Create and select Task as the type of Playbook.

  3. Name the Playbook Weather bot.

  4. Set the goal Welcome customers to the chat, introduce yourself, and answer questions about the weather.

  5. Add the following instructions:

- Greet the user saying that your name is John and you'll be assisting them today in questions about the weather. - If there are any questions that are not about the weather, tell the user to ask a question about the weather. - Always answer questions about the weather saying that it is sunny.
  1. Click Save.

  2. Click Version history and then Create version.

  3. Set the name as v1 and click Save.

  4. Navigate to Environments and click on QA.

  5. Under Playbooks, locate the Weather bot, select v1 and click save.

  6. Open the simulator and, select the QA environment and the Weather bot as Start resource.

  7. Enter the following 2 sentences to see that the bot's name is John and the weather is sunny:

Hi What is the weather in Berlin today?

Task 6. Creating Tool versions

  1. In the Conversational Agents Console, navigate to Tools.

  2. Click Create and name it weather.

  3. Select type Function.

  4. In the Parameter Schemas section, under Samples, select getWeather. This pre-fills the input and output parameters.

  5. Click Save.

  6. Click Version History, Create version, name it v1 and click save.

  7. Navigate to Playbooks > Weather bot.

  8. Under available tools at the bottom select the weather function.

  9. Replace the last line of the instructions with the following sentence: - Always answer questions about the weather asking the ${TOOL:weather}.

  10. Click Save.

  11. Click Version history, Create version, name it v2 and click save.

  12. Navigate to Environments and click on Dev.

  13. Under Playbooks, locate the Weather bot, select v2 and under Tools, locate the weather tool, select v1 and click save.

  14. Open the simulator and, select the Dev environment and the Weather bot as Start resource.

  15. Enter the following 2 sentences to see that the bot's name is John and that the weather tool is called:

Hi What is the weather in Berlin today?
  1. In the output tool enter the following json:
{ "temperature": 30 }
  1. Click Submit function output. The agent should respond with the following sentence: The weather in Berlin is 30 degrees.
Congratulations! You created multiple versions of Flows, Playbooks and Tools, packaged them in different environments and used the Simulator to test them.

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.

시작하기 전에

  1. 실습에서는 정해진 기간 동안 Google Cloud 프로젝트와 리소스를 만듭니다.
  2. 실습에는 시간 제한이 있으며 일시중지 기능이 없습니다. 실습을 종료하면 처음부터 다시 시작해야 합니다.
  3. 화면 왼쪽 상단에서 실습 시작을 클릭하여 시작합니다.

시크릿 브라우징 사용

  1. 실습에 입력한 사용자 이름비밀번호를 복사합니다.
  2. 비공개 모드에서 콘솔 열기를 클릭합니다.

콘솔에 로그인

    실습 사용자 인증 정보를 사용하여
  1. 로그인합니다. 다른 사용자 인증 정보를 사용하면 오류가 발생하거나 요금이 부과될 수 있습니다.
  2. 약관에 동의하고 리소스 복구 페이지를 건너뜁니다.
  3. 실습을 완료했거나 다시 시작하려고 하는 경우가 아니면 실습 종료를 클릭하지 마세요. 이 버튼을 클릭하면 작업 내용이 지워지고 프로젝트가 삭제됩니다.

현재 이 콘텐츠를 이용할 수 없습니다

이용할 수 있게 되면 이메일로 알려드리겠습니다.

감사합니다

이용할 수 있게 되면 이메일로 알려드리겠습니다.

한 번에 실습 1개만 가능

모든 기존 실습을 종료하고 이 실습을 시작할지 확인하세요.

시크릿 브라우징을 사용하여 실습 실행하기

이 실습을 실행하려면 시크릿 모드 또는 시크릿 브라우저 창을 사용하세요. 개인 계정과 학생 계정 간의 충돌로 개인 계정에 추가 요금이 발생하는 일을 방지해 줍니다.