Design a Text Rewriter With The OpenAI Playground and ChatGPT

Post author: Adam VanBuskirk
Adam VanBuskirk
3/22/23 in

Are you a software developer interested in creating a tool that can rewrite paragraphs, articles, and other text? OpenAI’s new ChatGPT tool is amazing at rewriting content. But how do you use it in your own app? In this brief post, I’m going to show how you can use the Open AI playground to create a text rewriter that you can then use in your own software or website by calling it via OpenAI’s api.

What is the OpenAI playground?

I won’t dive into the Open AI Playground in this article. However, if you don’t have any experience with it, check out learning the OpenAI playground step-by-step.

Choose The Mode and GPT Model

At the time of this writing, the free version of ChatGPT uses the gpt-3.5-turbo model with Chat mode. ChatGPT Pro uses Chat mode with the gpt-4 model. This of course means for our text rewriter we need to use the Chat mode with one of these two models. Because gpt-4 is expensive and 3.5 turbo is excellent at rewriting text, we’ll use GPT-3.5-turbo for this demo.

The System Message

The system instruction is how we customize ChatGPT to excel in a specific task; in this case rewriting text. Below is what I entered for our text rewriter:

Please input the article you would like me to rewrite in your own words:

System instruction for gpt-3.5-turbo

The Assistant Message

I use the Assistant instruction to tell the gpt-3.5-turbo model to rewrite the text that will be entered by the user. Below is the instruction I used:

Rewrite the following article in your own words:

Assistant instruction gpt-3.5-turbo

The User Message

The user message is where we accept the text from the user to be rewritten. When calling the OpenAI API from our software, we would pass in the System and Assistant messages along with the User message. Below is my user-inputted text for my example.

user input for chatgpt text rewriter

The Returned Assistant Message

After passing in the System message, the first Assistant message, and the User message, we receive back the rewritten text in the form of a returned Assistant message. Below is the returned text from the playground. The same would be returned if using the API as well.

gpt output for chatgpt text rewriter

Putting It All Together

Below is a screenshot of the designed text rewriter as seen in the Open AI Playground. With just a few instructions, we created a really high quality text rewriter.

create a chatgpt rext rewriter

Taking The Text Rewriter Further

When incorporating the api call into your software, you can also continue to collect and pass back and forth all the Assistant and User messages. Doing so will strengthen the text rewriter by allowing it to understand context and learn from its ongoing interaction with the user.

Sign up today for our weekly newsletter about AI, SEO, and Entrepreneurship

One comment on "Design a Text Rewriter With The OpenAI Playground and ChatGPT"

Lilly says:

I want to rewrite app for better writing skill.

Leave a Reply

Your email address will not be published. Required fields are marked *

Read Next

© 2024 Menyu LLC