Prompt engineering is the process of structuring sentences so that these can be interpreted and understood by a generative AI model in such a way that its output is in accord with the user’s intentions.
A prompt can be a simple description of a desired output, such as “write a limerick about chickens,” or it can be more complex, such as “generate a high-quality photo of an astronaut riding a horse.”
Mastering Prompt Engineering is necessary to use ChatGPT effectively
Good vs Bad Prompt
Good prompt: Write a poem about a cat who loves to play with yarn.
This prompt is specific enough to give the model a clear idea of what is desired, but it is also flexible enough to allow the model to generate creative variations. For example, the poem could be about a kitten who is just learning to play with yarn, or it could be about an old cat who still loves to play even though she is getting older.
Bad prompt: Write a poem about a cat.
This prompt is too vague. The model will not know what the poem should be about, or what kind of tone it should have. The output from the model will likely be inconsistent and of poor quality.
What is a Prompt Engineer?
A prompt engineer is a person who specializes in crafting prompts for generative AI models. Prompts are the instructions that tell the model what to generate.
A prompt engineer needs to have a deep understanding of how generative AI models work, as well as the ability to think creatively and strategically.
Tips for Good Prompts
- Be specific. The more specific you are, the better the model will be able to understand what you want.
- Be flexible. Don't be afraid to let the model take some creative liberties.
- Use keywords. Identify the key words that are important to the prompt.
- Use examples. If you can, provide examples of the kind of output you are looking for.
- Use negative keywords. If there are things you don't want the model to generate, specify them.