Let’s cover the basics of writing effective AI prompts.
Prompt Engineering gets a bit more technical and takes the craft of prompt writing to another level.
Delimitate: Prompt structure impacts a model’s response. A helpful trick is to dilimitate, or use symbols that the model understands to separate parts of a prompt. For example, I can use 3 quote marks like this “”” to signal the start of a new portion. Here’s how:
You’re a tech sales rep. Summarize the top 5 topics from the following text as bullet points.
Text: “””
{{Add your text here}}
“””
Few-Shot Prompting: Few-shot prompting is when you give the model a few examples of what you want it to do. You show both the input (what the user asks for) and the output (how the model should respond to that type of ask). Then, you run the prompt you originally wanted to run. For example:
Task: Summarize the text in 1 sentence.
Text: """ In Ireland, September usually marks the beginning of the autumn season. The weather in September is generally mild, but it can be quite variable. Average high temperatures typically range from 15°C to 19°C (59°F to 66°F), while average lows generally range from 10°C to 12°C (50°F to 54°F).
September can still have some quite pleasant and warm days, especially in the early part of the month. However, rain is always a possibility in Ireland, and the frequency of rainy days tends to increase as the month progresses and the season shifts further into autumn.
Remember, the weather can vary year to year, so it's always a good idea to check a reliable weather forecast closer to your visit for the most accurate information."""
Response: September temps range from 50s to low 70s with few rainy days in the first half of the month.
Task: Summarize the text in 1 sentence.
Text """ {{Insert your text}}
"""
Response:
Iterative Prompting: If the first response from the model isn't what you want, you can adjust your prompt a little at a time. It’s important not to change too much about your prompt for a single iteration.