Efficient multi-turn generative AI model suggested message generation
Systems and methods for using a generative artificial intelligence (AI) model using a multi-turn process to generate a suggested draft reply to a selected message. A first turn of the multi-turn process uses a shorter prompt including at least a portion of the body of the selected message and that requests multiple draft replies from the AI model. The resulting AI-generated draft replies are shortened, summarized, and/or otherwise converted into a plurality of shortened summaries that are presented as reply options to a user. Upon selecting a shortened summary, a more robust prompt is generated in a second turn with the AI model with the selected reply option to generate a more complex suggested draft reply to the selected message. Additionally, various customization options are provided, which when selected, reframe a query presented to the AI model to generate a more relevant and personalized response.
1 . A system for generating a suggested reply message using a generative artificial intelligence (AI) model, comprising:
a processor; and
memory storing instructions that, when executed by the processor, cause the system to:
receive a user-input selection of a message;
combine at least a portion of the message and a predefined request phrase to form a first prompt, the predefined request phrase requesting multiple draft replies;
provide the first prompt to a generative AI model;
receive, in response to the first prompt, a first output from the generative AI model including the draft replies;
causing a display of one or more user interface elements representing the draft replies;
receive a selection of one of the draft replies;
generate a second prompt by combining the portion of the message, data based on the selected draft reply, and additional context for the message;
provide the second prompt to the generative AI model;
receive, in response to the second prompt, a second output from the generative AI model including a suggested draft reply;
cause a display of the suggested draft reply;
display, concurrently with the suggested draft reply, one or more selectable customization user interface elements;
receive a selection of one of the one or more selectable customization user interface elements; and
in response to receiving the selection of the customization user interface element, cause the suggested draft reply to be adjusted by the generative AI model.
2 . The system of claim 1 , wherein the instructions further cause the system to parse the first output to generate a shortened summary for each of the draft replies.
3 . The system of claim 2 , wherein the instructions further cause a display of the shortened summaries as part of the one or more user interface elements representing the draft replies.
4 . The system of claim 2 , wherein the suggested draft reply is displayed concurrently with the display of the shortened summaries.
5 . The system of claim 1 , wherein the instructions further cause the system to:
inject the suggested draft reply into a reply message;
provide a send option concurrently with the reply message;
receive a selection of the send option; and
send the reply message.
6 . The system of claim 1 , wherein the additional context includes additional data regarding at least one of a sender of the message or a recipient of the message.
7 . The system of claim 6 , wherein the instructions further cause the system to:
generate a request phrase including at least a portion of the additional context for the message; and
include the generated request phrase in the second prompt.
8 . The system of claim 1 , wherein the predefined request phrase includes a defined number of draft replies to be generated.
9 . The system of claim 1 , wherein the predefined request phrase includes a length-limiting portion.
10 . The system of claim 1 , wherein the message is an email and the reply message is structured as a reply-all.
11 . The system of claim 1 , wherein causing the suggested draft reply to be adjusted by the generative AI model comprises:
generate a next prompt by combining at least the portion of the message, additional context for the message, and a customization option associated with the selected customization user interface element;
provide the next prompt to the generative AI model;
receive, in response to the next prompt, a next output from the generative AI model including a reframed suggested draft reply; and
cause a display of the reframed suggested draft reply.
12 . The system of claim 1 , wherein the one or more selectable customization user interface elements at least one of:
tone customization options; and
length customization options.
13 . A computer-implemented method for generating a suggested reply message using a generative artificial intelligence (AI) model, the method comprising:
receiving a user-input selection of a message having a body and a header;
extracting the body from the message;
combining the body and a predefined request phrase to form a first prompt, the predefined request phrase requesting multiple draft replies;
providing the first prompt as input to a generative AI model;
receiving, in response to the first prompt, a first output from the generative AI model including the multiple draft replies;
causing a display of one or more user interface element representing the draft replies;
receiving a selection of one of the draft replies;
generating a second prompt by combining the body and data based on the selected draft reply;
providing the second prompt to the generative AI model;
receiving, in response to the second prompt, a second output from the generative AI model including a suggested draft reply;
surfacing the suggested draft reply in a user interface;
displaying, concurrently with the suggested draft reply, one or more selectable customization user interface elements;
receiving a selection of one of the one or more selectable customization user interface elements; and
in response to receiving the selection of the customization user interface element, causing the suggested draft reply to be adjusted by the generative AI model.
14 . The method of claim 13 , further comprising:
parsing the first output to generate a shortened summary for each of the draft replies; and
upon generating the shortened summaries, discarding the first output.
15 . The method of claim 13 , wherein the second prompt also includes additional context for the message that includes additional data regarding at least one of:
a sender of the message;
a recipient of the message; and
historical sent message from the recipient of the message.
16 . The method of claim 13 , wherein the predefined request phrase includes at least one of:
a defined number of draft replies to be generated; and
a length-limiting portion.
17 . The method of claim 13 , further comprising:
injecting the suggested draft reply into a reply message;
providing a send option concurrently with the reply message;
receiving a selection of the send option; and
sending the reply message.
18 . The method of claim 13 , causing the suggested draft reply to be adjusted by the generative AI model comprises:
generating a next prompt by combining at least a portion of the message, additional context for the message, and data associated with the selected customization user interface element;
providing the next prompt to the generative AI model;
receiving, in response to the next prompt, a next output from the generative AI model including a reframed suggested draft reply; and
causing a display of the reframed suggested draft reply.
19 . A computer-implemented method for generating a suggested reply message using a generative artificial intelligence (AI) model, the method comprising:
causing a display of a user interface of a mobile-device email application;
receiving a user-input selection of an email from within the user interface;
causing a display of the selected email;
combining the email and a predefined request phrase to form a first prompt, the predefined request phrase requesting multiple draft replies to the email;
providing the first prompt as input to a generative AI model;
receiving, in response to the first prompt, a first output from the generative AI model including the multiple draft replies;
causing a display of the draft replies in the user interface and concurrently with the selected email;
receiving a selection of one of the draft replies;
generating a second prompt by combining the email, data based on the selected draft reply, and additional context for the message;
providing the second prompt to the generative AI model;
receiving, in response to the second prompt, a second output from the generative AI model including a suggested draft reply;
causing a display of the suggested draft reply in the user interface;
displaying, concurrently with the suggested draft reply, one or more selectable customization user interface elements;
receiving a selection of one of the one or more selectable customization user interface elements; and
in response to receiving the selection of the customization user interface element, causing the suggested draft reply to be adjusted by the generative AI model.
20 . The method of claim 19 , wherein causing the suggested draft reply to be adjusted by the generative AI model comprises:
generating a next prompt by combining at least a portion of the message, the additional context for the message, and data associated with the selected customization user interface element;
providing the next prompt to the generative AI model;
receiving, in response to the next prompt, a next output from the generative AI model including a reframed suggested draft reply; and
causing a display of the reframed suggested draft reply in the user interface.