Sub topic 3
Improving Actions and Action Descriptions
Assume you know Agentforce topics, actions, instructions, grounding, and basic rates. This chapter focuses on turning conversation evidence into targeted changes.
Improve Actions and Descriptions
An action is an operation an agent can perform, such as looking up an order or creating a case. Review whether the action description states:
- When the agent should use it.
- Which inputs it requires.
- What the result means.
- What the agent should do when the action fails.
A vague description can cause the agent to select the wrong action. Make the description specific and state exclusions.
Action: Look up order status
Use when the customer asks about tracking, delivery, or the status of an existing order.
Required input: confirmed order number.
Do not use for returns, refunds, or cancellations.
If no order is found, explain that and offer human assistance.Improve Grounding and Knowledge
Grounding supplies trusted information to the agent. Check whether the retrieved article, record, or field is current, relevant, and accessible to the agent. If the response contains an unsupported claim, improve the source or restrict the instruction to information the source provides.
Tune Escalation and Handoff
Define handoff conditions explicitly. Examples include an unsuccessful identity check, a missing record, a sensitive request, or repeated failed attempts. Specify what context passes to the human, such as the conversation summary, customer identifier, and failed action.
Build a Regression Test Set
A regression test is a repeatable check that confirms a later change did not break earlier behavior. Convert real failures into cases with an utterance, expected topic, action, and response behavior.
cases = [
{
"utterance": "I want to return these shoes",
"expected_topic": "Returns",
"expected_action": None,
}
]
result = {"topic": "Returns", "action": None}
case = cases[0]
assert result["topic"] == case["expected_topic"]
assert result["action"] == case["expected_action"]
print("Regression test passed")Release and Validate
Test the new version before activation. Compare resolution, escalation, feedback, and error rates with the previous version. Check both the target failure and nearby scenarios.
Privacy and Governance
Limit conversation access to authorized reviewers. Mask unnecessary personal data, record why a review occurred, and retain test cases only as long as policy allows. Do not copy sensitive customer details into prompts, tickets, or shared documents.
Run the Loop Routinely
Schedule reviews, track metric trends, update the regression set, and document each release. Revisit failures after deployment because customer language and business rules change.
Exercise
A lookup action is selected for a refund request. What should you inspect first?
Show answer
Inspect the action and topic descriptions. Narrow the lookup action's scope, state that refunds are excluded, and add a regression case for the request.