1. Learn
  2. /
  3. Courses
  4. /
  5. Working with the OpenAI API

Connected

Exercise

Text summarization

One really common use case for using OpenAI models is summarizing text. This has a ton of applications in business settings, including summarizing reports into concise one-pagers or a handful of bullet points, or extracting the next steps and timelines for different stakeholders.

In this exercise, you'll summarize a passage of text on financial investment (finance_text) into two concise bullet points using a chat completion model.

Instructions

100 XP
  • Use an f-string to insert finance_text into prompt.
  • Create a request, sending the prompt provided; use a maximum of 400 tokens.