WordPress Glossary Plugin (CMTG) - Use Case - How to Build Up Your Website Glossary Using ChatGPT


Use Case – How to Build Up Your Website Glossary Using ChatGPT

Back to User Guides

Note: This guide covers features from: 

Video Use-Case


Introduction

The WordPress Glossary plugin allows you to create a site with a complete glossary of terms. Each term definition can appear on mouse hover across the whole site. 

The Ecommerce version of the plugin allows to automatically generate definitions using third-party services - one of them is ChatGPT.

The plugin also supports the Double-click feature, so it is possible to generate a temporary definition for any word that the user double-clicks. The admin also has a possibility to permanently store these definitions to the glossary.

Use Case Front-End

Example of displaying ChatGPT definition together with manually added definition - WordPress Knowledge Base Plugin
Example of displaying ChatGPT definition together with manually added definition
Example of generating a temporary definition by double-clicking any word - Knowledge Base WordPress Plugin
Example of generating a temporary definition by double-clicking any word
Saving temporary terms to the glossary database - Glossary Plugin WordPress
Saving temporary terms to the glossary database
Regenerating temporary terms - Tooltip Plugin WordPress
Regenerating temporary terms

Use Case Assumptions

In this example use case guide we will consider how to build up a glossary on your site using ChatGPT.

We consider that you have already bought the plugin, but not installed it yet. 

It follows:

Installing the Plugin

The process is the same for all CM plugins and add-ons.

CreativeMinds Customer Account Dashboard - Downloads tab
CreativeMinds Customer Account Dashboard
  • Download the plugin from your customer dashboard.
  • Log in to WordPress and navigate to the WordPress Admin → Plugins settings.
  • Click on Add New.
  • Activate it and add the license.

Learn more: Getting Started - Installation And First Steps


Quick Recap

In this use case we will cover only how to build up a glossary using ChatGPT and Double-click support. If you want learn more about how to configure the plugin and create your glossary, please, refer to this use case guide:

What is ChatGPT

ChatGPT is an artificial intelligence program created by OpenAI that is capable of understanding human language and can have a conversation with people just like another human being. It works by using complex algorithms and deep learning models to analyze and understand the meaning of words and sentences. 

ChatGPT processes text using tokens. Tokens are pieces of words used for natural language processing. For English text, 1 token equals about 4 characters or 0.75 words. Learn more how Tokens work. Every time the plugin request the term definition, it spends tokens which are paid. When you register your account, OpenAI gives a start credit which you can spend. When your credit is run out, you can pay to continue using the service. You can check the Pricing Plans.

Learn more about ChatGPT in our article: Integrating ChatGPT With Tooltip Plugin For WordPress

How to Get API from OpenAI

To integrate ChatGPT with WordPress Glossary plugin, you will need an API key. To obtain it, you need to sign up on the OpenAI site. You need to register and verify your phone number. After you are registered and logged-in, head to the API Keys page and click the button Create new Secret key.

Copy this key and keep it safe and secure, as it provides access to your OpenAI account and services. The copied key will be needed while configuring the plugin.

Configuring ChatGPT Integration

Now we can configure the integration with the WordPress Glossary plugin. To do this, navigate to Admin Dashboard → CM Tooltip Glossary Ecommerce → Settings → Ecommerce Settings tab.

Ecommerce settings - Tooltip WordPress Plugin
Ecommerce settings

Scroll down and find the section Chat GPT. It has the following options:

ChatGPT integration settings - Wiki Plugin for WordPress
ChatGPT integration settings

Let's consider these options more detailed.

Enabling the ChatGPT Integration

First 2 options that we will consider are:

Enabling the ChatGPT integration - Wiki for WordPress
Enabling the ChatGPT integration
  • Enabled - Check this option to enable the integration with ChatGPT.
  • Chat GPT API Key - Enter here the API key which you obtained from the OpenAI site.

The Way Definitions Are Generated

The next group of options is about the way the definitions will be generated. These options allow you to specify the context of the generated terms, their length and precision.

Specifying the way definitions are generated - Wiki WordPress Plugin
Specifying the way definitions are generated
  • Chat GPT Prompt Template - Specify the request which the plugin will be sending to ChatGPT for getting the term definition. Important: this template must contain the placeholder {term}.
  • Chat GPT AI Role - Here you can define the role for the Chat GPT assistant to make your term definitions more specialized. This way, if you define the assistant as an expert in some certain area, it will generate the definitions related to your main topic.

Request Example

Let's consider more detailed how the request is formed and sent to the ChatGPT in order to receive an answer. The request defined in the options Chat GPT AI Role and Chat GPT Prompt Template will be combined to generate a definition for defined specialization. The example of the settings on the screenshot above will have the following request:

You're a helpful assistant. Define the term: "{term}"

The way how you define the AI role can have a huge affect of the result and generate totally different definitions for the same word.

Here's how ChatGPT defines the term "dog" when the ChatGPT AI Role is set to "You are an expert veterinarian.":

AI generated definition for the term 'dog' when AI role is set to 'expert veterinarian' - WordPress as a Wiki
AI generated definition for the term 'dog' when AI role is set to 'expert veterinarian'

Here's how the same term "dog" defined when ChatGPT AI Role is set to "You are a gangsta rapper.":

AI generated definition for the term 'dog' when AI role is set to 'gangsta rapper' - WordPress Internal Linking Plugin
AI generated definition for the term 'dog' when AI role is set to 'gangsta rapper'
  • Chat GPT Model - This option allows you to choose a ChatGPT model. This option is inactive until you enter your API key in the option above and save the changes. Once it's done, you will be able to choose any model supported by your API in the dropdown.

Example of Available Models

Choosing ChatGPT model - WordPress Glossary Plugin
Choosing ChatGPT model
  • Chat GPT Reply Length - Define the maximum length of the reply from ChatGPT. This affects the final length of the term.
  • Chat GPT Temperature - This option allows to define how accurate the generated definition will be. This value ranges from 0 to 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

Examples of Different Temperatures

Here's the example of the generated definition with the Temperature set to "1.5":

AI generated definition for the term 'blockchain' when AI temerature is set to '1.5' - WordPress Knowledge Base Plugin
AI generated definition for the term 'blockchain' when AI temerature is set to '1.5'

And example of the same term definition with the Temperature set to "0.2":

AI generated definition for the term 'blockchain' when AI temerature is set to '0.2' - Knowledge Base WordPress Plugin
AI generated definition for the term 'blockchain' when AI temerature is set to '0.2'

Displaying Generated Definitions

And one more group of options that we will consider now is related to how the generated definitions will be displayed on the front-end:

Specifying how to display generated definitions - Glossary Plugin WordPress
Specifying how to display generated definitions
  • Only show Chat GPT when content is empty - Enable it, if you want the definition generated by ChatGPT to be added only in case if the term is empty (when you didn't add the definition manually). If the option is disabled, the ChatGPT definition will be displayed below the definition which you wrote by yourself.
  • Display button to generate description by Chat GPT on the term page - If enabled, a button for generating a temporary ChatGPT definition will be displayed on each term page on the front-end. The generated definition will be stored in cache until it's cleared or until the button is clicked again while the definition is already displayed - in this case, the definition will be regenerated. This button can be disabled specifically for each term in the metabox CM Tooltip - Term Properties.
Button for generating temporary definition by ChatGPT - WordPress Glossary Plugin
Button for generating temporary definition by ChatGPT
  • Show Chat GPT data in Tooltip - Enable it, if you want the definition generated by ChatGPT to be displayed in tooltips.
Example of the definition by ChatGPT in the tooltip - Tooltip Plugin WordPress
Example of the definition by ChatGPT in the tooltip
  • Limit length of Chat GPT data in Tooltip - This option allows to limit the display length of the ChatGPT definition in a tooltip. You can specify here the maximum amount of characters to display. Set "0" to disable the limit.
  • Show Chat GPT data in Glossary term display - Enable it, if you want the definition generated by ChatGPT to be displayed on the term page.
Example of the definition by ChatGPT on the term page - Tooltip WordPress Plugin
Example of the definition by ChatGPT on the term page
  • Wrap the output from Chat GPT in custom HTML template - Enable it, if you want to wrap the definition generated by ChatGPT with custom HTML template. The template can be specified in the option Chat GPT Wrapper Template.
  • Chat GPT Wrapper Template - Specify the custom template to wrap the definition generated by ChatGPT. The template accepts placeholders {term} as a requested term, and {content} as an obtained definition. 

Example

Let's use the following HTML template:

<hr><div><strong>Definition of "<u>{term}</u>" by Chat GPT:</strong> {content}</div>

  1. With custom template
  2. Without custom template
Example of using a custom template - Wiki Plugin for WordPress
Example of using a custom template

Disabling ChatGPT Definitions In Specific Terms

You can override the general plugin settings for showing definitions generated by ChatGPT in specific terms. To do this, find the metabox CM Tooltip - Term Properties on the term editing page. There you can find 2 relevant options:

Disabling ChatGPT API for the specific term - WordPress Internal Linking Plugin
Disabling ChatGPT API for the specific term
  • Disable Chat GPT API for this term - If checked, then ChatGPT definitions will not be automatically generated and displayed on the term page and in the tooltip for this specific term.
  • Disable ChatGPT button on the term page for this term - This option disables the front-end button for generating a temporary ChatGPT definition on the term page.

Configuring Double-click Support

The plugin supports a double-click feature with ChatGPT integration.

It means that every time a word is double-clicked anywhere on the page (even without being defined as a Glossary term), a temporary tooltip will be displayed, containing the definition generated by ChatGPT. 

If somebody double-clicks some word, the definition generated by ChatGPT will be cached on your site. So the plugin will not request the definition for this word every time somebody double-clicks it, as the result is already stored on your site (until you flush the cache).

Front-end Example

Double-click feature in action - Wiki WordPress Plugin
Double-click feature in action

The settings for enabling this feature are located under the same tab Ecommerce Settings.

Ecommerce settings - WordPress as a Wiki
Ecommerce settings

Find the section Doubleclick settings:

Double-click settings - WordPress Internal Linking Plugin
Double-click settings

Generating Temporary Definitions

To allow users using the double-click feature, you need to configure the following options:

Enabling double-click feature with ChatGPT support - WordPress Knowledge Base Plugin
Enabling double-click feature with ChatGPT support
  • Enable doubleclick API call - Check it to turn on the double-click support.
  • Doubleclick service - Open the dropdown and choose Chat GPT.
  • Doubleclick underline color - Here you can define the underline color for a temporary definition which is generated by the Double-click feature. The color should be set in the hex format. For more complex styling you can use the selector:.glossaryLink.temporary{//your styles here}
Example of the temporary tooltip definition which is underlined with different color - Knowledge Base WordPress Plugin
Example of the temporary tooltip definition which is underlined with different color

Storing Definitions To the Database

The Double-click feature also allows the admin to permanently save generated by ChatGPT definitions straight from the front-end. It's just enough to click the relevant button in the appearing tooltip, and the new term will be created in your glossary.

Front-end Example

Saving the generated definition to the glossary database - Glossary Plugin WordPress
Saving the generated definition to the glossary database
Stored term in the glossary - Tooltip Plugin WordPress
Stored term in the glossary

To enable it, configure the following options:

Enabling storing temporary definitions to the glossary database - Tooltip WordPress Plugin
Enabling storing temporary definitions to the glossary database
  • Enable saving the results as terms - Check this option to have the ability to save temporary generated terms to the glossary from the front-end.
  • Doubleclick "Save" label - Here you can change the label for the Save button.

TIP

If you're planning to build your glossary using this method, we recommend you to enable the option Only show Chat GPT when content is empty in main ChatGPT Integration settings. This way, the ChatGPT definition will not be duplicated after storing the term to the database.

Displaying ChatGPT definitions only when the term content is empty - Wiki Plugin for WordPress
Displaying ChatGPT definitions only when the term content is empty

Regeneration of Definitions

By default, the plugin stores in the cache the automatically generated definitions. It allows not generating the definitions for already fetched terms every time, so the tokens will not be wasted for no reason and it makes the process faster. But you can regenerate the definitions if needed. Let's consider how and where you can do this.

Regeneration of the Temporary Definition

When the double-click support is enabled, the admin can regenerate temporary terms in the appearing tooltip by clicking the relevant button.

Front-end Example

Regenerating temporary definitions - Wiki for WordPress
Regenerating temporary definitions

To enable it, configure the following options:

Setting up the regeneration feature - Wiki WordPress Plugin
Setting up the regeneration feature
  • Enable saving the results as terms - When this option is enabled, it allows not only saving the terms to the database, but also regenerate them (before they're saved).
  • Doubleclick "Regenerate" label - Here you can change the label for the Regenerate button.

Specific Term Regeneration

You can regenerate the definition by ChatGPT for specific existing terms. To do this, while editing the term, find the metabox CM Tooltip - Term Properties.

Metabox with term properties - WordPress as a Wiki
Metabox with term properties

It has a long list of available options. At the bottom of the metabox, find and check the option Flush all API Caches for this term, then save the changes by clicking the button Update.

Flushing all API caches for chosen term - WordPress Internal Linking Plugin
Flushing all API caches for chosen term

The ChatGPT definition will be regenerated for this term.

General Glossary Regeneration

To regenerate definitions generated by ChatGPT for all your glossary terms, get back to the ChatGPT integration settings. Find the button Flush cache and click it.

Flushing the cache for all terms - WordPress Knowledge Base Plugin
Flushing the cache for all terms

All ChatGPT definitions will be regenerated.

End Result

Following instructions found in the plugin and guides you should be able to build up a glossary on your site using ChatGPT.

Use Case Front-End

Example of displaying ChatGPT definition together with manually added definition - Knowledge Base WordPress Plugin
Example of displaying ChatGPT definition together with manually added definition
Example of generating a temporary definition by double-clicking any word - Glossary Plugin WordPress
Example of generating a temporary definition by double-clicking any word
Saving temporary terms to the glossary database - Tooltip Plugin WordPress
Saving temporary terms to the glossary database
Regenerating temporary terms - Tooltip WordPress Plugin
Regenerating temporary terms

More information about the WordPress Glossary Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.