In this article we show how the API can create a compelling, click-worthy subject line.

We will discuss four parts of this prompt:

  • Instruction

  • Examples with tags that define the input and output we want

  • Separators between sections

  • The Temperature parameter

Given the topic of an email, create a compelling, click-worthy subject line.

###

Topic: A set of awesome coupon deals

Subject: Coupon Deals That Make Us Proud (Unlike Our Nephew, Steve)

###

Topic: We're releasing a new clothing line worn by celebrities

Subject: What are your favorite celebrities wearing this season?

###

Topic: A new beauty product line release

Subject: Your beauty issues, solved

###

Topic: 30% off donuts

Subject: Celebrate National Donut Day in style!

Instruction

The instruction is the first line of the prompt: “Given the topic of an email, create a compelling, click-worthy subject line.” Language was chosen that best reflects the type of output we want. It’s a good practice to think about the words you are using to describe the task you want the API to perform. If a person would understand the instruction well, then it will be easier for the API to understand it.

Example

Three examples are provided, which convert the Topic to a one-line email Subject line. These examples are what the API will use as reference to generate new content. You can change these examples to better reflect the types of subject lines you would expect for your own marketing and advertising.

Separators

“###” was used to separate the instructions and examples. By repeating this pattern we can use it as a Stop Sequence as well.

Temperature

We want creative and interesting content, so we chose a high temperature of 0.85. This will cause the API to generate completions that incorporate more randomness. A much lower temperature may not be able to give us the same kind of exciting outputs. You can edit this value to see how the outputs change.

Open this example in the Playground and try this yourself by replacing “30% off donuts” with your own Topic.

Did this answer your question?