Writing improvement
A popular online community relies on user-generated content to thrive. Users frequently contribute reviews, articles, and comments, but the quality of these contributions varies. To elevate the overall experience for its members, the community aims to enhance user-generated texts. This includes fixing grammar errors and refining writing tones to create a more polished and engaging environment for all users. Your task is to build a multi-step prompt that proofreads and adjusts the tone of a given text.
The OpenAI package, the text string to operate on, and the get_response() function have been pre-loaded for you.
Deze oefening maakt deel uit van de cursus
Prompt Engineering with the OpenAI API
Oefeninstructies
- Craft a multi-step prompt that first proofreads the text without changing its structure, and then adjusts its tone to be formal and friendly.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
client = OpenAI(api_key="")
# Craft a prompt to transform the text
prompt = ____
response = get_response(prompt)
print("Before transformation:\n", text)
print("After transformation:\n", response)