Writing effective prompts (prompters) is an important skill in the age of AI. Whether it is for AI to generate text, images, or obtain accurate information, a great prompter can dramatically improve the quality and relevance of AI output. In this article, we will analyze how to write an effective prompt and provide practical tips based on the example "The Anatomy of an o1 Prompt".
1. Goal setting
First, you need to clearly express your goal, i.e., what task you want the AI to accomplish. For example, in the example, the user's goal is:
"I'd like a list of the best medium-length hikes within a two-hour drive from San Francisco."
How can it be improved?
- Objectives should be clear and specific. For example, not only is the "best hiking route" required, but the distance, difficulty and desired characteristics (e.g., "unique, cooler") are also stated.
- Avoid vague terms such as "fun" and "nice" and use quantifiable or descriptive terms such as "scenic, challenging, cold".
2. Specifying the return format (Return Format)
The AI needs to know exactly how to organize and return information. In the example, the user explicitly asks the AI to return the following:
"Please provide the name, starting address, ending address, distance, drive time, length of hike, and what makes each hike unique."
How can it be improved?
- Specify the structure of the data that the AI needs to return, for example as a list, table, or JSON.
- Specify data units such as kilometers/miles, minutes/hours to ensure consistency.
- Set the number of entries to return, e.g. "Return the top 3 best routes".
3. Avoiding mistakes in advance (Warnings)
AI may make mistakes, such as providing non-existent locations or inaccurate information. Therefore, warnings have been added to the examples:
"Please make sure the route name is correct, that it is real, and that the time information is accurate."
How can it be improved?
- Provide data validation requirements, e.g., "Please use only routes that can be verified on AllTrails."
- Have the AI cross-check, e.g., "Make sure that the information returned can be found on two different websites."
4. Provision of contextual information (Context Dump)
The more the AI knows about your needs, the more accurate the results will be. The user in the example provides detailed background information:
- They hike a lot. They want something new.(Avoid recommending routes that are too common).
- They recently did the Mount Tam hike.(Reduce duplicate referrals).
- They like to have food to celebrate at the end of the hike(Can recommend routes close to restaurants).
- They won't be seeing each other anytime soon, so I hope this experience is special.(Emphasis on "uniqueness").
How can it be improved?
- Provide useful preference information, such as "I like the Coastal Route" or "I prefer the Forest Trail."
- Specify restrictions, such as "no more than a 2-hour drive" or "must be suitable for fall hiking".
- Describe existing experience to avoid AI recommending options that are too basic or repetitive.
5. Example: optimized hiking trail cue words
Combining these elements, an improved cue word could be:
🔹 Objective:
Please recommend me the 3 best medium length hikes, subject to the following criteria:
- Within 2 hours of San Francisco
- Unique experience required (e.g., beauty, history, geological features)
- Try to choose a cold or non-mainstream route
🔹 Return Format:
Please return the data in the following format:
- Route name (same as on AllTrails)
- Starting point address
- destination address
- Total distance (kilometers/miles)
- Travel time (minutes/hours)
- Length of walk (minutes/hours)
- Uniqueness (e.g., landscape, culture, history, etc.)
🔹 Error control:
- Ensure that all routes are authentic and verifiable on AllTrails or official hiking websites
- Ensure accurate hiking and driving times
🔹 Additional background information:
- My girlfriend and I hike a lot and have been on most of the popular trails in San Francisco
- I've hiked Mount Tam recently, so I'm hoping to try a different style of trail this time.
- Prefer coastal trails or routes with specialty dining at the end of the trail
- This hike is important because we won't be seeing each other again anytime soon and want the experience to be unique and memorable!
summarize
A great cue should have the following 4 key elements:
✅ clear objectives: Tell the AI what you want and be as specific as possible
✅ Standardized return formats: Ensure that AI organizes data the way you expect it to be organized
✅ Tips for avoiding mistakes: Preventing AI from Providing False or Inaccurate Information
✅ Valuable background information: help AI personalize recommendations and improve the relevance of results
Armed with these tips, you'll be able to compose efficient, accurate cues that make the AI's response more tailored to your needs! 🚀