Automatic Blog Post Generation With Generative Models

What is Blog Post Generation and Why Use Generative Models?

Blog post generation is about getting AI to automatically write a blog article for you. Simply give a couple of instructions to the AI and it will write a whole blog post for you that is both relevant and fluent. You can even automatically generate blog posts with the proper HTML formatting (headings, subheadings, etc.). Generative models are perfectly suited for this task because they are very good at understanding your requirements and at generating complex content based on this, in many languages. This is pure original content so there is no risk of duplicated content.

For example ask the following: generate a blog article about a text classification API. The AI model could return something like this:

<h1>Text Classification API</h1>
<h2>What is Text Classification?</h2>
<p>Text classification is the process of categorizing a block of text based on one or several labels. Let's say you have the following block of text: Perseverance is just getting started, and already has provided some of the most iconic visuals in space exploration history. It reinforces the remarkable level of engineering and precision that is required to build and fly a vehicle to the Red Planet. Let's also say that you also have the following labels: space, science, and food. Now the question is: which ones of these labels apply best to this block of text? Answer is space and science of course.</p>
<h2>Text Classification with Hugging Face Transformers.</h2>
<p>Hugging Face transformers is an amazing library that has been recently released. It is based on either PyTorch or TensorFlow, depending on the model you're using. Transformers have clearly helped deep learning NLP make great progress in terms of accuracy. However this accuracy improvement comes at a cost: transformers are extremely demanding in terms of resources.</p>

You could also pass specific keywords that you want to be included in your blog article. Or on the contrary you can explicitly specify keywords that you don't want to see in the final blog post.

The length of the article, its structure, and the generated content itself, will radically depend on the instructions you pass to the AI.

GPT-J, GPT-NeoX, LLaMA 2, Dolphin, and ChatDolphin, are advanced generative models that are very good alternatives to GPT-4 and ChatGPT for full blog post generation, without restrictions. These models can adapt to many situations, and behave like real content writers. For advanced use cases, it is possible to fine-tune these models (train them with your own data), which is a great way to perform more advanced article generation that is perfectly tailored to your company or industry.

Automatic blog post generation

Why Use Automatic Blog Post Generation?

Content creation is at the heart of every marketing and SEO strategies today, but producing quality content on a regular basis can be tedious and very costly. Here are a couple of examples about how you could leverage blog post generation:

Feed a Corporate Blog

So many corporate blogs stop being maintained after a couple of articles because it's too much work. This is bad for SEO but it also gives a bad impression to visitors. Thanks to automatic content writing, you can easily write a couple of articles per week in a couple of minutes that rank very well on Google.

Multilingual Marketing

Writing articles in non-English languages is often a good strategy to rank on competitive keywords, but of course writing multilingual content is hard... You can now easily do it thanks to generative models.

Performing Blog Post Generation with Generative Models

Building an inference API for blog post generation based on generative models is a necessary step as soon a you want to use blog post generation 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 Article Generation API

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

See the text generation API endpoint here.