GPT Conversation (Research preview)¶
Deprecation
The GPT Conversation Node is deprecated and can no longer be created in Cognigy.AI v4.85 and later. Use the LLM Prompt Node to generate messages with LLM services.
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 AI 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 AI 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 AI Agent. |
Character | Text | The character traits of the AI Agent. For example, is the AI Agent professional or patient ? Enter phrases that describe your agent's personality. |
Strictness | Select | The level of adherence expected from the AI 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 AI 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 AI 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 AI Agent, such as topics that should be avoided during the conversation. |
Grounding¶
Grounding Knowledge is the foundational information that the AI 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 AI Agent to build a factual response. |
Injected Slots | CognigyScript | Slots you want to send to the AI 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 AI 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:
- 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. - After the GPT Conversation Node, add the Lookup Node.
- Go to the Lookup Node:
3.1 Select CognigyScript from the Type list.
3.2 Entercontext.action
in the Operator field.
3.3 Click Save Node. - Go to the Case of the Lookup Node:
4.1 PastecheckAppointment
in the Value field.
4.2 Click Save Node. - In the Flow editor, add the additional Say Node with the Text type output. You can also use the HTTP Node.
- Test this Flow via the Interaction Panel.
- 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. - After the GPT Conversation Node, add the IF Node.
- Go to the IF Node:
3.1 Select CognigyScript from the Type list.
3.2 Entercontext.action === "checkAppointment"
in the Condition field.
3.3 Select exists from the list. 3.4 Click Save Node. - In the Flow editor, add the additional Say Node with the Text type output. You can also use the HTTP Node.
- Test this Flow via the Interaction Panel.