
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
As Lead AI Solutions Architect at Cymbal Bank, your task is to enforce strict data privacy for the Zermatt Holiday Helper agent, which is an app used by high-value customers. To comply with internal policies and industry regulations, you must ensure that personally identifiable information (PII) is not stored in logs, the conversation history, or exports.
This involves using Google Cloud’s Data Loss Prevention (DLP) API, Conversational Agents security settings, and BigQuery redaction to automatically detect and redact sensitive data such as credit card numbers.
In this lab, you learn how to perform the following tasks:
By the end of this lab, your Conversational Agents agent should be fully compliant with Cymbal Bank’s privacy and data retention standards to ensure sensitive information is redacted across all data flows.
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.
To complete this lab, you need:
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.
1. Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is a panel populated with the temporary credentials that you must use for this lab.
2. Copy the username, and then click Open Google Console. The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Open the tabs in separate windows, side-by-side.
If you see the Choose an account page, click Use Another Account.
3. In the Sign in page, paste the username that you copied from the Connection Details panel. Then copy and paste the password.
Important: You must use the credentials from the Connection Details panel. Do not use your Qwiklabs credentials. If you have your own Google Cloud account, do not use it for this lab (avoids incurring charges).
4. Click through the subsequent pages:
After a few moments, the Cloud Console opens in this tab.
In this task, you help to uphold Cymbal Bank's data security and privacy standards by ensuring that PII is stored only in specially managed environments. Specifically, you avoid storing sensitive data in the Conversational Agents conversation history, Conversational Agents log entries, or conversations exported into BigQuery.
Here is a breakdown of the test-related activities in this task:
Go to the Conversational Agents console and in the Select Project window, choose
Under Agents, click Zermatt Holiday Helper.
In the left-hand menu, select Tools, and select snow_conditions to edit the OpenAPI schema.
Scroll down to the Schema section and ensure YAML is selected. Replace the url
under servers
with
In the Google Cloud console, search for Data Loss Prevention
, and select Data Loss Prevention in the search results.
On the Sensitive Data Protection page that opens, click the Configuration tab, and select Templates > Inspect. Click on Create Template and configure a template with the following settings:
Setting | Value |
---|---|
Template type | Inspect (find sensitive data) |
Template ID | zhh-pii-template-lab |
Display name | Lab Agent PII |
Region |
Click Continue.
Under Configure detection, in the InfoTypes field, click Manage Infotypes.
In the Filter field where it says Enter property name or value, search for CREDIT_CARD_NUMBER
.
Select the relevant result in the Value dropdown list, and click Done.
In the Confidence threshold ("minimum likelihood") section, in the Minimum likelihood dropdown list, select Very unlikely.
Click Create.
In the Conversational Agents console, click on the Zermatt Holiday Helper agent. (If prompted, in the Select Project window, choose
Click the Settings () icon in the toolbar.
On the General tab, scroll down to Logging settings, and select the Enable conversation history checkbox.
In the BigQuery export section, select the Enable BigQuery export checkbox.
Configure the BigQuery export settings as follows:
Setting | Value |
---|---|
Project name | |
BigQuery dataset | agent_exports |
BigQuery table | dialogflow_bigquery_export_data |
Click Save on the toolbar.
Switch to the Security tab. In the Data security section, click on Manage Security Settings.
In the new CES (it might still say CCAI but it's being rebranded to CES) browser tab that opens, click Create Security Settings, and configure it as follows:
Setting | Value |
---|---|
Display Name | zhh-pii-security-lab-settings |
Location | |
Redaction Strategy | REDACT_WITH_SERVICE |
Redaction Scope | REDACT_DISK_STORAGE |
Purge Data Type | DIALOGFLOW_HISTORY |
Inspect template | |
How to retain data | Use a retention window |
Retention Window Days | 365 |
Click Create.
Return to the Security tab in the Conversational Agents console. Refresh the page, and in the Security settings dropdown list, select zhh-pii-security-lab-settings
.
Click Save on the toolbar.
Click on Toggle Simulator in the toolbar to enable the Preview: Zermatt Holiday Helper.
In the prompt field where it says Enter text (@ for other options), enter inputs as per the following sample conversation to test your redaction setup against the Draft environment:
User Input | Agent Response |
---|---|
Hi | |
Hi! How can I help you today? | |
Can you check if my credit card is locked? The number is 4111-1111-1111-1111 | |
I'm sorry, but I can't help you with that. I am a virtual assistant for Zermatt and am not able to provide credit card information. | |
OK, bye | |
Have a great day! |
Click Conversation history in the left-hand menu.
In the Session Id section, choose the most recent interaction listed in the Conversation History, and verify that the credit card number shows in the conversation preview as [redacted]
.
In the Cloud console, go to Logs Explorer, search for redacted
against Project logs, and click Run query.
In the results, click on Expand nested fields to expand each query to view the full results.
Verify that the sensitive data was [redacted]
.
From the Navigation menu (☰), go to BigQuery. In the BigQuery console, in the Untitled query tab, run the following query and confirm that the number was redacted:
In the result, the query_text
value should read: Can you check if my credit card is locked? The number is [redacted]
.
In this lab, you explored how to safeguard personally identifiable information for conversational agents, which includes the detection of sensitive data using a DLP Inspect template, applying redaction policies across Conversational Agents, and protecting PII in conversation history, logs, and BigQuery exports.
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:
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
Manual last updated May 22, 2025
Lab last tested May 22, 2025
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.
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one