The best tricks to improve your prompts in Claude, two types of structure explained by the Claude team itself
Let’s tell you two structures to create better prompts in Claude, explained by the Anthropic team, creators of this artificial intelligence. They are very precise structures for this specific AI, although they will also work well in other alternatives such as ChatGPT , Gemini either Copilot inter alia. This is something more advanced than when we taught you how to improve Claude’s answers in a simple way. This is a lesson in good prompting practices using engineering engineering. promptsthe practice with which to improve the commands you give to applications LLM. Come on, these are tricks to learn how to communicate with an AI more effectively and shape its responses so that they are better, more reliable, and more tailored to the task you want it to perform. We are going to offer you two prompt structures. The first is a simple five step structure. It is perfect for relatively simple or slightly advanced tasks, and we are going to explain it to you in depth. Then there is a structure for much more sophisticated tasks that has ten steps, and in this case we are going to summarize it for you. Five-step structure of a good prompt The best way to communicate with artificial intelligence and with Claude in particular is to know the best structure for a good prompt. These structures are set up to make sure you give you all the information necessary for the AI to correctly understand what you are asking it to do. This is the best structure for a prompt according to Anthropic: One or two sentences to establish the role and description of the task you want me to do. Add dynamic content to contextualize Detailed task instructions Examples of what you want it to do (optional) Repeat critical instructions (especially when you write a very long prompt. 1. Describe the role and task to be performed As you can see, first of all you need to spend some time establishing the role of the AI, saying what role it should play. For example, telling you that you are a high school teacher, or an AI specialized in reviewing accident reporting forms. Along with the role of AI, it is also recommended describe the task to be performed. Come on, this is where you have to tell him what you want him to do by playing the role that you have indicated. These two elements should be the beginning of a good prompt. 2. Add dynamic content to contextualize After describing the task, it is helpful to provide content to better contextualize your task or the content you want me to work on. For example, if you want it to analyze a text, a photograph, or even a web link, you should add it after the description. This content can also be another element that you have obtained from an application, or even from an AI, whether it is a screenshot or something else. The main thing is that add what the AI needs to do what you asked it to do. You can attach several files, but then you will have to describe well what you want it to do with each one. 3. Detailed task instructions At the beginning of the prompt you have told it in summary what you want it to do, and then you have attached the content on which you want it to work. Now, after this introduction you will have to detail task instructions What do you want me to do? This fragment of text becomes the heart of the task you are programming. You will have to tell it what you want it to do precisely, just as if you were telling it to a person so that they understand it correctly without having to ask you anything else. If you have added several images or different types of content for context, you will also have to explain what you want it to do with each of the elements. 4. You can give him examples of what you want him to do When you do not give the AI any example of the result you want it to offer you, it is what is called a Zero-shot or “0 examples”. With this, you will blindly trust that the artificial intelligence model knows how to do the task. However, when you want to obtain very specific results or with a specific formatthen you should explain this with examples. You can use a single example or multiple examples. By doing this, the model will see the examples of the task already classified or solved, and will use that information to generate the new answers. keeping the same response format that you have indicated. The more examples you give, the more precise the answer format will be. This is optional, but in tasks that require a specific type of response it can be very useful. 5. Repeat critical instructions. You’ve started by describing the task, and then you’ve given him a thorough description of each step he must take. But if you’re asking it to do a very complex task with a particularly long prompt, it’s a good idea to at the end repeat the most critical instructions of the task you have asked him to do. This is the equivalent of underlining the most important and vital points of the instructions, something that you think is absolutely vital that you always keep in mind and not overlook it. Advanced prompt structure in 10 steps If the five-step structure isn’t enough for you, Claude’s creators also aim for a 10-step structure. It is like the first one we told you about, but more fragmented to give AI each and every detail what you will need. Each of these steps can be one or several paragraphs in the prompt that we are going to compose. You don’t have to do this every time, normally the previous structure is enough, but for particularly complex tasks can help you. … Read more