GPT prompt engineering with CyberSEO Pro and OpenAI – CyberSEO Pro

GPT prompt engineering with CyberSEO Pro and OpenAI – CyberSEO Pro

When working with GPT, the key to getting accurate results lies in the correct creation of your prompts (the very prompts you use in the CyberSEO Pro and RSS Retriever post title and post content assignments). It often seems that the plugin doesn’t work as expected – it doesn’t fetch the full article, loses the original formatting or simply generates incorrect or empty output. The problem is not with the plugin, it’s with your prompt.

Since access to OpenAI’s GPT-4 model is still not available to everyone, and the API for this model is quite expensive to use, you’ll probably have to work with GPT-3.5 models most of the time. While these models may lag behind GPT-4 in terms of intelligence, they are still capable of producing high-quality content that rivals the results of GPT-4. The main difference is not in results, but in prompt engineering, which we’ll explore in this article.

Let’s start by exploring a couple of critical nuances that will directly affect the content generated by the plugin in automatic mode. These nuances will make a dramatic difference.

HTML markup

If you plan to process articles with HTML formatting (in CyberSEO Pro and RSS Retriever plugins, article text in HTML format corresponds to the %post_content% shortcode), remember to instruct GPT to return the result with HTML formatting. Only in this case you will get a rewritten or translated article with the original HTML structure intact, including styles, headings, links, tables, images, etc.

[openai_gpt prompt="Translate the following article into French and return the result in HTML format: %post_content%"]

⚠️ Note that the “return the result in HTML format” directive is critical if you want to process source articles that contain HTML markup and get the result with the original HTML structure preserved.

Original language of the article

If you want to rewrite text written in a language other than English, but you write your prompt in English, GPT 3.5 will likely return the result in English, even if you explicitly request it in the original language. In some cases, it may even respond with “I cannot reword this”. However, if your prompt itself is written in the language of the original article, you will get the result you expected:

[openai_gpt prompt="Reescriba el siguiente artículo con un estilo informativo y devuelva el resultado en formato HTML: %post_content%"]

Precision of your GPT prompt

All GPT prompts should be as concrete as possible, leaving no room for ambiguity. For instance, if you want AI-generated content to include HTML elements, specify it explicitly, as described above. At the same time, if you want certain elements like <h2> headings to be generated, state it directly. Specify whether to use bullet lists and bold or italic text for emphasizing important elements. Perhaps you don’t need a “Conclusion” section at the end of the text – be sure to mention that in your prompt. Want the result formatted according to a specific HTML template? That’s also possible:

[openai_gpt model="gpt-3.5-turbo-16k" prompt="Create pros and cons of olive oil clearly separated in a bullet-point HTML format. Ensure the content is engaging, human-like, and includes natural keyword usage for SEO optimization. Use the following HTML markup template (<h2> tag for a heading): <div class='wp-block-group'><div class='wp-block-columns has-background' style='background-color: #eaebed; border-radius: 10px; padding: 16px;'><div class='wp-block-column'><h2>PROs</h2><ul><li>Pros</li></ul></div><div class='wp-block-column'><h2 class='cons-uline'>CONs</h2><ul><li>Cons</li></ul></div></div></div>" max_tokens="1500" temperature="0.5"]

Raw text processing

If you don’t plan to process HTML content and want plain raw text, use the %post_content_notags% shortcode instead of %post_content%. This shortcode will strip your article of all HTML elements and pass it to the GPT model as plain text. What does this give you? Faster processing speed, a significant advantage in terms of the maximum length of processed content (HTML code is much heavier than plain text), and savings on the fees OpenAI charges for using its models – the more compact the processed articles, the less you pay!

Choosing the right GPT model

Speaking of GPT-3.5, there’s another important detail to note. OpenAI offers two similar but different models, namely OpenAI GPT-3.5 Turbo and OpenAI GPT-3.5 Turbo Instruct. The cost of using the API for both models is about 10 times lower than the cost of the GPT-4 API, making them extremely attractive for autoblogging. Especially tempting is the GPT-3.5 Turbo 16K model, which allows you to process texts of up to 16,384 tokens, which is quite substantial.

However, you should consider the primary purpose of the model. GPT-3.5 Turbo is a chat model and works on the same principle as ChatGPT, where it is used together with the GPT-4 model, which is also designed exclusively for user chat. This makes both models less suitable for text processing, according to your exact instructions. Both may try to converse with you instead of simply following your instructions. This behavior often leads to unexpected results, such as adding “authorial” comments and remarks to the generated text. To avoid such surprises, it is recommended to use the new OpenAI GPT-3.5 Turbo Instruct model, which is a direct successor of legendary Davinci. The only significant drawback of GPT-3.5 Turbo Instruct is its limitation to 4,096 tokens for the processed content. Unfortunately, our world isn’t perfect…

Simultaneous use of multiple GPT models

Note that the [openai_gpt] shortcode allows you to select the exact GPT model you need for each particular task, and also allows you to set various parameters such as the maximum number of tokens and the model’s temperature (creativity). So you can mix different GPT models with different parameters in the same HTML template. This feature sets CyberSEO Pro and RSS Retriever plugins apart from other feed syndicators and no-source content generators for WordPress.

Advanced Autoblogging with GPT-3.5 Turbo 16K

Source: https://www.cyberseo.net/blog/gpt-content-creation-tips-from-prompts-to-precision/