Appearance
Exercise 3: Power Agents with Unstructured Data
In this exercise, you'll create an action that enables your agent to answer resort policy questions using RAG and unstructured data.
Step 1: Create the agent custom action
From Setup, open Agent Actions.
Click New Agent Action, and configure the action as follows:
Field Value Reference Action Type Prompt Template Reference Action Policy Questions Agent Action Label Keep default Agent Action API Name Keep default Use the screenshot below to make sure that you entered the values correctly.
Click Next.
Enter the following Instructions for the the Question Input:
txtThe question is open-ended text input from a user in a chat, related to resort policies.
For the Prompt Response Output, check Show in conversation.
Use the screenshot below to make sure that you entered the values correctly.
Click Finish.
Step 2: Add the action to your agent
Next, let's add the custom action to your agent.
From Setup, open Agents (under Agent Studio).
Click on Agentforce (Default) in the agent list.
Click Open in Builder.
In the Topics sidebar, click the CustomerServiceAssistant topic.
Click New Instruction.
Enter the following instruction into the new instruction field:
txtAlways use the Policy Questions action when a question is asked about hotel policies, experiences policies, wedding policies, or valet service policies.
Click Save.
In the Topics sidebar, click the CustomerServiceAssistant topic.
Click the This Topic's Actions tab.
Click the + button to add an action.
Check the Policy Questions action and click Finish.
Step 3: Try it out
In the Conversation Preview panel, enter the following prompt:
txtWhat wedding venue options are available at Coral Cloud Resorts?
Examine the response generated by the LLM. Look at the planner in the middle of the screen and notice that the reasoning engine selected the Policy Questions action.