Summarization with GPT-3
GPT-3 models are quite convincing and represent the rising power of Cloud AI. Read this excerpt from the book Transformers for Natural Language Processing, Second Edition to see how easy getting started with summarization with GPT-3 can be.
In this article, we look at the impressive power of OpenAI’s GPT-3 engines by looking at an example of summarizing complex text, which in our case is an excerpt of Montana corporate law.
This article is an excerpt from the book Transformers for Natural Language Processing, Second Edition. This edition includes working with GPT-3 engines, more use cases, such as casual language analysis and computer vision tasks, and an introduction to OpenAI's Codex.
First, go to https://openai.com/ and sign up and sign in. Then go to the examples page. You’ll see many examples, from converting movie titles to emojis to generating ads to creating micro horror stories. For our purposes, select Summarize for a 2nd grader:
Figure 1: GPT-3 examples page
A window will open, and we can enter our prompt.
We submit the text T of the corporate sample of the previous section to the GPT-3 model.
The prompt is P = E + T + S:
- E tells the model to make the explanation simple:
My second grader asked me what this passage means: - The text T is in quotes:
“““The law regarding corporations prescribes that a corporation can be incorporated in the state of Montana to serve any lawful purpose. In the state of Montana, a corporation has all the powers of a natural person for carrying out its business activities..../...
The shareholders have the power to change the size of board of directors.”““
- S shows the type of task that is expected:
I rephrased it for him, in plain language a second grader can understand: “““
The response produced by the GPT-3 Davinci engine is quite convincing:
A corporation is a business.
A corporation is a person.
Corporations can do everything people can do.
Corporations can be sued.
Corporations can buy, sell, or trade things.
A corporation has its own name that is different from the names of the people who own it.
Corporations are formed by people who want to start a business, and they file papers with the government to make it official.
We can keep T and modify E and S:
- E can be changed to:
My MBA college student asked me what this passage means: - S can be changed to:
I rephrased it for him, in MBA college language:
The GPT-3 engine generated the response of the previous request but added useful information for a college student:
Corporations can have directors who are in charge of making decisions for the business. The directors are elected by the shareholders. Shareholders can change the size of the board of directors.
GPT-3 models are quite convincing and represent the rising power of Cloud AI. There are a whole host of applications transformers can help with, including identifying blurry images and assisting with writing code. And for those writers amongst you, yes, GPT-3’s summarization functionality is a great way to create summaries for your books, chapters, papers, and articles!
Transformers for Natural Language Processing, Second Edition goes deeper into summarizing prompts, model comparisons, and using critical thinking with NLP to provide you with an advanced natural language processing toolkit.