Purple Growth
Purple Prompts
Prompt Writing Best Practices
9 min
purple prompts summary writing good prompts for language models like chatgpt is an art form and a still evolving area of research while there are some good practices to follow, we highly recommend experimenting with different ways to phrase your prompts to optimise the results you are getting some general tips imperative instructions instead of kindly asking for a favour in a conversationalist tone, giving clear and short instructions often produces better output instead of can you please summarise this article? simply write summarise the following article context it can help the language model to know in what setting it is being executed this can be a single sentence at the beginning of the prompt, like your job is to help an editor finish a new article or you are responsible for proofreading and fact checking online articles before they get published language if you want the generated output to not be in english, but in a different language (e g german), you should write your prompts in that language as well adding a simple language hint at the beginning of the prompt, like (deutsch) , is often enough preventing hallucinations a "hallucination" happens when the language model generates text that sounds reasonable and fitting, but which contains false claims and invented facts this is an inherent challenge with all language models, as there is currently no feasible way of automatically fact checking their output, and their task is only to produce text that sounds plausible there are, however, some proven ways to reduce the chance of hallucinations especially in the scenario of rewriting articles docid\ vdlzy5nwvpecu3lrb1xkg (e g summarisation), we can ask the model to stick to the source it was given and not invent any other facts some phrases that might work for this are make sure that your summary is consistent with the text and does not contradict it or verify that all your claims are supported by the original text reducing the temperature for a prompt can also reduce hallucinations, as the model sticks to the more likely and thus more likely to be true phrases temperature this setting controls the "creativity" of the model a higher temperature results in more diverse and creative output, while a lower temperature makes the output more deterministic and focused (read more here , or dive into technical details here ) if a bit of creativity and out of the box thinking is desired, this value should be set to something high like 0 7 1 this way, re generating the text should also give very differing answers, and it can work quite well to simply generate a few ones and be inspired by the model common use cases are title generation, meta description generation, or creative article rewriting tasks like converting a bullet point list to a full article if on the other hand the task is rather straightforward, less creativity is needed, and/or the model should stick more closely to the given text and re use existing phrases, the temperature should be set to a lower value like 0 0 5 beware that re generating a response with a low (or even zero) temperature might produce the same results again, and you thus cannot generate different variants common use cases are summarization / shortening of existing articles or excerpt generation output format for prompts that fill specific metadata, like title, excerpt, yoast "seo title", acf fields, etc , the whole response of the language model will be redirected into that field it is thus important to use the correct wording in the prompt to get the desired output format instead of set the title field to a summary of the article , ask the ai to directly answer (only) with the desired value, like give me a title that represents a summary of the article for any prompt that is used in modifying/rewriting the article, especially if the task only affects some specific content blocks, make sure to ask the ai to still answer with the whole updated article content as here again, the whole ai response will be taken as is to replace the current article content so instead of asking generate a catchy subheading for this article , try formulating it more like this update the article content with a subheading respond with the whole article content, even all unchanged blocks, but fill the existing 'subheading' block with a catchy phrasing special case wysiwyg blocks if the hub is set up this way, there are some wysiwyg blocks for making working in the editor more intuitive this includes the "purple excerpt" block as well as "purple acf block" blocks they allow users to edit the article excerpt or acf fields as if it were blocks in the editor beware, tough, that in the underlying data models these blocks are empty, and are only placeholders where the user can see and modify these values, while the purple prompts ai still needs to operate on the original values directly so you should not, in your prompt, ask the ai to read the value of the excerpt block or copy the text from the xyz acf block , since there is no value in these blocks instead, ask for these properties directly, like read the excerpt or copy the xyc acf field similarly, the ai also cannot write into these blocks so instead of having a prompt of type "rewrite article" where you ask to write xyz into the excerpt/acf block , make a dedicated prompt with "use as" set to "generate excerpt" or "generate acf field" example prompts shorten article summarize the following online article so that it is only half as long as before important information should be retained as much as possible however, the total number of words should be half the size use as rewrite article temperature 0 4 creative title create a crazy title for the following online article make it sound a bit like clickbait, be sensational, draw the users attention, be creative! use as generate title temperature 0 9 copy custom block content to acf field give me the content of the block wp\ ppi/printheading, without any additional output answer with only exactly the content of that block (stripped of formatting, if any) use as acf field temperature 0 1 copy excerpt into custom block copy the text of the article excerpt into the existing wp\ acf/summary block do not create any new content only edit this one block, reproducing all other blocks in your answer without changes use as rewrite article temperature 0 1 further reading openai prompt engineering best practices https //help openai com/en/articles/6654000 best practices for prompt engineering with openai api a collection of example prompts useful for journalists (in german) https //www journalist de/startseite/detail/article/101 prompts fuer die bessere seite eins general tips for talking to language models https //www zdnet com/article/how to write better chatgpt prompts/