Utterance Generation with ChatGPT

ServisBOT supports the generation of utterances for your intents using ChatGPT.

OpenAI Secret

To begin, you will need to create a secret using your OpenAI API key.

  1. Create a new OpenAI API key on this page. Make sure to copy the API key on creation, as you will not be able to view it later. OpenAI API key page
  2. In Portal secret management, create a new secret of type Token Auth. Paste your API key into the value, replacing everything so that the value is <YOUR_API_KEY> instead of BEARER <YOUR_API_KEY>. OpenAI secret creation in Portal
  3. Save the secret.
  4. (Optional) If you wish for your API key to be used by default for all utterance generation for your org (this can be overridden later), go to the organization Settings page, and under Large Language Model Settings select your newly-created secret from the dropdown and save. Setting default org OpenAI API Key

Utterance Generation

To generate utterances, you will need to create a new intent, or open an existing intent in a bot. Utterance Generation Widget

  1. Click the widget button to open it.
  2. Edit the settings:

Opened Utterance Generation Widget

  • Intent Subject: The main topic of your intent. If you have an existing intent name or description, this field will be auto-filled by the description, or the intent name if no description is available.
  • Use org OpenAI secret: When ticked, uses an OpenAI secret set under Organization Settings. If this secret was not created, this should be unchecked, which will allow picking a different secret.

Utterance Generation Widget Alt Secret

  • Number of utterances: How many utterances you wish to generate.
  • Model temperature: Determines the ‘creativity’ of the generation - values closer to 0 tend to generate more simple, expected results. Values closer to 1 are more likely to generate novel utterances, at the risk of being unrelated to the intent if the temperature is too high.
  • Use existing utterances: If true, the model will sample your existing utterances from the intent to influence its generation.
  1. Click Generate - generation may take up to 30 seconds.
  2. When complete, the generated utterances will be displayed. These can be edited (one utterance per line) and then either copied to clipboard, appended to the end of your existing utterances, or used to replace all existing utterances. Utterance Generation Results Utterance Generation Results Applied
  3. Click Finish once done to close the widget. Your generated utterances will be removed at this point - make sure to copy or apply them to your intent before this.
  4. Save your intent.