# What can you build with the GPT-3 API?

Date: 2020-11-23 · Author: Robert Scales · https://guidetoartificialintelligence.com/en/learn/build-gpt-3-api/

**Answer:** With the GPT-3 API you can build almost any tool whose input and output are text, from a style rewriter or a question-answering helper to a chatbot character or a code sketch made from a plain description. The best first projects are narrow, easy to check, and keep a person reviewing the output.

The GPT-3 API has one simple shape: you send text, and you get text back. OpenAI describes it as a general-purpose interface that tries to continue whatever pattern your prompt sets up, and says you can "program" it by showing a few examples of what you want. There is no separate model for translation, another for chat and another for code. The same model does all of them, and the prompt decides which.

That makes the question "what can you build?" both exciting and slippery. Almost anything that turns one piece of text into another is possible in principle. In practice, the projects that work best are the ones where a wrong answer is easy to spot and cheap to fix.

## What beta users are building

Since OpenAI opened its private beta in June, people with access have been sharing demos. The Verge collected a sample of them in July. Grouped by the job they do, they look like this:

| Kind of tool | Example from the beta | What the prompt does |
|---|---|---|
| Rewriting | Plain English turned into legal language | Shows a few before-and-after pairs |
| Question answering | A search tool that answers a question and points to a Wikipedia page | Frames a question and an answer slot |
| Characters | A chatbot that talks like a historical figure | Sets up a dialogue with a named speaker |
| Code from words | A page layout described in plain words, returned as code | Pairs descriptions with code snippets |
| Games and fiction | AI Dungeon's text adventures, now updated with GPT-3 | Continues a story from the player's move |

Companies are testing it too. OpenAI's launch post names Algolia, Quizlet and Reddit among early users, and The Verge reports that Reddit is exploring content moderation with it.

Notice what these have in common. None of them needed a new model to be trained. The GPT-3 paper shows that the model can do many tasks from an instruction and a handful of examples placed in the prompt, without any extra training. Every row in that table is, underneath, a well-designed prompt plus some ordinary code around it.

## What goes wrong

The demos you see online are the ones that worked. The Verge points out that they are cherry-picked, and that GPT-3 still makes errors no person would make: in one case it gave the wrong number for what comes before a million. Even OpenAI's chief executive, Sam Altman, has said, "The GPT-3 hype is way too much."

The GPT-3 paper lists the main weaknesses openly. Long passages can repeat themselves, lose the thread or contradict earlier sentences, and the model reflects biases in its training data. OpenAI also says it will cut off API access for harmful uses such as spam, harassment and astroturfing (fake grassroots campaigns).

For a builder, those limits point in one direction: choose a task where a person reads the result before anyone relies on it.

> **Try it:** Write down three small writing chores you do every week. For each one, ask: could I tell at a glance if a draft were wrong? Keep only the chores where the answer is yes. Those are your candidate projects.

## How do you plan a small first project?

A good first project is small enough to test in an afternoon. Here is one worked through step by step: a tool that rewrites dense customer-service replies into plain, friendly language.

1. **Name the job in one sentence.** "Turn a support reply into plain language a customer can understand, keeping every fact." If you can't say it in one sentence, the project is too big.
2. **Collect real examples.** Gather ten to twenty real replies. Write your own plain version of three of them. These become the examples in your prompt; the rest become your test set.
3. **Write the prompt.** Use a task line, your three pairs with identical labels, and an open slot.

```prompt
Rewrite each support reply in plain, friendly language. Keep every fact and every date.

Original: Your request has been escalated to our tier-two team and will be actioned within 3-5 business days.
Plain: We've passed your request to our specialist team. They'll get back to you within 3 to 5 working days.

Original: Refunds are processed to the original method of payment upon receipt of the returned item.
Plain: Once we receive the item you sent back, we'll refund the card or account you paid with.

Original: Please be advised that your subscription will auto-renew unless cancelled prior to the renewal date.
Plain:
```

4. **Test on the cases you held back.** Run each one and mark the result: correct and clear, correct but awkward, or wrong. Pay special attention to dropped facts, since a fluent rewrite that loses a date is worse than no rewrite.
5. **Change one thing at a time.** If results are mixed, swap in a more typical example or tighten the task line, then rerun the same test set. Keep notes so you know which change helped.
6. **Keep a person in the loop.** Show the plain version to an agent as a suggestion they can edit, not as a reply that goes out automatically.

This plan works for almost any idea in the table above. The details change, but the habits stay the same: one clear job, real examples, a fixed test set, small changes, and human review. Once a project like this is reliable, you have learned most of what you need to try something more ambitious.

## Sources

- OpenAI API: https://openai.com/index/openai-api/
- OpenAI's latest breakthrough is astonishingly powerful, but still fighting its flaws: https://www.theverge.com/21346343/gpt-3-explainer-openai-examples-errors-agi-potential
- Language Models are Few-Shot Learners: https://arxiv.org/abs/2005.14165
