GPT3 Example: Prompt To Fix Grammar & Spelling Mistakes

Post author: Adam VanBuskirk
Adam VanBuskirk
2/18/23 in
AI

In this brief post, I’m going to review a gpt-3 prompt that we use at wordbot.io to correct grammatical and spelling errors in user-provided text. Be warned, this prompt will also improve the text by rewriting portions if needed. If you wish to leave the text as-is outside fixing specific grammar or spelling errors, you may want to use this prompt as a base and tweak it to be more stringent.

The GPT-3 Prompt

This prompt uses no shots, or examples passed to GPT3 so it can better understand what we want. We often use a mix of single shot, multi-shot, and no-shot prompts depending on the complexity of what we need from GPT3. When we can get a high-quality completion from the prompt without using shots, we do it. This is because we must pay for the characters in the prompt. Every time we call the prompt we have to pay for it. Using shots, or examples in the prompt greatly increases your GPT3 cost.

Below are the prompt settings and parts

The settings

  • Model: Davinci
  • Temperature: .7
  • Maximum Length: 900
  • Stop Sequences: ###
  • Top P: 0
  • Frequency Penalty: 0
  • Presence Penalty: 0
  • Best of: 1

The instruction

This is the part of the prompt that tells GPT3 what we want it to do. Notice we are not using any shots, or examples. This is a very short, inexpensive prompt. Also notice we use placeholders which end in a colon and are inside double quotes. We have found this a VERY effective technique when designing GPT3 prompts.

Correct “Text:” to standard English and place the results in “Correct Text:”

The stop sequence

This comes after the instruction to tell GPT3 the instructional phase of the prompt is over. You can use anything for stop characters. Just make sure there is no chance the stop character(s) will appear in the user-provided content, or your prompt could break.

###

The user provided text

After the stop sequences, we have the Text: label that corresponds to the label in the prompt instruction. This allows GPT3 to match up the text provided by the user with that of the instruction set. We also include a placeholder at the end so GPT3 knows where to place the AI content it generates. Below, the placeholders passed in by us (the prompt designer) are bold, while the text provided by the user is italicized.

Text: The goal of article rewriting is to expres information in a new way. Article rewriting is to make change in a text by replaecing words, phrases, sentencs, and sometimes hole paragraphs to make the text looke unique and more engauging. Correct Text:

The Completion

Below is the completion from GPT3. You’ll notice it rewrote large sections of the text to make it more grammatically correct. It also fixed the numerous spelling errors.

The goal of article rewriting is to express information in a new way. Article rewriting involves making changes in a text by replacing words, phrases, sentences, and sometimes entire paragraphs to make the text look unique and more engaging.

The Entire Prompt

Below is the entire prompt. To make things more clear for using in the OpenAI playground or your software, we bolded the prompt and italicized the user-generated and AI-generated text. The user-generated text you or your software will need to pass in. The AI-generated text is returned from GPT3 and called a completion. We also show a screenshot of the prompt as seen in the playground.

grammar and spelling fixer gpt3 prompt

Correct “Text:” to standard English and place the results in “Correct Text:”###Text: The goal of article rewriting is to expres information in a new way. Article rewriting is to make change in a text by replaecing words, phrases, sentencs, and sometimes hole paragraphs to make the text looke unique and more engauging. Correct Text: The goal of article rewriting is to express information in a new way. Article rewriting involves making changes in a text by replacing words, phrases, sentences, and sometimes entire paragraphs to make the text look unique and more engaging.

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

Leave a Reply

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


Read Next




© 2024 Menyu LLC