Multi-step prompt to plan a trip
You noticed that the single-step prompt was not effective, because the answer was too vague for what you had in mind. You improve your prompt by specifying the steps to follow for planning. The plan should have four potential locations for your beach vacation, and each location should have some accommodation options, some activities, and an evaluation of the pros and cons.
The OpenAI
package and the get_response()
function have been pre-loaded for you.
The get_response()
function in this exercise employs the max_tokens
parameter to help this exercise run faster. This may truncate your solution.
This exercise is part of the course
Prompt Engineering with the OpenAI API
Exercise instructions
- Create a multi-step
prompt
asking the model to make a plan for a beach vacation, which should include: four potential locations, each with some accommodation options, some activities, and an evaluation of the pros and cons.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
client = OpenAI(api_key="")
# Create a prompt detailing steps to plan the trip
prompt = """____"""
response = get_response(prompt)
print(response)