Sub topic 3
The Einstein Trust Layer in the request path
This chapter assumes you know what an Agentforce agent, a topic, and an action are, and that you have a general idea of how a large language model (LLM) works. You will see where the Einstein Trust Layer sits when an agent answers from retrieved content, and which of its controls affect grounded answers.
What the Trust Layer is
The Einstein Trust Layer is a set of controls that sits between Salesforce and the LLM. Your prompt does not go straight to the model. It passes through the layer on the way out, and the model's response passes back through it on the way in.
For grounded answers, this matters because the prompt now contains retrieved Knowledge excerpts and customer details. The layer helps protect that content before it reaches the model.
The request path
Retrieval happens before the Trust Layer. The retriever returns chunks, the prompt template inserts them, and only then does the assembled prompt go through the layer.
Controls that matter for grounding
| Control | What it does | Why it matters here |
|---|---|---|
| Data masking | Replaces sensitive values, such as names or emails, with placeholders before the call, then restores them in the response | Retrieved text or record fields may contain personal data |
| Zero data retention | The model provider agrees not to store prompts or responses or use them for training | Your Knowledge content is not kept by the provider |
| Toxicity detection | Scores the response for harmful content | Catches unsuitable output before the user sees it |
| Audit trail | Records the prompt, the response, and feedback | Lets you review what the model was given when an answer looks wrong |
Check your org's setup for which of these are enabled and how masking is configured. Masking applies to the patterns and fields you select, so it is not automatic for every value.
What the Trust Layer does not do
The layer does not decide whether an answer is true. If a retriever returns the wrong article, the model can still write a fluent, wrong reply, and the layer will pass it along if it is not toxic. Grounding quality depends on your content, index, retriever, and instructions, which later chapters cover.
Masking can also change what the model sees. If a placeholder replaces a product name or a customer name that the excerpt depends on, the answer may become vaguer. When an answer looks oddly generic, check the audit trail to see the masked prompt.
Common mistakes
- Assuming the Trust Layer checks answers against your articles. It does not.
- Assuming masking covers every sensitive value. It covers what is configured.
- Debugging a bad answer without looking at the assembled prompt in the audit trail.
Exercise
A grounded answer is fluent but cites the wrong policy. Which part of the request path is the likely cause, and why is the Trust Layer not the fix?
Show answer
The likely cause is retrieval or the instructions, for example a retriever returning an irrelevant chunk. The Trust Layer masks data, limits retention, and checks for toxicity. It does not verify that an answer matches your articles.
Exercise
Does retrieval happen before or after the prompt passes through the Trust Layer?
Show answer
Before. The retriever returns chunks, the prompt template inserts them, and the assembled prompt then goes through the Trust Layer to the LLM.