Product features summarization
An electronics review website wants to provide concise and easy-to-read summaries of product features for its readers, allowing them to compare and evaluate different products quickly. The review website wants to generate bullet-point summaries, and, to start with, they want you to craft a prompt that summarizes a product_description
for a smartphone.
The OpenAI
package, the product_description
, and the get_response()
function have been pre-loaded for you.
This exercise is part of the course
Prompt Engineering with the OpenAI API
Exercise instructions
- Craft a prompt that summarizes the
product_description
in no more than five bullet points.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
client = OpenAI(api_key="")
# Craft a prompt to summarize the product description
prompt = ____
response = get_response(prompt)
print("Original description: \n", product_description)
print("Summarized description: \n", response)