We used OpenAI's GPT-3 to keep teenagers informed
Did you ever feel like you wanted to stay informed and read the news, but never got over the barrier of opening a news page? News networks all around the world already face this problem. They try to target the younger generation using tweets and stories. We used GPT-3 to read the news and overtook creating the catchy summaries, tags and styling features which is normally a time consuming task.
Introduction
The student's initiative TUM-AI from the Technical University of Munich held a GPT-3 Hackathon in April 2021 which enabled students to build their ideas which involved OpenAIs new general purpose AI model GPT-3. Together with experts from OpenAI, my team focused on the topic "Information" and participated in a challenge posed by the BR "AI + Automation Lab".
As you can see in the short demo-gif above, we built a website which guides the user through the process of automatically summarizing newspaper articles. Because we worked closely with our industry partner, the bavarian broadcast network "Bayerischer Rundfunk" or short "BR", this is all based on the content of the BR news website. However every technique we used also works for any other text-source which produces short and concise articles (not more than 2000 words).
The Goal
To cope with the vastly increasing amount of news content, the BR posed the challenge to find ways to use the GPT-3 AI model to automatically generate short social media content. The focus was especially on the Instagram platform, with requested content type being the quiz, surveys, short summaries and headlines which could be processed into an Instagram story.
The workflow
-
Article Selection
Copy the URL of the desired article either from the embedded page or from an external webpage
-
Article Scanning
Extract article information from the entered URL
-
Feature Selection
Select which outputs you want the AI to produce and edit the parsed article data if necessary
-
Result Showcase
Check the AI-generated results for errors and copy the texts for further processing
As you can see in the short demo-gif above, we built a website which guides the user through the process of automatically summarizing newspaper articles. Because we worked closely with our industry partner, the bavarian broadcast network "Bayerischer Rundfunk" or short "BR", this is all based on the content of the BR news website. However every technique we used also works for any other text-source which produces short and concise articles (not more than 2000 words).
Article Selection
The entrypoint of our web application presents the user the embedded BR news website. For further article processing, the user needs to present a valid BR news article URL which can be copied from the embedded site or from an external website. The input is automatically validated. If everything looks good, the input field is marked in green and the user can extract all required information from the article.
Article Scanning
The entered URL is sent to the backend for article extraction. Using the Python3 beautifulsoup4 package, the Django backend extracts the headline and article text from the page.
Feature Selection
We are currently able to generate a summary of the content, short quizzes, participation questions and hashtags. Each of the requested items requires a separate GPT-3 prompt. We also inform the user about the required amount tokens. The user can manually adjust the extracted text in case the prompt would be too long (> 2048 tokens).
Result Showcase
The resulting page presents all generated content. Let me walk you through each of the cards individually.
Summary
GPT-3 and the here used davinci engine are famous for their ability to summarize short texts pretty accurately. This works for this german newspaper text just as well as for the english examples.
Quiz
Creating an actual quiz with GPT-3 was especially challenging. We try to teach an AI to create a quiz that asks a question about the text, gives one correct and two false answers AND is not too easy. All of these three criteria for a good quiz are extremely hard to follow, even for an advanced AI model like GPT-3.
Question
Generating the question is easy for GPT-3, as it is always a vage question with a lot of valid answers. It just has to find the main theme of the article and ask a question about this theme.
Story Preview
The visual bonus we give the user is the emulated story preview. It combines the results of the generated results into one instagram story. We automatically select pictures from the entered article, cut them to shape and add the content. Correctly emulating an Instagram story was important for us, as it gives the user the right feeling for the generated content.