Search

EP-4736018-A2 - NATURAL LANGUAGE GOAL DETERMINATION

EP4736018A2EP 4736018 A2EP4736018 A2EP 4736018A2EP-4736018-A2

Abstract

A method for a chat bot includes receiving multiple instruction sets corresponding to multiple goals, each instruction set defining a prompt to a large language model (LLM) to achieve a corresponding goal. The method further includes receiving a chat history from a user, comprising multiple messages, each message being one of a user-authored message or a chat bot-authored message, and further comprising metadata associated with said chat history. The method further includes identifying a particular goal of said user from the multiple goals, selecting a particular instruction set corresponding to said particular goal, and defining a particular prompt to the LLM. The method further includes executing said particular instruction set by providing said particular prompt to said LLM and providing a reply to said user with a result of executing said particular instruction set.

Inventors

  • DAVISH, Maxwell
  • TRUONG, Yen Thai
  • BRAMBLETT, Nikolas
  • SHAW, Maxwell

Assignees

  • Yext, Inc.

Dates

Publication Date
20260506
Application Date
20240627

Claims (20)

  1. 1. A method for a chat hot, comprising: receiving a plurality of instruction sets corresponding to a plurality of goals, each instruction set in said plurality of instruction sets defining a prompt to a large language model to achieve a corresponding goal in said plurality of goals; receiving a chat history from a user, said chat history comprising a plurality of messages, each message in said plurality of messages being one of a user-authored message or a chat bot- authored message, and said chat history further comprising metadata associated with said chat history; identifying a particular goal of said user from said plurality of goals; selecting a particular instruction set from said plurality of instruction sets, said particular instruction set corresponding to said particular goal and defining a particular prompt to said large language model; executing said particular instruction set by providing said particular prompt to said large language model; and providing a reply to said user with a result of executing said particular instruction set.
  2. 2. The method of claim 1, wherein said metadata comprises at least one of said particular goal, a first index identifying a previously executed instruction in said particular instruction set, and a second index corresponding to a message in said plurality of messages.
  3. 3. The method of claim 2, wherein executing said particular instruction set further comprises: based on said first index, selecting a particular instruction from said particular instruction set; executing said particular instruction; and updating said first index in said metadata to identify said particular instruction.
  4. 4. The method of claim 3, wherein said particular prompt is a first prompt, and executing said particular instruction comprises: defining a second prompt to said large language model, said second prompt comprising said particular instruction and said chat history; and providing said second prompt to said large language model.
  5. 5. The method of claim 3, wherein said particular instruction includes one of requesting information relevant to said particular goal from said user and generating a query to an external database for data relevant to said particular goal.
  6. 6. The method of claim 2, wherein determining the particular goal comprises determining that said metadata comprises an identifier for the particular goal.
  7. 7. The method of claim 2, wherein said particular prompt is a first prompt, and determining the particular goal comprises: defining a second prompt to said large language model, said second prompt comprising said chat history and said plurality of goals; providing said second prompt to said large language model; receiving an output from said large language model, said output comprising said particular goal; and updating said metadata to include said particular goal.
  8. 8. The method of claim 1, wherein said particular prompt comprises instructions for collecting information relevant to said particular goal from the user, by generating a user prompt, providing said user prompt to said user, and receiving a reply from said user in response to said user prompt, wherein said reply comprises said information.
  9. 9. The method of claim 8, wherein said particular prompt comprises instructions for performing a call to an application programming interface, wherein said call comprises said information relevant to said particular goal received from said user.
  10. 10. The method of claim 8, wherein said particular prompt comprises instructions for performing a function call, wherein said function call comprises said information relevant to said particular goal received from said user.
  11. 11. The method of claim 8, further comprising updating said metadata to include said information.
  12. 12. The method of claim 1, wherein said particular prompt comprises instructions for generating a query to an external database for data relevant to said particular goal, providing said query to said external database, and receiving a response from said external database, wherein said response comprises said data.
  13. 13. The method of claim 12, wherein said particular prompt comprises instructions for performing a call to an application programming interface, wherein said call comprises said data relevant to said particular goal received from said external database.
  14. 14. The method of claim 12, wherein said particular prompt comprises instructions for performing a function call, wherein said function call comprises said data relevant to said particular goal received from said external database.
  15. 15. The method of claim 12, further comprising updating said metadata to include said data.
  16. 16. The method of claim 1, wherein said particular prompt comprises conditional logic to execute a subset of instructions in said particular instruction set.
  17. 17. A non-transitory computer-readable medium storing a set of instructions for a chat bot, which when executed by a computer, configure the computer to: receive a plurality of instruction sets corresponding to a plurality of goals, each instruction set in said plurality of instruction sets defining a prompt to a large language model to achieve a corresponding goal in said plurality of goals; receive a chat history from a user, said chat history comprising a plurality of messages, each message in said plurality of messages being one of a user-authored message or a chat bot- authored message, and said chat history further comprising metadata associated with said chat history; identify a particular goal of said user from said plurality of goals; select a particular instruction set from said plurality of instruction sets, said particular instruction set corresponding to said particular goal and defining a particular prompt to said large language model; execute said particular instruction set by providing said particular prompt to said large language model; and provide a reply to said user with a result of executing said particular instruction set.
  18. 18. The non-transitory computer-readable medium of claim 17, wherein said metadata comprises at least one of said particular goal, a first index identifying a previously executed instruction in said particular instruction set, and a second index corresponding to a message in said plurality of messages.
  19. 19. The non-transitory computer-readable medium of claim 18, wherein executing said particular instruction set further comprises: based on said first index, selecting a particular instruction from said particular instruction set; executing said particular instruction; and updating said first index in said metadata to identify said particular instruction.
  20. 20. The non-transitory computer-readable medium of claim 18, wherein said particular prompt is a first prompt, and executing said particular instruction comprises: defining a second prompt to said large language model, said second prompt comprising said particular instruction and said chat history; and providing said second prompt to said large language model.

Description

NATURAL LANGUAGE GOAL DETERMINATION CROSS-REFERENCE TO RELATED APPLICATION [0001] The present application claims priority benefit of the filing date of U.S. Non-Provisional Patent Application No. 18/343,498, filed June 28, 2023, which is herein incorporated by reference in its entirety. BACKGROUND 1. Technical Field [0002] Currently claimed embodiments of the invention relate to using natural language processing for user goal determination, and more specifically, artificial intelligence-powered chat assistants. 2. Discussion of Related Art [0003] Conventional Al conversational assistants often fall short in customization and the ability to operate effectively across various platforms. They are typically restricted by their preprogrammed functions, and utilize rigid decision trees, thereby limiting their ability to cater to specific needs of users in varied domains. Furthermore, existing solutions lack a robust way of intelligently gathering user information and formulating responses based on comprehensive data analysis. SUMMARY [0004] According to an embodiment of the invention, a method for a chat bot includes receiving multiple instruction sets corresponding to multiple goals, each instruction set in the plurality of instruction sets defining a prompt to a large language model to achieve a corresponding goal in the plurality of goals. The method further includes receiving a chat history from a user, the chat history comprising multiple messages, each message in the multiple messages being one of a user-authored message or a chat bot-authored message, and the chat history further comprising metadata associated with the chat history. The method further includes identifying a particular goal of the user from the multiple goals, and selecting a particular instruction set from the multiple instruction sets, the particular instruction set corresponding to the particular goal and defining a particular prompt to the LLM. The method further includes executing the particular instruction set by providing the particular prompt to the LLM and providing a reply to the user with a result of executing the particular instruction set. [0005] According to an embodiment of the invention, a non-transitory computer-readable medium stores a set of instructions for a chat bot, which when executed by a computer, configure the computer to receive multiple instruction sets corresponding to multiple goals, each instruction set in the plurality of instruction sets defining a prompt to a large language model (LLM) to achieve a corresponding goal in the plurality of goals. The instructions, when executed by the computer, further configure the computer to receive a chat history from a user, the chat history comprising multiple messages, each message in the plurality of messages being one of a user-authored message or a chat bot-authored message, and the chat history further comprising metadata associated with the chat history. The instructions, when executed by the computer, further configure the computer to identify a particular goal of the user from the plurality of goals, and select a particular instruction set from the plurality of instruction sets, the particular instruction set corresponding to the particular goal and defining a particular prompt to the LLM. The instructions, when executed by the computer, further configure the computer to execute the particular instruction set by providing the particular prompt to the LLM and provide a reply to the user with a result of executing the particular instruction set. BRIEF DESCRIPTION OF THE DRAWINGS [0006] Further objectives and advantages will become apparent from a consideration of the description, drawings, and examples. [0007] FIG. 1A conceptually shows a system, according to some embodiments. [0008] FIG. IB shows an example of a chat history, according to some embodiments. [0009] FIG. 1C shows an example of a bot configuration, according to some embodiments. [0010] FIG. 2 shows an example of generating a prompt from a prompt template, according to some embodiments. [0011] FIG. 3 shows a process of some embodiments for responding to a user query. [0012] FIG. 4 shows examples of a request and a response, according to some embodiments. [0013] FIG. 5 shows an example of a debug message, according to some embodiments. [0014] FIG. 6 shows an example of the flow of data during a server-sent event, according to some embodiments. [0015] FIG. 7A shows a simple conversational example, according to some embodiments. [0016] FIG. 7B shows a direct answer example, according to some embodiments. [0017] FIG. 7C shows an example of a search step, according to some embodiments. [0018] FIG. 7D shows an example of a collect step, according to some embodiments. [0019] FIG. 7E shows an end-to-end example that combines a collect, a REST API, and a reply step, according to some embodiments. [0020] FIG. 7F shows an example of a function, according to some embodiments. [0021] FIG. 7G shows an example o