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.
Latihan ini adalah bagian dari kursus
Prompt Engineering with the OpenAI API
Petunjuk latihan
- Craft a prompt that summarizes the
product_descriptionin no more than five bullet points.
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
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)