Cert++
Close

Action filters for business-rule gating

Key Takeaway

Instructions only guide the LLM, and the LLM can call any action that is available to it. To enforce a business rule that must never be bypassed, put a filter on the action, usually based on a variable you set when the rule's condition is met.

An action filter is a condition that decides whether the LLM can see an action or a subagent at all during a conversation. Filters exist because instructions to the LLM are not deterministic, so an LLM mistake or a persuasive customer could trigger a sensitive action. When your business rules are not met, a filter removes the action entirely, so the agent can't use it.

Why instructions can't enforce a rule

Filters are deterministic, but instructions that the LLM reads are not. Strict instructions alone leave an agent open to LLM mistakes or extra-convincing customers, so an insistent customer can talk the agent into breaking a rule.

The LLM can call any available reasoning action, even if your instructions never tell it to. A conditional statement in the reasoning instructions changes what the LLM is told, such as offering a bigger discount to one loyalty tier than to another. But a conditional statement only guides the LLM, so it doesn't stop the LLM from calling an action that is still available.

Salesforce recommends that you filter business-sensitive features and don't rely only on prompt engineering.

If a business rule must never be bypassed, such as an eligibility limit or a one-time-per-session restriction...

Put a filter on the action so the rule is enforced deterministically. Don't rely on reasoning instructions alone, because an insistent customer can talk the LLM past them.

If you only want to change what the LLM is told for different customers...

Use a conditional statement in the reasoning instructions.

Agentforce Specialist Study Guide

Checklist progress

0/204Learned

Given a use case, manage deterministic behavior for the agent using mechanisms like filters, variables, and template expressions.

0/8

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Agentforce Specialist studiers.