Comment on page
Prompt Building 101
Prompts are everything. With a prompt you are telling the AI what to do, and you are also providing it examples of what you expect it to output. There are a few tricks to understand when building prompts. Here we will go over some of the most important.
- 1.When setting up a new prompt. Think very clearly about what you want the AI to produce. Be descriptive and to the point on this. If you want it to create a product description for a clothing brand, you might want to write 'Write a product description for a clothing brand' as the first line for your prompt but you can improve this massively by going into a bit more detail. This would get you better outputs; 'Write an exciting product description for a clothing ecommerce brand which focuses on women's clothing for the ages 18-30'. The added detail will make a better output.
- 2.Think about your inputs. Inputs are important as it gives the AI the context of what is needed when producing the output. The AI will produce some magical content but it isn't a mind reader. It needs information to base the output off. If we carry on with the same theme as above, you could just have the item title in your prompt like Title: Frilly Black Dress and hit generate. The AI will write something but it won't know enough details for any accuracy so you may want to add a second input with descriptive details where you can put information on the length, the fit, the style etc which gives the AI better background to work with.
- 3.Keep the pattern with the stop sequences. Generally, most people building prompts with AI will be familiar with the default of ### which is not a bad thing to use. Between each set of inputs, put a ### and also between the outputs. You could really use anything for your stop sequences but following this pattern will help to standardize your creations and make your prompt building faster.
- 4.Examples are key to everything. After your initial instructions at the top of your prompt and you have then decided on your inputs, you can then build out some examples. This can very much impact the quality of what comes out of the AI. We'd recommend anywhere from 2-10 examples based on the length of the output desired and the type of content you are trying to create.
- 5.Set your maximum tokens correctly. The easiest way to do this is to do a character count on the examples you have given in your example. Take the example with the highest character count and then divide this by 4. That is the value that you want for your token amount. Based on if it is a large number or not, you might want to add on 10 or 20 just for any issues but that will be roughly correct.