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


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

Back to User Guides

Note: This guide covers features from: 


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 Gemini.

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 Gemini definition together with manually added definition - WordPress Knowledge Base Plugin
Example of displaying Gemini 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 Gemini.

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 Gemini 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 Gemini

Gemini, also known as Bard, is a friendly artificial intelligence chatbot created by Google. It is built on the large language model (LLM) of the same name and was developed as a direct response to the rapid growth of OpenAI's ChatGPT. Gemini was introduced in a limited capacity in March 2023 and later expanded to other countries in May. It was previously built on PaLM and initially belonged to the LaMDA family of large language models. 

How to Get Gemini API

To integrate Gemini with WordPress Glossary plugin, you will need an API key. To obtain it, you need to sign up on the Google AI Studio site. You need to register and verify your phone number. After you are registered and logged-in, head to the API Keys to create and get the key.

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

Configuring Gemini 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 Gemini. It has the following options:

Gemini integration settings - Wiki Plugin for WordPress
Gemini integration settings

Let's consider these options more detailed.

Enabling the Gemini Integration

First 2 options that we will consider are:

Enabling the Gemini integration - Wiki for WordPress
Enabling the Gemini integration
  • Enabled - Check this option to enable the integration with Gemini.
  • Gemini API Key - Enter here the API key which you obtained from the Google AI Studio 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
  • Gemini Prompt Template - Specify the request which the plugin will be sending to Gemini for getting the term definition. Important: this template must contain the placeholder {term}.
  • Gemini Reply Length - Define the maximum length of the reply from Gemini. This affects the final length of the term.
  • Gemini Temperature - This option allows to define how accurate the generated definition will be. This value ranges from 0 to 1. Lower temperatures are good for prompts that require a more deterministic and less open-ended or creative response, while higher temperatures can lead to more diverse or creative results.

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 - WordPress as a Wiki
Specifying how to display generated definitions
  • Only show Gemini when content is empty - Enable it, if you want the definition generated by Gemini 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 Gemini definition will be displayed below the definition which you wrote by yourself.
  • Show Gemini data in Tooltip - Enable it, if you want the definition generated by Gemini to be displayed in tooltips.
Example of the definition by Gemini in the tooltip - WordPress Internal Linking Plugin
Example of the definition by Gemini in the tooltip
  • Show Gemini data in Glossary term display - Enable it, if you want the definition generated by Gemini to be displayed on the term page.
Example of the definition by Gemini on the term page - WordPress Knowledge Base Plugin
Example of the definition by Gemini on the term page
  • Wrap the output from Gemini in custom HTML template - Enable it, if you want to wrap the definition generated by Gemini with custom HTML template. The template can be specified in the option Gemini Wrapper Template.
  • Gemini Wrapper Template - Specify the custom template to wrap the definition generated by Gemini. The template accepts placeholders {term} as a requested term, and {content} as an obtained definition. 

Example

Let's use the following HTML template:

<hr>Definition of <strong>{term}</strong> generated by Gemini: {content}

  1. With custom template
  2. Without custom template
Example of using a custom template - Knowledge Base WordPress Plugin
Example of using a custom template

TIP - Disabling Gemini definitions in specific terms

You can override the general plugin settings for showing definitions generated by Gemini in specific terms.

To do this, find the metabox CM Tooltip - Term Properties on the term editing page. Check the option Disable Gemini API for this term, then click the button Update to save the changes. It will completely remove any Gemini content from the tooltip and the term page:

Disabling Gemini definitions in specific terms - Glossary Plugin WordPress
Disabling Gemini definitions in specific terms

Configuring Double-click Support

The plugin supports a double-click feature with Gemini 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 Gemini. 

If somebody double-clicks some word, the definition generated by Gemini 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 - Tooltip Plugin WordPress
Double-click feature in action

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

Ecommerce settings - Tooltip WordPress Plugin
Ecommerce settings

Find the section Doubleclick settings:

Double-click settings - Wiki Plugin for WordPress
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 Gemini support - Wiki for WordPress
Enabling double-click feature with Gemini support
  • Enable doubleclick API call - Check it to turn on the double-click support.
  • Doubleclick service - Open the dropdown and choose Gemini.
  • 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 - Wiki 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 Gemini 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 - WordPress as a Wiki
Saving the generated definition to the glossary database
Stored term in the glossary - WordPress Internal Linking Plugin
Stored term in the glossary

To enable it, configure the following options:

Enabling storing temporary definitions to the glossary database - WordPress Knowledge Base 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 Gemini when content is empty in main Gemini Integration settings. This way, the Gemini definition will not be duplicated after storing the term to the database.

Displaying Gemini definitions only when the term content is empty - Knowledge Base WordPress Plugin
Displaying Gemini 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 - Glossary Plugin WordPress
Regenerating temporary definitions

To enable it, configure the following options:

Setting up the regeneration feature - Tooltip Plugin WordPress
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 Gemini for specific existing terms. To do this, while editing the term, find the metabox CM Tooltip - Term Properties.

Metabox with term properties - Tooltip WordPress Plugin
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 - Wiki Plugin for WordPress
Flushing all API caches for chosen term

The Gemini definition will be regenerated for this term.

General Glossary Regeneration

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

Flushing the cache for all terms - Wiki for WordPress
Flushing the cache for all terms

All Gemini 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 Gemini.

Use Case Front-End

Example of displaying Gemini definition together with manually added definition - Wiki WordPress Plugin
Example of displaying Gemini definition together with manually added definition
Example of generating a temporary definition by double-clicking any word - WordPress as a Wiki
Example of generating a temporary definition by double-clicking any word
Saving temporary terms to the glossary database - WordPress Internal Linking Plugin
Saving temporary terms to the glossary database

Regenerating temporary terms - WordPress Glossary 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.