WordPress Questions and Answers (CMA) - Use Case - How to Automatically Answer Posted Questions On Specific Categories With ChatGPT


Use Case - How to Automatically Answer Posted Questions On Specific Categories With ChatGPT

Back to User Guides

Note: This guide covers features from the Pro version of the WordPress Questions and Answers - This document uses version 4.7.2.

Video Use-Case


Introduction

The WordPress Questions and Answers creates a simple yet powerful WordPress Discussion Forum that is intuitive to use, easy to manage, and similar in style to the very popular forum StackOverflow. It also allows to post automatically generated answers to questions in certain categories using ChatGPT support.

Use Case Front-End

Example of asking a question with immediate automatic answer:

Asking a question and receiving an automatic answer by ChatGPT - WordPress Discussion Forum
Asking a question and receiving an automatic answer by ChatGPT

Example of the automatically generated by ChatGPT answer:

Example of the answer that is generated by ChatGPT - WordPress Q and A Plugin
Example of the answer that is generated by ChatGPT

Use Case Assumptions

In this example use case guide, we'll cover how to configure ChatGPT integration and post automatic answers on your WordPress discussion forum.

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

It follows:

Installing the Plugin

The process is the same for all CM plugins.

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

This use case guide is focused on the setting up the ChatGPT integration for posting automatic answers. We recommend you first to configure the base plugin settings. Learn more about it in this use case guide:

It will help to configure the following:

  • Creating and set up of a forum
  • Adding Forum to Site
  • User area and user area shortcodes
  • Changing the look and fill
  • Restricting access of the forum
  • Moderating questions
  • Enabling notifications for questions and answers
  • Translating the forum interface

What is ChatGPT?

ChatGPT is an AI chatbot that uses natural language processing and machine learning to generate conversations based on user input. It is based on OpenAI's GPT-3 model and can be used to create automated conversations for websites and applications.

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. Every time the plugin request an answer to a question, 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.

Learn more about Tokens and check the Pricing Plans.

In order to connect your forum with ChatGPT, you need to obtain the API Key.

Creating API Key

To get the API key, please do the following:

  1. Go to the OpenAI website at https://openai.com/.
  2. Click on the “Get Started” button.
  3. Fill in your email address and password to create a new account.
  4. Verify your email address by clicking the link sent to your email.
  5. Once you have verified your email address, log in to your OpenAI account.
  6. Click on the “API keys” link in the right-hand navigation menu.
  7. Click the “Create new Secret key” button.
  8. Copy the API key that is generated from the popup.
  9. Keep your API key safe and secure, as it provides access to your OpenAI account and services.

As creating an API key is committed on a third-party service side, so the process of obtaining an API key can have some minor changes from time to time. Follow the instructions on the OpenAI site.

Enabling ChatGPT Integration On Your Site

When the plugin is installed and activated, it creates a new user role on your site with the name AnswersChatGPTUser. The plugin uses this user account to post automatic answers.

Automatically created user for ChatGPT answers - Discussion Forum Plugin for WordPress
Automatically created user for ChatGPT answers

To configure the integration, navigate to Admin Dashboard → CM Answers Pro → Settings → General tab → ChatGPT section.

Navigation to ChatGPT integration settings - WordPress Question and Answer Plugin
Navigation to ChatGPT integration settings

The options in this section are:

ChatGPT integration settings - WordPress Forum Plugin
ChatGPT integration settings
  • Enable Chat_GPT - Turn on this option to activate ChatGPT feature.
  • Chat GPT API Key - Enter here the API key obtained from OpenAI site.
  • Category answered by Chat GPT - Choose categories where ChatGPT can give automatic answers. Let's choose a couple of categories - "Movies" and "Music".

    Selecting categories where ChatGPT will give automatic answers - WordPress Discussion Forum
    Selecting categories where ChatGPT will give automatic answers
  • Chat GPT user display name - Choose a name for ChatGPT User, which will be displayed for answers. For example, let's change it to "HAL 9000".

    Front-end username for ChatGPT user - WordPress Q and A Plugin
    Front-end username for ChatGPT user
  • Chat GPT Prompt Template - Specify the request which the plugin will be sending to ChatGPT for getting answers. Important: this template must contain one or both of the following placeholders: {question_title} and/or {question_body}. These placeholders correspond to the fields of the question title and body.

    Placeholders which correspond to certain form fields - Discussion Forum Plugin for WordPress
    Placeholders which correspond to certain form fields
  • Chat GPT Model - The plugin supports two versions of ChatGPT which you can choose - GPT 3.5 and GPT 4 (beta). Have a note that currently the version GPT 4 may not be available for you as it is in a limited beta stage and requires joining the waitlist on the OpenAI page.
  • Chat GPT AI Role - Here you can define the role for the Chat GPT assistant to make your answers more specialized. This way, if you define the assistant as an expert in some certain area, it will generate the answers 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 an answer for certain specialization. The example of the settings on the screenshot above will have the following request:

You're a helpful assistant. {question_title} {question_body}

The way how you define the AI role can have a huge affect of the result and generate totally different answers to the same question.

Here's how ChatGPT answers the question "What is the matrix?" when the ChatGPT AI Role is set to "You are a mathematician.":

Affect of the ChatGPT AI Role setting - Example #1 - WordPress Questions and Answers
Affect of the ChatGPT AI Role setting - Example #1

And here's how the same question "What is the matrix?" is answered when ChatGPT AI Role is set to "You are a cinephile.":

Affect of the ChatGPT AI Role setting - Example #2 - WordPress Question and Answer Plugin
Affect of the ChatGPT AI Role setting - Example #2
  • Chat GPT Reply Length - Set the maximum length of the reply requested from the ChatGPT. This value is set in tokens. Warning: longer replies use more tokens, so you can reach limit faster. Learn more about Pricing Plans.
  • Chat GPT Temperature - This option allows to define how accurate the generated answer 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.

When you finished configuring the settings, click the button Update at the bottom of the page to save the changes.

'Update' button - WordPress Forum Plugin
'Update' button

This is how our settings look like after setting up:

ChatGPT integration options after setting them up - WordPress Discussion Forum
ChatGPT integration options after setting them up

End Result

Following instructions found in the plugin and guides, you should be able to configure ChatGPT integration and post automatic answers on your WordPress discussion forum.

Use Case Front-End

Example of asking a question with immediate automatic answer:

Asking a question and receiving an automatic answer by ChatGPT - WordPress Q and A Plugin
Asking a question and receiving an automatic answer by ChatGPT

Example of the automatically generated by ChatGPT answer:

Example of the answer that is generated by ChatGPT - Discussion Forum Plugin for WordPress
Example of the answer that is generated by ChatGPT

Extra - Answers Experts Add-on Integration With ChatGPT

The Answers Experts Add-on also supports integration with ChatGPT. It works in a similar way. When the user asks a question, he can choose a specific expert to answer the question. You can assign a ChatGPT user as an expert in certain categories.

Learn more about it in this user guide: Answers Experts (CMA) - Integration - ChatGPT Support

ChatGPT as an expert user on the forum - WordPress Questions and Answers
ChatGPT as an expert user on the forum

More information about the WordPress Questions and Answers 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.