Coordinating a conversational agent with a large language model for conversation repair
In an approach to coordinating a conversational agent with a large language model for conversation repair, one or more computer processors receive a failure indicator from a first conversational agent. One or more computer processors retrieve a descriptive prompt associated with the first conversational agent. One or more computer processors transmit the descriptive prompt to a large language model. One or more computer processors transfer control of the failed conversation from the first conversational agent to the large language model. One or more computer processors determine the intent of the user associated with the failed conversation using the large language model. One or more computer processors determine whether the intent of the user associated with the failed conversation matches a capability of the first conversational agent. One or more computer processors transfer by one or more computer processors, the user back to the first conversational agent.
1 . A computer-implemented method comprising:
receiving, by one or more computer processors, a failure indicator from a first conversational agent (CA), wherein the failure indicator describes a failed conversation between the first conversational agent and a user, and wherein the first CA is a chatbot that communicates with the user on a topic for which the first CA is specifically trained;
retrieving, by one or more computer processors, a descriptive prompt associated with the first conversational agent and a transcript of the failed conversation;
transmitting, by one or more computer processors, the descriptive prompt and the transcript to a large language model;
transferring, by one or more computer processors, control of the failed conversation from the first conversational agent to the large language model;
determining, by one or more computer processors, an intent of the user associated with the failed conversation using the large language model, wherein the large language model processes the descriptive prompt and the transcript, and also engages the user in conversation, to determine the intent of the user;
determining, by one or more computer processors, whether the intent of the user associated with the failed conversation matches a capability of the first conversational agent described in the descriptive prompt; and
responsive to determining the intent of the user associated with the failed conversation matches the capability of the first conversational agent, confirming, via the large language model, with the user that the first conversational agent is correct for the intent of the user and transferring, by one or more computer processors, the user back to the first conversational agent.
2 . The computer-implemented method of claim 1 , further comprising:
passing, by one or more computer processors, one or more relevant details of the failed conversation to the first conversational agent.
3 . The computer-implemented method of claim 2 , wherein the one or more relevant details of the failed conversation include at least one of: a context of the failed conversation, the intent of the user, and other information relevant to the failed conversation.
4 . The computer-implemented method of claim 1 , further comprising:
responsive to determining the intent of the user associated with the failed conversation does not match the capability of the first conversational agent, transferring, by one or more computer processors, the user to a second conversational agent, wherein a capability of the second conversational agent matches the intent of the user.
5 . The computer-implemented method of claim 1 , further comprising:
marking, by one or more computer processors, the first conversational agent as active.
6 . The computer-implemented method of claim 1 , wherein the descriptive prompt describes at least one of a capability of the first conversational agent, a functionality of the first conversational agent, and a role that the large language model is to play on behalf of the first conversational agent.
7 . A computer program product comprising:
one or more computer readable storage medium and program instructions stored on at least one of the one or more computer readable storage medium, the program instructions executable by a processor capable of performing a method, the method comprising:
receiving a failure indicator from a first conversational agent (CA), wherein the failure indicator describes a failed conversation between the first conversational agent and a user, and wherein the first CA is a chatbot that communicates with the user on a topic for which the first CA is specifically trained;
retrieving a descriptive prompt associated with the first conversational agent and a transcript of the failed conversation;
transmitting the descriptive prompt and the transcript to a large language model;
transferring control of the failed conversation from the first conversational agent to the large language model;
determining an intent of the user associated with the failed conversation using the large language model, wherein the large language model processes the descriptive prompt and the transcript, and also engages the user in conversation, to determine the intent of the user;
determining whether the intent of the user associated with the failed conversation matches a capability of the first conversational agent described in the descriptive prompt; and
responsive to determining the intent of the user associated with the failed conversation matches the capability of the first conversational agent, confirming, via the large language model, with the user that the first conversational agent is correct for the intent of the user and transferring the user back to the first conversational agent.
8 . The computer program product of claim 7 , the method further comprising:
passing one or more relevant details of the failed conversation to the first conversational agent.
9 . The computer program product of claim 8 , wherein the one or more relevant details of the failed conversation include at least one of: a context of the failed conversation, the intent of the user, and other information relevant to the failed conversation.
10 . The computer program product of claim 7 , the method further comprising:
responsive to determining the intent of the user associated with the failed conversation does not match the capability of the first conversational transferring the user to a second conversational agent, wherein a capability of the second conversational agent matches the intent of the user.
11 . The computer program product of claim 7 , the method further comprising:
marking the first conversational agent as active.
12 . The computer program product of claim 7 , wherein the descriptive prompt describes at least one of a capability of the first conversational agent, a functionality of the first conversational agent, and a role that the large language model is to play on behalf of the first conversational agent.
13 . A computer system comprising:
one or more processors, one or more computer readable memories, one or more computer readable storage medium, and program instructions stored on at least one of the one or more computer readable storage medium for execution by at least one of the one or more processors via at least one of the one or more memories, wherein the computer system is capable of performing a method comprising;
receiving a failure indicator from a first conversational agent (CA), wherein the failure indicator describes a failed conversation between the first conversational agent and a user, and wherein the first CA is a chatbot that communicates with the user on a topic for which the first CA is specifically trained;
retrieving a descriptive prompt associated with the first conversational agent and a transcript of the failed conversation;
transmitting the descriptive prompt and the transcript to a large language model;
transferring control of the failed conversation from the first conversational agent to the large language model;
determining an intent of the user associated with the failed conversation using the large language model, wherein the large language model processes the descriptive prompt and the transcript, and also engages the user in conversation, to determine the intent of the user;
determining whether the intent of the user associated with the failed conversation matches a capability of the first conversational agent described in the descriptive prompt; and
responsive to determining the intent of the user associated with the failed conversation matches the capability of the first conversational agent, confirming, via the large language model, with the user that the first conversational agent is correct for the intent of the user and transferring the user back to the first conversational agent.
14 . The computer system of claim 13 , the method further comprising:
passing one or more relevant details of the failed conversation to the first conversational agent.
15 . The computer system of claim 14 , wherein the one or more relevant details of the failed conversation include at least one of: a context of the failed conversation, the intent of the user, and other information relevant to the failed conversation.
16 . The computer system of claim 13 , the method further comprising:
responsive to determining the intent of the user associated with the failed conversation does not match the capability of the first conversational agent, transferring the user to a second conversational agent, wherein a capability of the second conversational agent matches the intent of the user.
17 . The computer system of claim 13 , wherein the descriptive prompt describes at least one of a capability of the first conversational agent, a functionality of the first conversational agent, and a role that the large language model is to play on behalf of the first conversational agent.