WordPress Glossary Plugin (CMTG) - Integrations - Gemini


Adding Content Generated by Gemini to the Glossary

Back to User Guide

Note: This feature is available only in the Ecommerce edition since the version 4.3.4 of the WordPress Glossary plugin.

Introduction

The plugin allows to automatically generate definitions for glossary terms using 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.

Front-end Example

Example of the Gemini definition generated for empty term:

Example of the Gemini definition generated for empty term - WordPress Knowledge Base Plugin
Example of the Gemini definition generated for empty term

Example of displaying Gemini definition together with manually added definition:

Example of displaying Gemini definition together with manually added definition - Knowledge Base WordPress Plugin
Example of displaying Gemini definition together with manually added definition

Enabling Gemini in the Plugin Settings

To find the settings of the integration, navigate to Admin Dashboard â†’ CM Tooltip Glossary Ecommerce → Settings â†’ Ecommerce Settings tab.

Ecommerce settings - Glossary Plugin WordPress
Ecommerce settings

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

Gemini integration settings - Tooltip Plugin WordPress
Gemini integration settings
  • Enabled - Enable the feature to automatically generate term definitions using Gemini.
  • Gemini API Key - In order to make the feature work, you need to enter Google AI Studio and obtain there an API key. It's simple - head to the site, sign up and follow the instructions.
  • 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.
  • Only show Gemini when content is empty - Enable it, if you want the definition generated by Gemini to be displayed 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 shown 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.

    Displaying Gemini definition in the tooltip - Tooltip WordPress Plugin
    Displaying Gemini definition 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.

    Displaying Gemini definition on the term page - Wiki Plugin for WordPress
    Displaying Gemini definition 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 {term} generated by Gemini: {content}

    1. With custom template
    2. Without custom template

      Example of using custom HTML template - Wiki for WordPress
      Example of using custom HTML template
  • Flush the Cache - Click this button to clean the database from third-party services definitions, including definition generated by Gemini. Once the definition of the term is generated, the plugin stores the Gemini definitions in the database to save the resources and to make sure that the content of your website stays the same. But if you want to, you can flush the cache and have AI regenerate the answer. 

Disabling Gemini definitions in specific terms

You can override the plugin general 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 API for the specific term - Wiki WordPress Plugin
Disabling Gemini API for the specific term


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-clicked on some word, the definition generated by Gemini will be cached on your site. So the plugin will not request this word every time somebody double clicks on it, as the result is already stored on your site (until you flush the cache).

Front-end Example

Using double-click feature - WordPress as a Wiki
Using double-click feature

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

Ecommerce settings - WordPress Internal Linking Plugin
Ecommerce settings

Find the section Doubleclick settings. The options are:

Double-click settings - WordPress Knowledge Base Plugin
Double-click settings
  • Enable doubleclick API call - Enable this option.
  • Doubleclick service - Open the dropdown and choose Gemini.
  • Enable saving the results as terms - If this option is enabled, the admin will be able to save the generated by Gemini definition from the front-end. It's just enough to click Save in the appearing tooltip, and the new term will be created in your glossary. It also allows to regererate the definition by clicking the relevant button in case if the result is not appropriate.

    Example of regenerating and saving the temporary term - Knowledge Base WordPress Plugin
    Example of regenerating and saving the temporary term
  • Doubleclick "Save" label - Here you can change the label for the Save button.
  • Doubleclick "Regenerate" label - Here you can change the label for the Regenerate button.
  • Doubleclick underline color - Here you can define the underline color for a temporary tooltip which is generated by the Doubleclick 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 - Glossary Plugin WordPress
    Example of the temporary tooltip definition which is underlined with different color

Click the button Save Changes at the bottom of the page.

Saving the changes - Tooltip Plugin WordPress
Saving the changes

Important

The main Gemini settings should be enabled and configured to work with Double-click feature.

Enabling the Gemini feature - Tooltip WordPress Plugin
Enabling the Gemini feature

Learn more about other integrations supported by DoubleClick API: WordPress Glossary Plugin (CMTG) - Integrations - Double Click


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.