0:02 Building effective retail agents 0:04 requires matching the ideal design with 0:06 an identifiable use case so we can 0:08 ensure that they operate safely. My name 0:10 is Angelique Glaw Torres. I'm a 0:12 developer advocate here at Retool and 0:14 today I'll be giving you some guides on 0:16 how to get the best performance out of 0:18 your agents through instructions and 0:20 prompting. How to instruct an agent. 0:23 First, give the agent purpose. It 0:25 requires context to understand how is it 0:28 supposed to operate and what role this 0:30 is supposed to play. Avoid open-ended 0:33 roles. I would say think of them more of 0:36 like specialist rather than generalist. 0:38 So if I were to build a tightly scope 0:40 agent that is an expense report auditor 0:44 that would be 10 times easier to build 0:46 and at the same time more predictable 0:48 with this behavior rather than just a 0:50 finance assistance that knows no 0:52 boundaries. Break down complex 0:54 objectives into smaller steps or sub 0:57 goals. Be specific about breaking down 1:00 complex task into actionable steps. 1:03 Knowing the essentials and what the end 1:05 results are, it makes the agent more 1:08 efficient. This is where you really need 1:09 to start introducing some constraints. 1:12 Example, translate the text and then 1:15 email the translation to the user's 1:17 address using the email tool. If the 1:20 text is over 100 words, summarize 1:22 instead due to email length. This is 1:25 specific to the steps that the agent 1:27 must follow. It is goal oriented above 1:29 all. It knows how to evaluate its own 1:32 based on validation criteria and 1:34 understanding its limits. Make the 1:37 prompt goal oriented rather than step by 1:39 step. So, we're building on the last 1:41 one. We said break it down to smaller 1:43 steps, but you don't have to be so 1:44 detailed with all of the specific 1:46 actions. You don't have to say like 1:48 first X then Y then C. Instead, you can 1:51 write it like find the necessary 1:53 information then do X. It uses the 1:56 agents reasoning ability while also 1:58 understanding the end goal. So use that. 2:01 Define success criteria for agents. How 2:04 do you know you've done a job well? For 2:06 instance, an agent sending an email 2:08 might look at success as no to minimal 2:11 editing. Clear success criteria help in 2:14 design and evaluation. You can 2:16 operationalize your success criteria by 2:19 building evals. Provide context or 2:22 samples. If the agent's final output has 2:25 a specific format or style, then provide 2:27 examples within the same prompt. For 2:29 instance, draft the respond in a 2:32 friendly tone. Example provided. Hi, 2:35 insert name. Thanks for reaching out. 2:37 This will really help out with changing 2:39 the final output of the agent. List the 2:42 available tools clearly. Retail agents 2:44 allows you to define tools like queries, 2:47 APIs, and functions. Ensure the agent 2:50 understands what they're supposed to do 2:52 through a brief description. I 2:54 personally like to have a whole section 2:55 dedicated to just listing out all the 2:57 tools that I'm going to give it access 2:59 to later on. And then I have the tool 3:02 name and also the description. So, for 3:03 example, calendar tools and I would say 3:06 return calendar availabilities within a 3:08 date range. In the retool interface, you 3:11 also have a brief description for each 3:13 of the tools. Fill this in meaningfully. 3:16 Include error handling. Tell the agent 3:18 what to do when an error occurs or 3:20 unexpected situation happens. We'll be 3:23 going more in depth about this in 3:24 another video. Now, ultimately, how you 3:27 write your prompt is really up to you, 3:28 but I would say try it out in many 3:30 different ways. Do task specific, 3:32 context rich, or rope based. If you want 3:35 to learn more about the difference 3:37 between all these types, I would say go 3:39 check out our docs page. 3:43 [Music] 3:44 [Applause]