Skip to content

GPT Conversation (Research preview)

Version badge

Description

Warning

This Node is part of Cognigy's large-language-model research efforts and is intended solely as a preview feature. The GPT Conversation Node is not intended for production use.

The GPT Conversation Node processes and comprehends natural language input from users and utilizes this input to generate relevant and contextual appropriate responses. The Node configuration includes defining a persona, knowledge, and task for the virtual agent, allowing it to generate AI-based responses to user inputs and trigger actions. The GPT Conversation Node can support the entire conversation using Large Language Models (LLMs).

Before using this Node, set the Generative AI provider in the Settings.

Settings

Mode

Select one of these modes:

  • QnA โ€” is focused on answering user questions based on pre-existing knowledge of the conversation topic.
  • Transactional โ€” is focused on answering user questions based on pre-existing knowledge of the conversation topic and strict sequence of virtual agent's steps. In this mode, you can call an action, which should be handled in Flow logic after the GPT Conversation Node. You can use the Lookup and If Nodes to check if the context has the action and then perform a specific task accordingly, for example, create an HTTP request.

Persona

Parameter Type Description
Company Name CognigyScript The name of the company.
Company Description CognigyScript Company's current activities: What is your company doing?
Bot Name CognigyScript The name of the virtual agent.
Character Text The character traits of the virtual agent. For example, is the virtual agent professional or patient? Enter phrases that describe your agent's personality.
Strictness Select The level of adherence expected from the virtual agent regarding the task:
- Trivia and small talk โ€” including trivia and small talk.
- Stick to the task โ€” strictly sticking to the task.
- Some small talk โ€” incorporating some small talk.
- Complete free style โ€” engaging in completely free-form conversation.

Task Settings

Available only in Transactional mode.

Parameter Type Description
Bot Task CognigyScript Task for the virtual agent. Examples: book an appointment, rebook a flight, order a product.
Steps CognigyScript Description of task steps.
Step Analytics Labels Text Labels of the steps to be used in analytics.
Slots to collect Text The keys of the slots to collect
Available Actions Text Actions the virtual agent can trigger. You can reuse these actions in the Lookup or If Nodes to check if the context has the action and then perform a specific task accordingly, for example, create an HTTP request. For more information, read Specific Example.
Further Information CognigyScript Additional information for the virtual agent, such as topics that should be avoided during the conversation.

Grounding

Grounding Knowledge is the foundational information that the virtual agent has access to, enabling it to not only construct factual responses but also understand the context of user queries and generate accurate, contextually relevant, and coherent information.

Parameter Type Description
Grounding Mode Select Choose how grounding knowledge is acquired. The following modes are available:
- Perform Knowledge Search โ€” retrieves data from the specific Knowledge Store.
- Enter Custom Grounding Knowledge โ€” retrieves data from the knowledge you provided in the Grounding Knowledge field.
- Do not inject grounding knowledge โ€” deactivates grounding mode.
Knowledge Store Select/CognigyScript This field appears if you selected the Perform Knowledge Search grounding mode.

Select the Knowledge Store to use. You can add a value manually using CognigyScript.
Grounding Knowledge CognigyScript This field appears if you selected the Enter Custom Grounding Knowledge grounding mode.

Custom definable knowledge helping the virtual agent to build a factual response.
Injected Slots CognigyScript Slots you want to send to the virtual agent. They will be appended to the user input.

Advanced

Parameter Type Description
Temperature Indicator The appropriate sampling temperature for the model. Higher values mean the model will take more risks.
Maximal Tokens Indicator The maximum number of tokens to generate in the completion.
Presence Penalty Indicator Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood of talking about new topics.
Frequency Penalty Indicator Number between -2.0 and 2.0. The penalty assigns a lower probability to tokens frequently appearing in the generated text, encouraging the model to generate more diverse and unique content.
Use Stops Toggle Whether to use a list of stop words to let Generative AI know where the sentence stops.
Stops Text Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.

Timeout Settings

Parameter Type Description
Timeout Select The maximum amount of milliseconds to wait for a response from the Generative AI Provider.
Timeout Message CognigyScript The message to output if the timeout is hit.

Examples

General example

This video shows a live example of how the GPT Conversation Node can generate text based on the user input.

At 0:12 seconds, the user receives the expected answer from the virtual agent in the form of generated Conversational AI text.

Sorry to hear about the emergency, <user name>. 
Can you provide me with your ticket number 
so that I can help you get to London as quickly as possible? 
Thank you.

Specific example

In the Transaction mode, you can use the Lookup or If to continue a flow logic.

For both Nodes, you need to specify the action in the Available Actions field of the GPT Conversation Node. To do this, select the Node:

  1. Go to the GPT Conversation Node, select the Transaction mode and check if the checkAppointment parameter exists in the Available Actions field. If not, add this value and copy it.
  2. After the GPT Conversation Node, add the Lookup Node.
  3. Go to the Lookup Node:
    3.1 Select CognigyScript from the Type list.
    3.2 Enter context.action in the Operator field.
    3.3 Click Save Node.
  4. Go to the Case of the Lookup Node:
    4.1 PastecheckAppointment in the Value field.
    4.2 Click Save Node.
  5. In the Flow editor, add the additional Say Node with the Text type output. You can also use the HTTP Node.
  6. Test this Flow via the Interaction Panel.
  1. Go to the GPT Conversation Node, select the Transaction mode and check if the checkAppointment parameter exists in the Available Actions field. If not, add this value and copy it.
  2. After the GPT Conversation Node, add the IF Node.
  3. Go to the IF Node:
    3.1 Select CognigyScript from the Type list.
    3.2 Enter context.action === "checkAppointment" in the Condition field.
    3.3 Select exists from the list. 3.4 Click Save Node.
  4. In the Flow editor, add the additional Say Node with the Text type output. You can also use the HTTP Node.
  5. Test this Flow via the Interaction Panel.

More Information