Paraphrasing and rewriting API, based on GPT

What Are Rewriting and Paraphrasing and Why Use GPT?

Paraphrasing/Rewriting is about generating a new content that keeps the same sense as the original content, but with different words.

Performing simple paraphrasing by simply changing a couple of words is one thing, but generating advanced paraphrasing that completely changes the structure of sentences and the vocabulary used is another beast! Modern models like GPT-3, GPT-J, and GPT-NeoX, now make it possible to easily create advanced and complex paraphrasing that properly keeps the main sense while using a different wording.

GPT-J and GPT-NeoX are the most advanced open-source Natural Language Processing models as of this writing, and they are the best GPT-3 alternatives. These models are so big that they can adapt to many situations, and perfectly sound like a human. For advanced use cases, it is possible to fine-tune GPT (train it with your own data), which is a great way perform paraphrasing that is perfectly tailored to your industry.


Why Use Paraphrasing And Rewriting?

Marketing teams do appreciate paraphrasing as it makes their work much faster and less repetitive. Here are a couple of examples:

Content Creation

Creating marketing content can be long, tedious, and repetitive. It is sometimes interesting to get a hand from AI to increase productivity! Imagine you want to write a new blog article that partially says the same thing as another blog post your wrote earlier. You can paraphrase part of this content and supplement it with new original content. It's also known as "marketing copy".

Product Description

Writing product descriptions is sometimes very repetitive. Sometimes products are very similar but you don't want to copy paste the same description. Using paraphrasing can really help.

Ads Creation

If you are creating ads on a regular basis, you might sometimes lack inspiration. Paraphrasing is your friend here.

Building Accurate and Original Paraphrasing with GPT

In order to make the most of GPT, it is crucial to have in mind the so-called few-shot learning technique (more details here): by giving only a couple of examples to the AI, it is possible to dramatically improve the relevancy of the results, without even training a dedicated AI.

Sometimes, few-shot learning is not enough (for example if your paraphrasing relies on very specific content, bound to your industry only). In that case, the best solution is to fine-tune (train) GPT-J with your own data (more details).

Building an inference API for paraphrasing based on GPT is a necessary step as soon a you want to use paraphrasing in production. But building such an API is hard... First because you need to code the API (easy part) but also because you need to build a highly available, fast, and scalable infrastructure to serve your models behind the hood (hardest part). It is especially hard for machine learning models as they consume a lot of resources (memory, disk space, CPU, GPU...).

Such an API is interesting because it is completely decoupled from the rest of your stack (microservice architecture), so you can easily scale it independently, and you can access it using any programming language. Most machine learning frameworks are developed in Python, but it's likely that you want to access them from other languages like Javascript, Go, Ruby...

NLP Cloud's Paraphrasing and Rewriting API

NLP Cloud proposes a paraphrasing/rewriting API based on GPT that gives you the opportunity to perform paraphrasing out of the box, with breathtaking results. If the base GPT model is not enough, you can also fine-tune/train GPT on NLP Cloud and automatically deploy the new model to production with only one click.

For more details, see our documentation about text generation with GPT here. Also see our few-shot learning example dedicated to paraphrasing here. And easily test GPT paraphrasing on our playground.