Skip to content

Exercise 3 - Increase Agent Functionality

Step 1: Create a New Prompt Template

  1. At the top left of Agent Builder, click the Back arrow (not your browser back button) Image

    If you get a warning about changes not being saved, go ahead and click Leave anyway

  2. In the Quick Find box at the top left, search for Prompt and then click Prompt Builder. Image

  3. At the top-right, click the New Prompt Template. Image

  4. On the next screen, under Prompt Template Type, select Flex.

  5. For Prompt Template Name, enter “Dormant Mode Template”. The API Name will automatically generate when you leave the name field.

  6. Skip past Template Description and under Define Sources, enter the name Query. Again, the API Name should auto-populate.

  7. Under Source Type, select Free Text.

  8. Your settings should match the image below. If they do, click Next. Image

  9. Inside the Prompt Template Workspace, paste the following:

  10. Find the <Retriever< line and delete it while leaving your cursor there. Image

  11. Click into the Resource picker at the top right of this workspace Image

  12. Click Einstein Search and then select RagFileUDMOImage

  13. You should see multiple options here, but we’re going to select the one that contains File_Agentforce_Default in the name Image

  14. Notice how it was inserted into your existing prompt template Image

  15. Next, find the <Input< line and delete it while leaving your cursor there. Image

  16. Again, click into the Resource picker at the top right of this workspace Image

  17. Click Free Text, and then Query. Image

  18. Next, in the Configuration panel on the right side, locate Search Parameters and click the box under Search TextImage

  19. Click Free Text and then select Query. Image

  20. To the left of that panel, click the Test Inputs button

  21. In the Query field to the right, paste the following: ``` Our hotel is going to be making some renovations soon. How can I pause my services with IDeas?

  22. And now the moment of truth… click Save & Preview

  23. In the Preview pane at the bottom, you can see what was sent to the LLM (Resolution) and what was returned (Response) Image

  24. Now instead of saying “I don’t have enough information to provide an answer”, your Agent is able to inform customers about Dormant Mode.

  25. Finally, we need to click Activate at the top right Image

Additional Info

Image

Step 2: Creating a New Agent Action

  1. Now that we’ve created a new Prompt Template, we have to tie it to an action our Agent can take. Click the back button from Prompt Builder (not the browser back button). Image

  2. In the Quick Find search box at the top left, type Assets and then click Agentforce Agent Assets. Image

  3. When the page loads, you’ll be presented with the list of Topics that have been preconfigured. Next to the Topics tab, click the Actions tab. Image

  4. Now you should see a + New Agent Action button at the top right. Click that button. Image

  5. Under Reference Action Type, select Prompt Template, and then for Reference Action, select Dormant Mode Prompt. Image

  6. Click Next.

  7. On the next screen, copy this into the Agent Action Instructions field:

  8. Uncheck the Show loading text for this action checkbox NOTE: You can keep this checked and enter text like “Finding your answer…” or something equivalent.

  9. Scrolling down, you’ll see the Input section in the left panel. Find the Instructions box inside the Query pane and paste the following:

  10. Check the box for Collect data from user from within the Query pane.

  11. On the right side, under Outputs, check the Show in conversation box for the Prompt Response only. Image

  12. If everything matches the image above, click Finish.

This concludes Exercise 3.

Released under the MIT License.