The "Conversation Analysis (GPT)" block analyzes voice files or messages with ChatGPT, checks for compliance with specified criteria and transmits the result. It can be used, for example, to analyze dialogues of managers with clients. The block can parse the dialog history or use the results of the "Voice File Parsing (GPT)" block.
For the block to work in the bot, you need to connect the ChatGPT model. See the Connecting ChatGPT article for detailed instructions.
Setting up the Block
- In the Script Editor, add the Conversation Analysis (GPT) block to the workspace.
- If you want to analyze a dialog, select "Dialog History".
To specify the number of messages to analyze, select "Number of messages" and enter a number.
To set the number of hours the messages have been received for analysis, select "Hours" and enter a number. - Select Voice File Parsing Block Result to analyze the result of the Voice File Parsing block.
Enter the result of the Voice File Parsing block in the text box. To do this, enter two curly braces "{{", select "Block Result" - "Voice File Parsing (GPT)" -- "transcription".
4. To specify a list of criteria that the block will analyze, click "Criteria to analyze". The parameters are divided into "Negative" and "Positive".
5. Select the criteria you want to use from the list.
To delete a criterion, click the cross next to its name.
6. To add a new criterion, enter it in the "Add criterion" field and click "Enter".
You can create any criterion that ChatGPT can analyze. For example, "Operator is rude". The block will return a result, either "True" or "False".
7. You can create any criterion that ChatGPT can analyze. For example, "Operator is rude". The block will return a result, either "True" or "False".
8. The results of the analysis are stored in variables that correspond to the specified criteria - you can see them in the block results. See the Block Results article for more information about using block results.
Here is an example of a scenario in the Bot Constructor
For example, you can create an assistant bot and send it transcripts of conversations between operators and clients. If the client is dissatisfied - the supervisor will receive a notification in Messenger. If a customer thanks an operator, the operator will also receive a notification.
In the scenario shown:
- The "Start Block" responds to an incoming voice message with a recorded conversation with the client.
- The "Message Waiting" block is needed for the "Voice File Parsing (GPT)" block to wait for a message with a recorded conversation.
- The Voice File Parsing (GPT) block converts the voice file into text.
- The "Conversation Analysis (GPT)" block analyzes the results of the "Voice Message Parsing" block. The block has two criteria: "The customer is dissatisfied" and "The customer thanks the operator".
- The "Condition" block creates two variants of scenario development: if the " Client was dissatisfied" criterion is true according to the analysis results, the "Send Message*" block sends the "Client was dissatisfied" message to the supervisor. If, according to the analysis results, the criterion " Client thanks the operator " is true, the second block "Send message*" sends the message " Client thanks the operator " to the manager.