Creating long, coherent articles with GPT-4 Turbo – CyberSEO Pro

Estimated read time 5 min read

[ad_1]

Creating long, coherent articles with GPT-4 Turbo

The first day of last year marked a significant milestone for the CyberSEO Pro plugin, as it introduced support for OpenAI GPT, becoming the first in the market to use AI for autoblogging. Throughout the year, the AI technology landscape witnessed numerous developments, with the most notable being the launch of the OpenAI GPT-4 Turbo model. This model boasts an impressive capability of generating texts up to 128K tokens, approximately 85,000 words or 300 pages in English. This feature can now be harnessed through your plugin.

Introducing a new shortcode [gpt_article], it comes in the format:

[gpt_article topic="the article topic" directives="Format the article for embedding in a WordPress post, using only the <p> tag. Exclude any other HTML tags." language="English" sections="4" heading="h2" max_tokens="4096" temperature="1"]

The topic parameter is the key element of this shortcode, intended to hold the title of the article to be generated. Typically, it can include “%post_title%”, which, during shortcode processing, will be replaced with the title of the current WordPress post. This makes the most sense when generating articles from a text dump or a CVS file containing article titles. It can also be used with titles from imported RSS feeds, which is particularly relevant in conjunction with the RSS Retriever plugin:

[gpt_article topic="%post_title%"]

Additionally, remember that the CyberSEO Pro plugin allows the use of Spintax in the parameter values of all shortcodes used in post HTML templates. The topic parameter is no exception:

[gpt_article topic="{Traveling to|Life in|Restaurants in|Sights of|Climate in|Work in} {Paris|London|Warsaw|Berlin|New York|Tokyo}"]

This feature allows you to create post templates with randomly modifiable rules for content generation, an indispensable tool for autoblogging that you should definitely learn to use.

The directives parameter allows you to give additional instructions in English to the GPT (even if you want the output in another language). If omitted, the default directive applied will be:

“Format the article for embedding in a WordPress post, using only the <p> tag. Exclude any other HTML tags.”

For instance, if you want the generated text to include bullet lists, set the directives parameter as follows:

[gpt_article topic="the article topic" directives="Format the article for embedding in a WordPress post, using only <p>, <ul>, <li> tags. Exclude any other HTML tags."]

Similarly, you can specify any HTML tags you wish to see in the generated article. Moreover, you can set desired keywords and provide recommendations on the article’s style and content. For example:

[gpt_article topic="the article topic" directives="Write as {an expert-ecologist|a typical urban dweller}. Format the article for embedding in a WordPress post, using only <p>, <strong> tags. Exclude any other HTML tags. Use <strong> for the 'global warming' keyword. The text should cover the problems of environmental protection and be written in an analytical style."]

Note that double quotes (“..”) cannot be used within parameter values – use single quotes (‘..’) instead. Otherwise, WordPress will not be able to parse your shortcode correctly, as double quotes within double quotes would confuse the parsing algorithm.

By default, the shortcode gpt_article generates articles in English. To specify a different language, use the language parameter. Note that all parameter values for the gpt_article shortcode should be in English. Therefore, to get an article in Spanish, your shortcode should look like this:

[gpt_article topic="the article topic" language="Spanish"]

The sections parameter determines the number of text sections in the article, with the default being 4. Changing this value allows you to increase or decrease the length of the generated article. Keep in mind that using the OpenAI GPT-4 Turbo model API can be costly, so adjust the article size based on your budget. You can also use Spintax to create CyberSEO Pro articles of varying lengths. For instance, the following shortcode will generate articles with 3 to 7 text sections:

[gpt_article topic="the article topic" sections="{3|4|5|6|7}"]

You can specify your own tag for headings with the heading parameter. By default, each text section starts with its title enclosed in an <h2> HTML tag (heading=”h2″). Here are some examples of using this parameter:

[gpt_article topic="the article topic" heading="h3"]
[gpt_article topic="the article topic" heading="strong"]
[gpt_article topic="the article topic" heading="div class="subtitle""]

If you don’t want each text section to have a heading, set the heading parameter to an empty string:

[gpt_article topic="the article topic" heading=""]

The max_tokens and temperature parameters allow you to adjust the maximum number of tokens in each generated article section (default is 4096, the maximum for OpenAI GPT-4 Turbo) and the GPT model’s creativity (default is 1), respectively.

Keep in mind that while the gpt_article shortcode can generate a large, multi-page article, you are not limited to using just this shortcode in your post template. Firstly, you can use multiple gpt_article shortcodes (e.g., with different settings for different parts of the article). Secondly, your template can include other shortcodes, as you might need to insert graphic illustrations or blocks of HTML code, like a navigation block, advertising block, etc.

It’s important to monitor the token usage in your OpenAI account after setting up your content source using the gpt_article shortcode. Currently, the cost of using the GPT-4 Turbo model is $0.01 per 1K incoming and $0.03 per 1K outgoing (generated) tokens. Therefore, assess your expenses for generating each typical article according to your settings to determine the optimal number of generated article sections and the optimal size of each section in tokens, which should not exceed 4096.

You May Also Like

More From Author

+ There are no comments

Add yours