本文是《Agentforce 信任层中的大语言模型数据掩码》的练习操作步骤。阅读原文请见:Agentforce 信任层中的大语言模型数据掩码。
1. Sign Up for a Custom Playground
- Click Create Playground.
- Your new org is automatically attached to your Trailhead account.
- Note the org's expiration date and complete the badge before then.
2. Enable Einstein Generative AI
- Launch your Data 360 and Salesforce playground.
- Click the gear icon and select Setup.
- In Quick Find, search for and select Einstein Setup.
- Ensure Turn on Einstein is set to On.
- Click Go to Einstein Trust Layer (refresh the screen if you don't see the settings).
3. Turn On LLM Data Masking
- If Large Language Model Data Masking isn't already turned on, use the toggle to turn it on.
- Review the default masked data types: Name, Email Address, Phone Number, Credit Card, and United States Social Security Numbers (US SSN).
4. Enable Sales Emails
- In Quick Find, search
Einstein for Salesand click Einstein for Sales. - Toggle Turn on Sales Emails to Enabled (deployment can take up to 10 minutes — proceed without waiting).
5. Create an Email Prompt Template
- In the Einstein Generative AI menu, click Prompt Builder (refresh if the menu isn't visible).
- Click New Prompt Template.
- Set Prompt Template Type to Sales Email (refresh if it isn't listed).
- Enter Prompt Template Name:
Verification Email(API NameVerification_Email). - Enter Description:
Verify contact information. - Accept the defaults (Recipient Contact, Related Object blank) and click Next.
6. Verify Data Masking
- Copy and paste the prompt text below into the Prompt Template Workspace.
- In Preview Settings > Inputs, type
Andyand select Andy Young. - Click Save & Preview.
- Review the Resolved Prompt tab — it shows the prompt WITH placeholders (this is exactly what gets sent to the LLM).
- Review the Generated Response tab — it shows the response with the data demasked back to real values.
- In the Generated Response tab, click the shield icon to view the data masking details.
- Confirm the credit card number, email address, names, both phone numbers, and SSN are masked; note the company name is NOT masked.
- Click OK to close the window.
Prompt Text
You are a Sales associate at Coral Cloud Resorts. Write a professional email
to a new contact to verify their contact information on file. Address the
contact by their first name and include the following information as bullet
points:
- Company Name: Dickenson PLC
- Business Phone Number: (785) 241-6200
- Mobile Phone Number: (785) 265-5350
- Email: a_young@dickenson.com
- SSN: 243930486
- Credit Card on file: 378282246310005
Use clear and straightforward language, and end the email by asking the
contact to call Coral Cloud Resorts to verify the information on file.
This prompt includes sample PII and PCI data (credit card and SSN in plain text) purely to demonstrate how data masking protects your data — it is not an acceptable practice for production prompts.
7. Update LLM Data Masking Settings
- Click the gear icon and select Setup.
- In Quick Find, search
Einstein. - Expand the Einstein Generative AI menu in the left pane and click Einstein Setup.
- Click Go to Einstein Trust Layer.
- Under Sensitive Data, turn on masking for Company Name.
8. Verify Data Masking for Company Name
- Return to the Verification Email prompt template in Prompt Builder.
- In Preview Settings, type
Andyand select Andy Young. - Click Preview (it can take a couple of minutes for the masking updates to take effect).
- Click the shield icon in the Generated Response tab — company names are now masked.
- Click OK to close the window.
9. Verify Invalid Credit Card Number Is Not Masked
- In the Verification Email prompt template, change the credit card number from
378282246310005to333312312312312. - Click Save & Preview.
- Click the shield icon in the Generated Response tab — the modified credit card number is no longer masked.
- Click OK to close the window.