Description Transcript
Want to write better system instructions for your Retool Agents? Let ChatGPT and Claude do the heavy lifting! This video shows you how to craft prompts that generate high-quality agent instructions using the two core principles of effective prompting: clarity and specificity.
Key Strategies Covered:
00:00 - Clarity vs Specificity: Clear language and detailed context for better outputs
00:45 - Role Assignment: Making the LLM an expert technical writer for agents
01:12 - Requirement Setting: Using our agent framework to guide the LLM
01:42 - Example Provision: Leveraging Retool's agent templates as references
02:23 - Task Formatting: Breaking down complex instructions into manageable steps
02:54- Tone & Audience: Tailoring output for agent consumption
03:49 - Affirmations: Using "do" and "don't" for clear direction
04:00 - Interactive Refinement: Letting the model ask clarifying questions
05:06 - Iterative Improvement: Correcting specific parts without starting over
05:34 - Multi-LLM Testing: Shopping prompts across different models
Useful Resources:
Read more 0:02 Creating a prompt with an LLM. It is 0:05 better to be long-winded to make the 0:07 point sufficiently clear to the agent. 0:08 Here's an example. When will it rain 0:11 versus will it be raining this upcoming 0:13 weekend in Nearest Fall? See the 0:15 difference. Specificity, on the other 0:18 hand, is more about requesting context. 0:21 Tell the agent as much information as it 0:23 needs to know in order to answer that 0:25 question. Here's an example of that. 0:27 Generate 10 ideas for an AI campaign 0:30 versus generate a list of 10 ideas for 0:33 an AI campaign. Pitch each idea with a 0:35 slogan, target audience, and a timeline 0:38 of execution. All of these ideas should 0:40 relate to agents. Here are a few other 0:43 guidelines that can improve your 0:44 prompting skills. First thing that 0:46 you're going to do is assign a role to 0:47 the model. For that reason, whichever 0:49 one you want, Chad or Claude, it needs 0:52 to understand who they are in this 0:54 context. So give them a persona of a 0:56 technical writer that knows how to build 0:58 agents or software engineer. It's 1:00 important that the model has a persona 1:02 so that way the responses, engagement, 1:04 interactions can all be contextually 1:05 appropriate. In this case, I'm going to 1:08 just write you're a technical writer 1:09 with the knowledge on how to build 1:11 agents. Right? The second one is going 1:13 to be about clearly stating the 1:14 requirements. So take the earlier part 1:16 of the video where I'm basically 1:18 breaking down what it needs to have in 1:20 order to write a good system 1:22 instructions. And that means like you 1:24 know the error handling, the personas, 1:26 the sub goals, the step by step and just 1:30 put that as the second part. Remember 1:32 this is a collaboration. So if you know 1:34 how to make a good one, they need to 1:36 know how to make a good, right? Okay, 1:38 here you go. Um, 1:41 now the third one is going to be 1:43 providing an example. The great thing 1:45 about this is that if you go into your 1:47 retool space, I'm going to go to mine 1:49 and then you click into agents tab in 1:52 the top right corner, it's going to say 1:54 plus agent. You click in there, there's 1:56 a bunch of examples that you can use. So 1:58 they're templates that are of successful 2:00 working agents. In my case, I'm going to 2:02 take the meeting prep. I'm going to 2:04 create 2:06 and I'm just literally going to copy 2:08 these instructions. You can use either 2:09 one of these, right? Um, and I'm going 2:12 to go in here and say here is an example 2:17 of a working irritant and tool. Okay, I 2:21 pasted it in. Okay, fourth one. You got 2:24 to format and break down the task. So, 2:27 the same way that we're able to read 2:29 with spaces and not all have it all 2:31 together, it is also important to have 2:33 all these separations so the LLM has an 2:36 easier time reading all this. uh makes 2:38 it easier for you, makes it easier for 2:40 them, and as less prone to errors 2:42 because you have to go back and like 2:43 actually check your work and see where 2:46 some mishap might have happened. That 2:47 way, it makes it easier for you to keep 2:49 improving the next prompts. It's not 2:51 just going to be perfect from the get- 2:52 go. The fifth one, set the tone and tell 2:56 this audience. So, this is really 2:58 important because you got to tell it 3:00 like who is this being delivered to, 3:02 right? Is it being delivered to another 3:03 agent? Then write it specifically for 3:05 that agent. If it's not, then do you 3:08 need it to be like developer friendly? 3:09 Do you need it to be like more data 3:11 science friendly? Well, like who is your 3:13 final audience that the agent is going 3:16 to convey all this voice from? So, what 3:18 I'm going to do in this case is I'm 3:20 going to now state what the agent must 3:22 be able to do. So, I've written it out. 3:25 I want an agent that connects to a sauna 3:27 and pulls data across multiple projects 3:29 every week and analyzes task and 3:32 analyzes due dates the activities but to 3:35 flag items as completed in progress or 3:37 at risk. Right? And there's a bunch more 3:39 instructions about like telling you like 3:41 hey this is built for retail agents and 3:44 the output is going to be for the agents 3:46 to read and to execute. 3:48 Now the next one that I would recommend 3:50 is to include affirmations. So say do 3:52 this or don't do that. Right? Um it 3:55 gives it more clear direction and a more 3:58 desired output with that same one. You 4:00 might have seen it already is the 4:02 inclusion of just even just one sentence 4:04 that tells your model to ask questions. 4:07 Just as simple as that. So I've written 4:09 as whenever unsure how to proceed or if 4:11 you want more clarification, ask 4:13 questions before continuing with your 4:15 reasoning. This would actually be a 4:16 great time to just put a spacing since 4:18 it's almost like a uh like an asterisk 4:21 to the whole interaction. Go ahead and 4:23 click it. Send it over. see what system 4:25 prompt am I create and then here are 4:28 some quick clarifications that I need to 4:30 ask. That's why it's important to have 4:31 that part of the question. Um I can 4:34 answer all these and then we can 4:36 proceed. 4:43 Okay, amazing. We're just now getting 4:45 results about like how to actually write 4:47 and you can see it's actually kind of 4:48 similar to the example that was 4:50 previously provided even the way that it 4:52 is formatted and everything which is 4:54 super cool. Um and all this you can take 4:58 now and then put it into your agent 5:00 itself and then start building the 5:01 tools. Uh if you see anything that you 5:04 want to improve, this is where you would 5:07 correct and change specific parts of the 5:09 output. So this is number eight and 5:11 again it's a collaborative process. So 5:13 you need it to tell you like how it 5:16 thinks that the instructions should be 5:17 written. You should read through them, 5:19 be thorough with them and then give be 5:21 like that part was great like processing 5:23 flow. This is really great. I like that. 5:25 Uh I think this part of the available 5:28 tools can just be as simple as like a 5:30 name of tool and then also brief 5:32 description. So I have to go back and 5:33 forth, right? And the last one is test 5:35 different LLM and props. It is really 5:38 important to not only just rely on one 5:41 single model, but try out different 5:42 models because each of them has their 5:44 strength and their weaknesses. So, see 5:46 how each of them are either more 5:48 creative or more practical and see which 5:50 one fits your style best. Um, I'll 5:53 invite you to go check out these 5:54 templates since you already have created 5:56 that. Um, and then the cool thing is 5:58 that you can chat with them. There's 6:00 many ones like for example, there's an 6:01 automated chargeback fighter. From 6:03 there, you can see like the tools, you 6:05 can see how it was made. And I would 6:07 just say like go deploy, go make and 6:09 have fun with this, you know. If you 6:10 have any questions, comment down below 6:12 and I'll see you next time. 6:16 [Music] 6:17 [Applause]