Simon Willison’s Weblog

How to play with the GPT-3 language model

I ran a Twitter poll the other day asking if people had tried GPT-3 and why or why not. The winning option, by quite a long way, was “No, I don’t know how to”. So here’s how to try it out, for free, without needing to write any code.

You don’t need to use the API to try out GPT-3

I think a big reason people have been put off trying out GPT-3 is that OpenAI market it as the OpenAI API. This sounds like something that’s going to require quite a bit of work to get started with.

But access to the API includes access to the GPT-3 playground, which is an interface that is incredibly easy to use. You get a text box, you type things in it, you press the “Execute” button. That’s all you need to know.

How to sign up

To try out GPT-3 for free you need three things: an email address, a phone number that can receive SMS messages and to be located in one of this list of supported countries and regions.

  1. Create an account at https://openai.com/join/—you can create an email/password address or you can sign up using your Google or Microsoft account
  2. Verify your email address (click the link in the email they send you)
  3. Enter your phone number and wait for their text
  4. Enter the code that they texted to you

New accounts get $18 of credit for the API, which expire after three months. Each query should cost single digit cents to execute, so you can do a lot of experimentation without needing to spend any money.

How to use the playground

Once you’ve activated your account, head straight to the Playground:

https://beta.openai.com/playground

The interface looks like this (it works great on mobile too):

A heading says Playground. There is a text area with "Write a tagline for an ice cream shop" in grey, and a green Submit button. A right hand panel includes some sliders and other options.

The only part of this interface that matters is the text box and the Submit button. The right hand panels can be used to control some settings but the default settings work extremely well—I’ve been playing with GPT-3 for months and 99% of my queries used those defaults.

Now you can just type stuff into the box and hit that “Submit” button.

Try this one to get you started:

Three reasons to start a succulent garden

The same interface. I have entered the prompt "Three reasons to start a succulunt garden". GPT-3 has replied, its output in the same text area but highlighted with a green background: "1. Succulents are low-maintenance: They don't require much watering or fertilizing, and they can tolerate a wide range of light conditions. 2. Succulents are drought-tolerant: They're perfect for areas that receive little rainfall or irrigation. 3. Succulents add interest and variety to the landscape: With their wide range of shapes, sizes, and colors, they can provide a unique and eye-catching addition to any garden."

Prompt engineering

The text that you entered there is called a “prompt”. Everything about working with GPT-3 is prompt engineering—trying different prompts, and iterating on specific prompts to see what kind of results you can get.

It’s a programming activity that actually feels a lot more like spellcasting. It’s almost impossible to reason about: I imagine even the creators of GPT-3 could not explain to you why certain prompts produce great results while others do not.

It’s also absurdly good fun.

Adding more to the generated text

GPT-3 will often let you hit the Submit button more than once—especially if the output to your question has the scope to keep growing in length—“Tell me an ongoing saga about a pelican fighting a cheesecake” for example.

Each additional click of “Submit” costs more credit.

You can also add your own text anywhere in the GPT-3 output, or at the end. You can use this to prompt for more output, or ask for clarification. I like saying “Now add a twist” to story prompts to see what it comes up with.

Further reading

This is How to play with the GPT-3 language model by Simon Willison, posted on 5th June 2022.

Next: Weeknotes: Datasette Cloud ready to preview

Previous: A Datasette tutorial written by GPT-3