Prompt engineering or prompting is an AI (artificial intelligence) concept of how to talk to an AI system like ChatGPT and get a desired response. For example, instead of giving the AI a simple prompt like “define a computer,” you could add additional information to the prompt to get a better result. In other words, you could give a prompt like “define a computer in one paragraph as if I was five years old” and get more of a result of what you want.
Prompt engineering tips
Be specific as possible
Example: “Write a three paragraph rap about a computer in the style of Snoop Dogg.”
Being as specific as possible prevents the AI from having to guess what you want. Being specific means including some or all of the following.
- Topic - Exactly what you want.
- Length - How much or little of a response should be given.
- Style - If you want the response in a particular style or as if someone else was writing the response.
- Structure - How to form the response, e.g., in the form of a blog post, essay, song, joke, etc.
- Intent - If you’re pitching something or wanting a result, add it to the prompt.
Add an example to the prompt
Example: “Replace all names in the following text with [name]. For example, you would replace ’nathan’ with [name].”
Giving the AI an example of how one thing is done allows it to apply that same example to other instances.
Use known phrases to prompt
Many phrases can be added to a prompt to help give you answers you’ll find more useful. Below are example phrases that can be included in a prompt.
- Adding “Let’s think about this step by step” to a ChatGPT prompt breaks down each step in the response.
- Adding “in simple terms,” “easy to understand,” or “like I’m five” to a prompt can make the response easier to understand.
Repeat important keywords
Example: “Write a very very very basic explanation of networking.”
With some systems, repeating important keywords can give those keywords additional weight and help give you a more desired result.
Practice
It takes practice to understand all the techniques used to phrase your prompts. Keep the above tips in mind, practice creating your prompts, and try new ones.
AI, Artificial intelligence terms, ChatGPT, Engineer, GPT, Input, NLP, Prompt