Sub topic 10
The Einstein Trust Layer and safe responses
This chapter assumes you know how topics, instructions, and actions work, and that you understand grounding with CRM data and knowledge. It covers what happens to a prompt between your agent and the large language model (LLM), and what you still have to configure yourself.
What the Trust Layer is
The Einstein Trust Layer is a set of controls that sits between Agentforce and the LLM. Service agents and employee agents both use it. The agent's reasoning engine builds a prompt from the topic, the instructions, the conversation, and grounding data. The Trust Layer processes that prompt before it leaves Salesforce, and it checks the model's reply before the user sees it.
The path of a request
The main controls
| Control | What it does |
|---|---|
| Secure data retrieval | Pulls CRM data using the permissions of the identity the agent runs as, so grounding never returns records that identity cannot see. |
| Dynamic grounding | Adds relevant record and knowledge content to the prompt at run time. |
| Data masking | Replaces sensitive values, such as names, emails, and phone numbers, with placeholders before the prompt goes to the model. |
| Prompt defense | Adds guardrail instructions that reduce the chance of the model following injected or off-topic instructions. |
| Zero data retention | Salesforce agrees with supported model providers that they do not store prompts or responses or use them for training. |
| Toxicity detection | Scores the model's output for harmful content. |
| Audit trail | Records prompts, responses, and feedback so you can review behavior later. |
Masking in practice
Suppose a customer writes: "Hi, I'm Dana Reyes, and my order 10482 is late." Masking swaps the detected name for a placeholder before the model sees it:
Prompt sent to the LLM:
"Hi, I'm {PERSON_1}, and my order 10482 is late."
Model reply:
"Hello {PERSON_1}, I'm sorry your order is late."
Reply shown to the customer, after unmasking:
"Hello Dana Reyes, I'm sorry your order is late."The model can still write a natural reply, and the real name stays inside Salesforce. Masking covers the data types the feature detects, so it is not a guarantee that nothing sensitive is ever sent. Free-text fields can contain values that the detectors miss.
What the Trust Layer does not do
- It does not replace access control. If the agent user or running user can read a record, grounding can use it. Limit permissions first, as described in the identity chapter.
- It does not make instructions enforceable. A topic that says "do not discuss refunds" is guidance to the model. Put hard rules in actions, Flow, or Apex.
- It does not guarantee the answer is correct. Grounding improves accuracy, but you still test for wrong or unsupported answers.
Common errors
- Assuming masking covers everything. Review which fields you ground on and avoid sending data the agent does not need.
- Over-broad agent permissions. A service agent whose agent user can read every Order will use that access when asked.
- Skipping the audit trail. Without review, you will not see repeated refusals, odd replies, or injection attempts.
- Treating toxicity detection as a content policy. It flags harmful output. It does not check that the reply matches your brand or your business rules.
Exercise
A service agent grounds its replies on Case records. A tester finds that the agent can describe cases the customer does not own. Does the Trust Layer's data masking fix this? What should you change?
Show answer
No. Masking hides sensitive values in the prompt, but it does not decide which records are retrieved. Secure data retrieval uses the agent user's permissions, so the agent user can read too many cases. Narrow the agent user's permission set and sharing access, and make the action filter by the verified customer. Then retest.