Service platform integration with generative natural language models
An example embodiment may include: receiving, from an application, a request, wherein the request includes textual content; in response to receiving the request, determining a context relating to the textual content; generating, from the textual content and the context, a prompt for a natural language model; transmitting, to the natural language model, the prompt; receiving, from the natural language model, a response to the prompt, wherein the response includes information relevant to the request or programmatic commands; and providing, to the application, further textual content that is based on the response.
1 . A method comprising:
receiving, from an application, a request, wherein the request includes textual content;
in response to receiving the request, determining a context relating to the textual content;
determining, using a skill mapper application, a set of skills corresponding to the request;
generating, based on (i) the textual content, (ii) the set of skills, and (iii) the context, a prompt for a natural language model by modifying at least one canonical prompt;
transmitting, to the natural language model, the prompt;
receiving, from the natural language model, a response to the prompt, wherein the response includes programmatic commands;
invoking a skill of the set of skills based on the response, wherein invoking the skill comprises executing at least some of the programmatic commands on a computing device associated with the application; and
providing, to the application, further textual content that is based on the response and a result of invoking the skill.
2 . The method of claim 1 , wherein receiving the request includes:
receiving user speech data; and
converting the user speech data to the textual content.
3 . The method of claim 1 , wherein the natural language model comprises a large language model.
4 . The method of claim 3 , wherein the large language model is transformer-based.
5 . The method of claim 1 , wherein the application is associated with a user interface, and wherein the user interface includes a dialog interface.
6 . The method of claim 5 , wherein the dialog interface can be hidden, pinned, modeless, or docked to other parts of the user interface.
7 . The method of claim 5 , wherein the request and the further textual content is conveyed by way of the dialog interface.
8 . The method of claim 5 , wherein the response includes one or more graphical images, and wherein the one or more graphical images can be moved or copied from the dialog interface to other parts of the user interface.
9 . The method of claim 1 , wherein generating the prompt for the natural language model includes accessing one or more of a database table, an event log, a user profile, a user history, or a service external to a system on which the application is operable.
10 . The method of claim 9 , wherein the prompt for the natural language model is based on information from one or more of the database table, the event log, the user profile, the user history, or the service.
11 . The method of claim 1 , wherein the further textual content is relevant to the request.
12 . The method of claim 1 , wherein determining the context relating to the textual content comprises determining the context based on one or more of application information relating to the application or user information relating to a user who made the request.
13 . The method of claim 1 , wherein the skill is specified in a structured data format including an identifier, description, trigger, and action.
14 . The method of claim 1 , wherein the skill is specified in a structured data format that can be interpreted or executed to invoke the skill.
15 . The method of claim 1 , wherein the natural language model is a semantic search model that selects the response based on a semantic similarity analysis between the prompt and the response.
16 . The method of claim 1 , further comprising:
requesting, based on the at least one canonical prompt, additional information corresponding to the request; and
receiving the additional information corresponding to the request, wherein generating the prompt for the natural language model is further based on the additional information.
17 . A non-transitory computer-readable medium, having stored thereon program instructions that, upon execution by a computing system, cause the computing system to perform operations comprising:
receiving, from an application, a request, wherein the request includes textual content;
in response to receiving the request, determining a context relating to the textual content;
determining, using a skill mapper application, a set of skills corresponding to the request;
generating, based on (i) the textual content, (ii) the set of skills, and (iii) the context, a prompt for a natural language model by modifying at least one canonical prompt;
transmitting, to the natural language model, the prompt;
receiving, from the natural language model, a response to the prompt, wherein the response includes programmatic commands;
invoking a skill of the set of skills based on the response, wherein invoking the skill comprises executing at least some of the programmatic commands on a computing device associated with the application; and
providing, to the application, further textual content that is based on the response and a result of invoking the skill.
18 . A system comprising:
one or more processors; and
memory, containing program instructions that, upon execution by the one or more processors, cause the system to perform operations comprising:
receiving, from an application, a request, wherein the request includes textual content;
in response to receiving the request, determining a context relating to the textual content;
determining, using a skill mapper application, a set of skills corresponding to the request;
generating, based on (i) the textual content, (ii) the set of skills, and (iii) the context, a prompt for a natural language model by modifying at least one canonical prompt;
transmitting, to the natural language model, the prompt;
receiving, from the natural language model, a response to the prompt, wherein the response includes programmatic commands;
invoking a skill of the set of skills based on the response, wherein invoking the skill comprises executing at least some of the programmatic commands on a computing device associated with the application; and
providing, to the application, further textual content that is based on the response and a result of invoking the skill.