Method, system, and computer program product for integrating a finite state machine (FSM) in a chatbot system
Integrating a FSM graph with a chatbot system addresses context management and sensitive data handling issues in LLMs, enhancing conversation quality and security.
Patent Information
- Application Number
- PCT/US2025/022662
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-03
- Filing Date
- 2025-04-02
- Publication Date
- 2025-10-09
AI Technical Summary
Large language models (LLMs) in chatbots struggle with context management and controlling response messages during intricate conversations, leading to challenges in maintaining user intent and handling sensitive data effectively.
Integrating a finite state machine (FSM) graph with a chatbot system to manage dialog flows, where each state includes executable functions, and using a LLM to generate responses based on the FSM graph, ensuring context continuity and handling sensitive data through de-identification.
Enhances context management in chatbot conversations and securely handles sensitive data by maintaining dialog flow and transforming sensitive information, improving user interaction and data privacy.
Smart Images

Figure US2025022662_09102025_PF_FP_ABST
Abstract
Description
METHOD, SYSTEM, AND COMPUTER PROGRAM PRODUCT FOR INTEGRATING A FINITE STATE MACHINE (FSM) IN A CHATBOT SYSTEMCROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims the benefit of U.S. Provisional Application Nos. 63 / 573,943 and 63 / 574,033, filed April 3, 2024, respectively, the disclosures of which are hereby incorporated by reference in their entireties.BACKGROUND1 . Technical Field
[0002] This disclosure relates generally to chatbot systems and, in non-limiting embodiments or aspects, to systems, methods, and computer program products for integrating a finite state machine (FSM) in a chatbot system.2. Technical Considerations
[0003] A chatbot refers to a system which conducts a conversation via auditory or textual methods. Such systems may be designed to convincingly simulate how a human would behave as a conversational partner. In some instances, chatbots may use natural language processing systems. In other instances, chatbots scan for keywords within an input, then receive a reply with the most matching keywords as the input and / or the most similar wording pattern as the input from a database.
[0004] In some instances, chatbots may be used in dialog systems for customer service and / or information acquisition. As an example, an issuer system may wish to provide chatbot services to its account holders.
[0005] While large language models (LLMs) of chatbots are adept at natural language understanding and conversation, context management with changing user intent during the conversation is a challenge for LLMs, which can become lost during intricate dialogs. Moreover, controlling response messages of the LLM can be difficult.SUMMARY
[0006] Accordingly, provided are improved systems, methods, and computer program products for integrating a finite state machine (FSM) in a chatbot system.
[0007] According to non-limiting embodiments or aspects, provided is a computer- implemented method including: storing, with a chatbot system including at least one processor, at least one finite state machine (FSM) graph, the at least one FSM graph including a plurality of states connected in a directed graph, the at least one FSM graph associated with a dialog flow type, each state of the plurality of states including at least one function configured to be executed during the state; receiving, with thechatbot system, a message from a user device of a user, the message including text; automatically determining, with the chatbot system, that the text is associated with the dialog flow type; in response to determining that the text is associated with the dialog flow type, retrieving, with the chatbot system, the at least one FSM graph and the at least one function configured to be applied during each of the plurality of states of the at least one FSM graph; inputting, with the chatbot system, the text, the at least one FSM graph, and the at least one function into a large language model (LLM), causing the LLM to generate a response message to the text based on the at least one FSM graph, at least one state of the plurality of states of the at least one FSM graph, and / or at least one function of the at least one state; receiving, with the chatbot system, the response message from the LLM; and outputting, with the chatbot system, the response message to the user device.
[0008] In some non-limiting embodiments or aspects, the computer-implemented method may further include: configuring, with an issuer system, a plurality of FSM graphs including the at least one FSM graph by, for each FSM graph of the plurality of FSM graphs: generating a plurality of states, each of the plurality of states including a function; connecting the plurality of states in the directed graph; and associating at least one dialog flow type with the FSM graph.
[0009] In some non-limiting embodiments or aspects, the LLM may execute a function of a first state of the plurality of states.
[0010] In some non-limiting embodiments or aspects, determining that the text is associated with the dialog flow type may be based on the text and a dialog history of dialog with the user device.
[0011] In some non-limiting embodiments or aspects, the computer-implemented method may further include: in response to receiving the text, the at least one FSM graph, and the at least one function, determining, with the LLM, a function of the at least one function to be executed based on at least one of the following: the text, the at least one FSM graph, the at least one function, and / or any combination thereof.
[0012] In some non-limiting embodiments or aspects, the function to be executed may include a transition from a first state in the at least one FSM graph to a second state in the at least one FSM graph, the computer-implemented method may further include: traversing, with the LLM, the at least one FSM graph from the first state to the second state.
[0013] In some non-limiting embodiments or aspects, the LLM may be precluded from executing a function different from the at least one function during traversal of the at least one FSM graph.
[0014] In some non-limiting embodiments or aspects, the function to be executed may include generating the response message to the text, the computer-implemented method may further include: generating, with the LLM, the response message to the text based on the text; and transmitting, with the LLM, the response message to the chatbot system.
[0015] In some non-limiting embodiments or aspects, the computer-implemented method may further include: determining, with the LLM, that the function to be executed is not part of a current state of the at least one FSM graph; and generating and transmitting, with the LLM, the response message to the chatbot system based on the function to be executed not being part of the current state of the at least one FSM graph.
[0016] In some non-limiting embodiments or aspects, the computer-implemented method may further include: automatically determining, with the chatbot system, that at least a portion of the text includes a sensitive data element; generating, with the chatbot system, a de-identified data element based on the sensitive data element; modifying, with the chatbot system, the message by replacing the sensitive data element with the de-identified data element to form a modified message; transmitting, with the chatbot system, the modified message containing the de-identified data element to the LLM, the LLM remote from the chatbot system; receiving, with the chatbot system, the response message from the LLM, the response message including second text, the second text including the de-identified data element; in response to receiving the response message including the second text, retrieving, with the chatbot system, the sensitive data element associated with the de-identified data element; modifying, with the chatbot system, the response message by replacing the de-identified data element with the sensitive data element to form a modified response message; and outputting, with the chatbot system, the modified response message containing the sensitive data element to the user device.
[0017] In some non-limiting embodiments or aspects, the chatbot system may be a component of a transaction processing system and / or an issuer system, and the LLM may be remote from and not a component of the transaction processing system and / or the issuer system.
[0018] In some non-limiting embodiments or aspects, the message and the response message may be part of a dialog between the user device and the LLM.
[0019] In some non-limiting embodiments or aspects, the dialog may be associated with an electronic payment transaction of the user.
[0020] According to non-limiting embodiments or aspects, provided is a system including a chatbot system including at least one processor configured to: store at least one finite state machine (FSM) graph, the at least one FSM graph including a plurality of states connected in a directed graph, the at least one FSM graph associated with a dialog flow type, each state of the plurality of states including at least one function configured to be executed during the state; receive a message from a user device of a user, the message including text; automatically determine that the text is associated with the dialog flow type; in response to determining that the text is associated with the dialog flow type, retrieve the at least one FSM graph and the at least one function configured to be applied during each of the plurality of states of the at least one FSM graph; input the text, the at least one FSM graph, and the at least one function into a large language model (LLM), causing the LLM to generate a response message to the text based on the at least one FSM graph, at least one state of the plurality of states of the at least one FSM graph, and / or at least one function of the at least one state; receive the response message from the LLM; and output the response message to the user device.
[0021] In some non-limiting embodiments or aspects, the system may further include an issuer system configured to: configure a plurality of FSM graphs including the at least one FSM graph by, for each FSM graph of the plurality of FSM graphs: generating a plurality of states, each of the plurality of states including a function; connecting the plurality of states in the directed graph; and associating at least one dialog flow type with the FSM graph.
[0022] In some non-limiting embodiments or aspects, the LLM may execute a function of a first state of the plurality of states.
[0023] In some non-limiting embodiments or aspects, determining that the text is associated with the dialog flow type may be based on the text and a dialog history of dialog with the user device.
[0024] In some non-limiting embodiments or aspects, the system further including the LLM configured to: in response to receiving the text, the at least one FSM graph, and the at least one function, determine a function of the at least one function to beexecuted based on at least one of the following: the text, the at least one FSM graph, the at least one function, and / or any combination thereof.
[0025] In some non-limiting embodiments or aspects, the function to be executed may include a transition from a first state in the at least one FSM graph to a second state in the at least one FSM graph, the LLM further configured to: traverse the at least one FSM graph from the first state to the second state.
[0026] In some non-limiting embodiments or aspects, the LLM may be precluded from executing a function different from the at least one function during traversal of the at least one FSM graph.
[0027] In some non-limiting embodiments or aspects, the function to be executed may include generating the response message to the text, the LLM further configured to: generate the response message to the text based on the text; and transmit the response message to the chatbot system.
[0028] In some non-limiting embodiments or aspects, the LLM may be further configured to: determine that the function to be executed is not part of a current state of the at least one FSM graph; and generate and transmit the response message to the chatbot system based on the function to be executed not being part of the current state of the at least one FSM graph.
[0029] In some non-limiting embodiments or aspects, the chatbot system may be further configured to: automatically determine that at least a portion of the text includes a sensitive data element; generate a de-identified data element based on the sensitive data element; modify the message by replacing the sensitive data element with the de-identified data element to form a modified message; transmit the modified message containing the de-identified data element to the LLM, the LLM remote from the chatbot system; receive the response message from the LLM, the response message including second text, the second text including the de-identified data element; in response to receiving the response message including the second text, retrieve the sensitive data element associated with the de-identified data element; modify the response message by replacing the de-identified data element with the sensitive data element to form a modified response message; and output the modified response message containing the sensitive data element to the user device.
[0030] In some non-limiting embodiments or aspects, the chatbot system may be a component of a transaction processing system and / or an issuer system, and theLLM may be remote from and not a component of the transaction processing system and / or the issuer system.
[0031] In some non-limiting embodiments or aspects, the message and the response message may be part of a dialog between the user device and the LLM.
[0032] In some non-limiting embodiments or aspects, the dialog may be associated with an electronic payment transaction of the user.
[0033] According to non-limiting embodiments or aspects, provided is a computer program product including at least one non-transitory computer-readable medium including program instructions that, when executed by a chatbot system including at least one processor, cause the at least one processor to: store at least one finite state machine (FSM) graph, the at least one FSM graph including a plurality of states connected in a directed graph, the at least one FSM graph associated with a dialog flow type, each state of the plurality of states including at least one function configured to be executed during the state; receive a message from a user device of a user, the message including text; automatically determine that the text is associated with the dialog flow type; in response to determining that the text is associated with the dialog flow type, retrieve the at least one FSM graph and the at least one function configured to be applied during each of the plurality of states of the at least one FSM graph; input the text, the at least one FSM graph, and the at least one function into a large language model (LLM), causing the LLM to generate a response message to the text based on the at least one FSM graph, at least one state of the plurality of states of the at least one FSM graph, and / or at least one function of the at least one state; receive the response message from the LLM; and output the response message to the user device.
[0034] In some non-limiting embodiments or aspects, the program instructions may cause an issuer system to: configure a plurality of FSM graphs including the at least one FSM graph by, for each FSM graph of the plurality of FSM graphs: generating a plurality of states, each of the plurality of states including a function; connecting the plurality of states in the directed graph; and associating at least one dialog flow type with the FSM graph.
[0035] In some non-limiting embodiments or aspects, the LLM may execute a function of a first state of the plurality of states.
[0036] In some non-limiting embodiments or aspects, determining that the text is associated with the dialog flow type may be based on the text and a dialog history of dialog with the user device.
[0037] In some non-limiting embodiments or aspects, the program instructions may cause the LLM to: in response to receiving the text, the at least one FSM graph, and the at least one function, determine a function of the at least one function to be executed based on at least one of the following: the text, the at least one FSM graph, the at least one function, and / or any combination thereof.
[0038] In some non-limiting embodiments or aspects, the function to be executed may include a transition from a first state in the at least one FSM graph to a second state in the at least one FSM graph, the program instructions may cause the LLM to: traverse the at least one FSM graph from the first state to the second state.
[0039] In some non-limiting embodiments or aspects, the LLM may be precluded from executing a function different from the at least one function during traversal of the at least one FSM graph.
[0040] In some non-limiting embodiments or aspects, the function to be executed may include generating the response message to the text, the program instructions may cause the LLM to: generate the response message to the text based on the text; and transmit the response message to the chatbot system.
[0041] In some non-limiting embodiments or aspects, the program instructions may cause the LLM to: determine that the function to be executed is not part of a current state of the at least one FSM graph; and generate and transmit the response message to the chatbot system based on the function to be executed not being part of the current state of the at least one FSM graph.
[0042] In some non-limiting embodiments or aspects, the program instructions may cause a chatbot system to: automatically determine that at least a portion of the text includes a sensitive data element; generate a de-identified data element based on the sensitive data element; modify the message by replacing the sensitive data element with the de-identified data element to form a modified message; transmit the modified message containing the de-identified data element to the LLM, the LLM remote from the chatbot system; receive the response message from the LLM, the response message including second text, the second text including the de-identified data element; in response to receiving the response message including the second text, retrieve the sensitive data element associated with the de-identified data element;modify the response message by replacing the de-identified data element with the sensitive data element to form a modified response message; and output the modified response message containing the sensitive data element to the user device.
[0043] In some non-limiting embodiments or aspects, the chatbot system may be a component of a transaction processing system and / or an issuer system, and the LLM may be remote from and not a component of the transaction processing system and / or the issuer system.
[0044] In some non-limiting embodiments or aspects, the message and the response message may be part of a dialog between the user device and the LLM.
[0045] In some non-limiting embodiments or aspects, the dialog may be associated with an electronic payment transaction of the user.
[0046] Further non-limiting embodiments or aspects are set forth in the following numbered clauses:
[0047] Clause 1 : A computer-implemented method, comprising: storing, with a chatbot system comprising at least one processor, at least one finite state machine (FSM) graph, the at least one FSM graph comprising a plurality of states connected in a directed graph, the at least one FSM graph associated with a dialog flow type, each state of the plurality of states comprising at least one function configured to be executed during the state; receiving, with the chatbot system, a message from a user device of a user, the message comprising text; automatically determining, with the chatbot system, that the text is associated with the dialog flow type; in response to determining that the text is associated with the dialog flow type, retrieving, with the chatbot system, the at least one FSM graph and the at least one function configured to be applied during each of the plurality of states of the at least one FSM graph; inputting, with the chatbot system, the text, the at least one FSM graph, and the at least one function into a large language model (LLM), causing the LLM to generate a response message to the text based on the at least one FSM graph, at least one state of the plurality of states of the at least one FSM graph, and / or at least one function of the at least one state; receiving, with the chatbot system, the response message from the LLM; and outputting, with the chatbot system, the response message to the user device.
[0048] Clause 2: The computer-implemented method of clause 1 , further comprising: configuring, with an issuer system, a plurality of FSM graphs including the at least one FSM graph by, for each FSM graph of the plurality of FSM graphs:generating a plurality of states, each of the plurality of states comprising a function; connecting the plurality of states in the directed graph; and associating at least one dialog flow type with the FSM graph.
[0049] Clause 3: The computer-implemented method of clause 1 or 2, wherein the LLM executes a function of a first state of the plurality of states.
[0050] Clause 4: The computer-implemented method of any of clauses 1 -3, wherein determining that the text is associated with the dialog flow type is based on the text and a dialog history of dialog with the user device.
[0051] Clause 5: The computer-implemented method of any of clauses 1 -4, further comprising: in response to receiving the text, the at least one FSM graph, and the at least one function, determining, with the LLM, a function of the at least one function to be executed based on at least one of the following: the text, the at least one FSM graph, the at least one function, and / or any combination thereof.
[0052] Clause 6: The computer-implemented method of any of clauses 1 -5, wherein the function to be executed comprises a transition from a first state in the at least one FSM graph to a second state in the at least one FSM graph, the computer- implemented method further comprising: traversing, with the LLM, the at least one FSM graph from the first state to the second state.
[0053] Clause 7: The computer-implemented method of any of clauses 1 -6, wherein the LLM is precluded from executing a function different from the at least one function during traversal of the at least one FSM graph.
[0054] Clause 8: The computer-implemented method of any of clauses 1 -7, wherein the function to be executed comprises generating the response message to the text, the computer-implemented method further comprising: generating, with the LLM, the response message to the text based on the text; and transmitting, with the LLM, the response message to the chatbot system.
[0055] Clause 9: The computer-implemented method of any of clauses 1 -8, further comprising: determining, with the LLM, that the function to be executed is not part of a current state of the at least one FSM graph; and generating and transmitting, with the LLM, the response message to the chatbot system based on the function to be executed not being part of the current state of the at least one FSM graph.
[0056] Clause 10: The computer-implemented method of any of clauses 1 -9, further comprising: automatically determining, with the chatbot system, that at least a portion of the text comprises a sensitive data element; generating, with the chatbotsystem, a de-identified data element based on the sensitive data element; modifying, with the chatbot system, the message by replacing the sensitive data element with the de-identified data element to form a modified message; transmitting, with the chatbot system, the modified message containing the de-identified data element to the LLM, the LLM remote from the chatbot system; receiving, with the chatbot system, the response message from the LLM, the response message comprising second text, the second text comprising the de-identified data element; in response to receiving the response message comprising the second text, retrieving, with the chatbot system, the sensitive data element associated with the de-identified data element; modifying, with the chatbot system, the response message by replacing the de-identified data element with the sensitive data element to form a modified response message; and outputting, with the chatbot system, the modified response message containing the sensitive data element to the user device.
[0057] Clause 1 1 : The computer-implemented method of any of clauses 1 -10, wherein the chatbot system is a component of a transaction processing system and / or an issuer system, and the LLM is remote from and not a component of the transaction processing system and / or the issuer system.
[0058] Clause 12: The computer-implemented method of any of clauses 1 -1 1 , wherein the message and the response message are part of a dialog between the user device and the LLM.
[0059] Clause 13: The computer-implemented method of any of clauses 1 -12, wherein the dialog is associated with an electronic payment transaction of the user.
[0060] Clause 14: A system, comprising a chatbot system comprising at least one processor configured to: store at least one finite state machine (FSM) graph, the at least one FSM graph comprising a plurality of states connected in a directed graph, the at least one FSM graph associated with a dialog flow type, each state of the plurality of states comprising at least one function configured to be executed during the state; receive a message from a user device of a user, the message comprising text; automatically determine that the text is associated with the dialog flow type; in response to determining that the text is associated with the dialog flow type, retrieve the at least one FSM graph and the at least one function configured to be applied during each of the plurality of states of the at least one FSM graph; input the text, the at least one FSM graph, and the at least one function into a large language model (LLM), causing the LLM to generate a response message to the text based on the atleast one FSM graph, at least one state of the plurality of states of the at least one FSM graph, and / or at least one function of the at least one state; receive the response message from the LLM; and output the response message to the user device.
[0061] Clause 15: The system of clause 14, further comprising an issuer system configured to: configure a plurality of FSM graphs including the at least one FSM graph by, for each FSM graph of the plurality of FSM graphs: generating a plurality of states, each of the plurality of states comprising a function; connecting the plurality of states in the directed graph; and associating at least one dialog flow type with the FSM graph.
[0062] Clause 16: The system of clause 14 or 15, wherein the LLM executes a function of a first state of the plurality of states.
[0063] Clause 17: The system of any of clauses 14-16, wherein determining that the text is associated with the dialog flow type is based on the text and a dialog history of dialog with the user device.
[0064] Clause 18: The system of any of clauses 14-17, further comprising the LLM configured to: in response to receiving the text, the at least one FSM graph, and the at least one function, determine a function of the at least one function to be executed based on at least one of the following: the text, the at least one FSM graph, the at least one function, and / or any combination thereof.
[0065] Clause 19: The system of any of clauses 14-18, wherein the function to be executed comprises a transition from a first state in the at least one FSM graph to a second state in the at least one FSM graph, the LLM further configured to: traverse the at least one FSM graph from the first state to the second state.
[0066] Clause 20: The system of any of clauses 14-19, wherein the LLM is precluded from executing a function different from the at least one function during traversal of the at least one FSM graph.
[0067] Clause 21 : The system of any of clauses 14-20, wherein the function to be executed comprises generating the response message to the text, the LLM further configured to: generate the response message to the text based on the text; and transmit the response message to the chatbot system.
[0068] Clause 22: The system of any of clauses 14-21 , the LLM further configured to: determine that the function to be executed is not part of a current state of the at least one FSM graph; and generate and transmit the response message to the chatbot system based on the function to be executed not being part of the current state of the at least one FSM graph.
[0069] Clause 23: The system of any of clauses 14-22, the chatbot system further configured to: automatically determine that at least a portion of the text comprises a sensitive data element; generate a de-identified data element based on the sensitive data element; modify the message by replacing the sensitive data element with the de-identified data element to form a modified message; transmit the modified message containing the de-identified data element to the LLM, the LLM remote from the chatbot system; receive the response message from the LLM, the response message comprising second text, the second text comprising the de-identified data element; in response to receiving the response message comprising the second text, retrieve the sensitive data element associated with the de-identified data element; modify the response message by replacing the de-identified data element with the sensitive data element to form a modified response message; and output the modified response message containing the sensitive data element to the user device.
[0070] Clause 24: The system of any of clauses 14-23, wherein the chatbot system is a component of a transaction processing system and / or an issuer system, and the LLM is remote from and not a component of the transaction processing system and / or the issuer system.
[0071] Clause 25: The system of any of clauses 14-24, wherein the message and the response message are part of a dialog between the user device and the LLM.
[0072] Clause 26: The system of any of clauses 14-25, wherein the dialog is associated with an electronic payment transaction of the user.
[0073] Clause 27: A computer program product comprising at least one non- transitory computer-readable medium including program instructions that, when executed by a chatbot system comprising at least one processor, cause the at least one processor to: store at least one finite state machine (FSM) graph, the at least one FSM graph comprising a plurality of states connected in a directed graph, the at least one FSM graph associated with a dialog flow type, each state of the plurality of states comprising at least one function configured to be executed during the state; receive a message from a user device of a user, the message comprising text; automatically determine that the text is associated with the dialog flow type; in response to determining that the text is associated with the dialog flow type, retrieve the at least one FSM graph and the at least one function configured to be applied during each of the plurality of states of the at least one FSM graph; input the text, the at least one FSM graph, and the at least one function into a large language model (LLM), causingthe LLM to generate a response message to the text based on the at least one FSM graph, at least one state of the plurality of states of the at least one FSM graph, and / or at least one function of the at least one state; receive the response message from the LLM; and output the response message to the user device.
[0074] Clause 28: The computer program product of clause 27, the program instructions cause an issuer system to: configure a plurality of FSM graphs including the at least one FSM graph by, for each FSM graph of the plurality of FSM graphs: generating a plurality of states, each of the plurality of states comprising a function; connecting the plurality of states in the directed graph; and associating at least one dialog flow type with the FSM graph.
[0075] Clause 29: The computer program product of clause 27 or 28, wherein the LLM executes a function of a first state of the plurality of states.
[0076] Clause 30: The computer program product of any of clauses 27-29, wherein determining that the text is associated with the dialog flow type is based on the text and a dialog history of dialog with the user device.
[0077] Clause 31 : The computer program product of any of clauses 27-30, the program instructions cause the LLM to: in response to receiving the text, the at least one FSM graph, and the at least one function, determine a function of the at least one function to be executed based on at least one of the following: the text, the at least one FSM graph, the at least one function, and / or any combination thereof.
[0078] Clause 32: The computer program product of any of clauses 27-31 , wherein the function to be executed comprises a transition from a first state in the at least one FSM graph to a second state in the at least one FSM graph, the program instructions cause the LLM to: traverse the at least one FSM graph from the first state to the second state.
[0079] Clause 33: The computer program product of any of clauses 27-32, wherein the LLM is precluded from executing a function different from the at least one function during traversal of the at least one FSM graph.
[0080] Clause 34: The computer program product of any of clauses 27-33, wherein the function to be executed comprises generating the response message to the text, the program instructions cause the LLM to: generate the response message to the text based on the text; and transmit the response message to the chatbot system.
[0081] Clause 35: The computer program product of any of clauses 27-34, the program instructions cause the LLM to: determine that the function to be executed isnot part of a current state of the at least one FSM graph; and generate and transmit the response message to the chatbot system based on the function to be executed not being part of the current state of the at least one FSM graph.
[0082] Clause 36: The computer program product of any of clauses 27-35, the program instructions cause a chatbot system to: automatically determine that at least a portion of the text comprises a sensitive data element; generate a de-identified data element based on the sensitive data element; modify the message by replacing the sensitive data element with the de-identified data element to form a modified message; transmit the modified message containing the de-identified data element to the LLM, the LLM remote from the chatbot system; receive the response message from the LLM, the response message comprising second text, the second text comprising the de-identified data element; in response to receiving the response message comprising the second text, retrieve the sensitive data element associated with the de-identified data element; modify the response message by replacing the de-identified data element with the sensitive data element to form a modified response message; and output the modified response message containing the sensitive data element to the user device.
[0083] Clause 37: The computer program product of any of clauses 27-36, wherein the chatbot system is a component of a transaction processing system and / or an issuer system, and the LLM is remote from and not a component of the transaction processing system and / or the issuer system.
[0084] Clause 38: The computer program product of any of clauses 27-37, wherein the message and the response message are part of a dialog between the user device and the LLM.
[0085] Clause 39: The computer program product of any of clauses 27-38, wherein the dialog is associated with an electronic payment transaction of the user.
[0086] Clause 40: A computer-implemented method, comprising: receiving, with a chatbot system comprising at least one processor, a message from a user device of a user, the message comprising text; automatically determining, with the chatbot system, that at least a portion of the text comprises a sensitive data element; generating, with the chatbot system, a de-identified data element based on the sensitive data element; modifying, with the chatbot system, the message by replacing the sensitive data element with the de-identified data element to form a modified message; transmitting, with the chatbot system, the modified message containing thede-identified data element to a large language model (LLM) remote from the chatbot system; receiving, with the chatbot system, a response message from the LLM, the response message comprising second text, the second text comprising the deidentified data element; in response to receiving the response message comprising the second text, retrieving, with the chatbot system, the sensitive data element associated with the de-identified data element; modifying, with the chatbot system, the response message by replacing the de-identified data element with the sensitive data element to form a modified response message; and outputting, with the chatbot system, the modified response message containing the sensitive data element to the user device.
[0087] Clause 41 : The computer-implemented method of clause 40, wherein the sensitive data element comprises at least one of the following: a user name, a merchant name, a transaction amount, an account balance, a payment device and / or account identifier, and / or any combination thereof.
[0088] Clause 42: The computer-implemented method of clause 40 or 41 , wherein the sensitive data element comprises a merchant name, wherein generating the deidentified data element based on the sensitive data element comprises: retrieving a merchant category code associated with the merchant name; and generating the deidentified data element based on the merchant category code.
[0089] Clause 43: The computer-implemented method of any of clauses 40-42, wherein automatically determining that the at least a portion of the text comprises the sensitive data element comprises: identifying the sensitive data element in the text; determining a start location in the text of the sensitive data element; and determining an end location in the text of the sensitive data element, wherein modifying the message comprises removing a segment of the text from the start location to the end location and inserting the de-identified data element in place of the removed segment.
[0090] Clause 44: The computer-implemented method of any of clauses 40-43, further comprising: in response to automatically determining that the at least a portion of the text comprises the sensitive data element, determining, with the chatbot system, a category of the sensitive data element, wherein the de-identified data element is generated based on the category of the sensitive data element.
[0091] Clause 45: The computer-implemented method of any of clauses 40-44, further comprising: in response to receiving the message, applying a filter to the message to: identify the sensitive data element having a first format; and modify thesensitive data element having the first format to a sensitive data element having a second format.
[0092] Clause 46: The computer-implemented method of any of clauses 40-45, wherein the chatbot system is a component of a transaction processing system and / or an issuer system, and the LLM is remote from and not a component of the transaction processing system and / or the issuer system.
[0093] Clause 47: The computer-implemented method of any of clauses 40-46, wherein the message and the modified response message are part of a dialog between the user device and the LLM.
[0094] Clause 48: The computer-implemented method of any of clauses 40-47, wherein the dialog is associated with an electronic payment transaction of the user.
[0095] Clause 49: A system comprising a chatbot system comprising at least one processor configured to: receive a message from a user device of a user, the message comprising text; automatically determine that at least a portion of the text comprises a sensitive data element; generate a de-identified data element based on the sensitive data element; modify the message by replacing the sensitive data element with the de-identified data element to form a modified message; transmit the modified message containing the de-identified data element to a large language model (LLM) remote from the chatbot system; receive a response message from the LLM, the response message comprising second text, the second text comprising the de-identified data element; in response to receiving the response message comprising the second text, retrieve the sensitive data element associated with the de-identified data element; modify the response message by replacing the de-identified data element with the sensitive data element to form a modified response message; and output the modified response message containing the sensitive data element to the user device.
[0096] Clause 50: The system of clause 49, wherein the sensitive data element comprises at least one of the following: a user name, a merchant name, a transaction amount, an account balance, a payment device and / or account identifier, and / or any combination thereof.
[0097] Clause 51 : The system of clause 49 or 50, wherein the sensitive data element comprises a merchant name, wherein generating the de-identified data element based on the sensitive data element comprises: retrieving a merchant category code associated with the merchant name; and generating the de-identified data element based on the merchant category code.
[0098] Clause 52: The system of any of clauses 49-51 , wherein automatically determining that the at least a portion of the text comprises the sensitive data element comprises: identifying the sensitive data element in the text; determining a start location in the text of the sensitive data element; and determining an end location in the text of the sensitive data element, wherein modifying the message comprises removing a segment of the text from the start location to the end location and inserting the de-identified data element in place of the removed segment.
[0099] Clause 53: The system of any of clauses 49-52, the chatbot system further configured to: in response to automatically determining that the at least a portion of the text comprises the sensitive data element, determine a category of the sensitive data element, wherein the de-identified data element is generated based on the category of the sensitive data element.
[0100] Clause 54: The system of any of clauses 49-53, the chatbot system further configured to: in response to receiving the message, apply a filter to the message to: identify the sensitive data element having a first format; and modify the sensitive data element having the first format to a sensitive data element having a second format.
[0101] Clause 55: The system of any of clauses 49-54, wherein the chatbot system is a component of a transaction processing system and / or an issuer system, and the LLM is remote from and not a component of the transaction processing system and / or the issuer system.
[0102] Clause 56: The system of any of clauses 49-55, wherein the message and the modified response message are part of a dialog between the user device and the LLM.
[0103] Clause 57: The system of any of clauses 49-56, wherein the dialog is associated with an electronic payment transaction of the user.
[0104] Clause 58: A computer program product comprising at least one non- transitory computer-readable medium including program instructions that, when executed by a chatbot system comprising at least one processor, cause the at least one processor to: receive a message from a user device of a user, the message comprising text; automatically determine that at least a portion of the text comprises a sensitive data element; generate a de-identified data element based on the sensitive data element; modify the message by replacing the sensitive data element with the de-identified data element to form a modified message; transmit the modified message containing the de-identified data element to a large language model (LLM) remote fromthe chatbot system; receive a response message from the LLM, the response message comprising second text, the second text comprising the de-identified data element; in response to receiving the response message comprising the second text, retrieve the sensitive data element associated with the de-identified data element; modify the response message by replacing the de-identified data element with the sensitive data element to form a modified response message; and output the modified response message containing the sensitive data element to the user device.
[0105] Clause 59: The computer program product of clause 58, wherein the sensitive data element comprises at least one of the following: a user name, a merchant name, a transaction amount, an account balance, a payment device and / or account identifier, and / or any combination thereof.
[0106] Clause 60: The computer program product of clause 58 or 59, wherein the sensitive data element comprises a merchant name, wherein generating the deidentified data element based on the sensitive data element comprises: retrieving a merchant category code associated with the merchant name; and generating the deidentified data element based on the merchant category code.
[0107] Clause 61 : The computer program product of any of clauses 58-60, wherein automatically determining that the at least a portion of the text comprises the sensitive data element comprises: identifying the sensitive data element in the text; determining a start location in the text of the sensitive data element; and determining an end location in the text of the sensitive data element, wherein modifying the message comprises removing a segment of the text from the start location to the end location and inserting the de-identified data element in place of the removed segment.
[0108] Clause 62: The computer program product of any of clauses 58-61 , the program instructions cause the at least one processor to: in response to automatically determining that the at least a portion of the text comprises the sensitive data element, determine a category of the sensitive data element, wherein the de-identified data element is generated based on the category of the sensitive data element.
[0109] Clause 63: The computer program product of any of clauses 58-62, the program instructions cause the at least one processor to: in response to receiving the message, apply a filter to the message to: identify the sensitive data element having a first format; and modify the sensitive data element having the first format to a sensitive data element having a second format.
[0110] Clause 64: The computer program product of any of clauses 58-63, wherein the chatbot system is a component of a transaction processing system and / or an issuer system, and the LLM is remote from and not a component of the transaction processing system and / or the issuer system.
[0111] Clause 65: The computer program product of any of clauses 58-64, wherein the message and the modified response message are part of a dialog between the user device and the LLM.
[0112] Clause 66: The computer program product of any of clauses 58-65, wherein the dialog is associated with an electronic payment transaction of the user.
[0113] These and other features and characteristics of the present disclosure, as well as the methods of operation and functions of the related elements of structures and the combination of parts and economies of manufacture, will become more apparent upon consideration of the following description and the appended claims with reference to the accompanying drawings, all of which form a part of this specification, wherein like reference numerals designate corresponding parts in the various figures. It is to be expressly understood, however, that the drawings are for the purpose of illustration and description only and are not intended as a definition of the limits of the disclosed subject matter.BRIEF DESCRIPTION OF THE DRAWINGS
[0114] Additional advantages and details are explained in greater detail below with reference to the non-limiting, exemplary embodiments that are illustrated in the accompanying schematic figures, in which:
[0115] FIG. 1 is a schematic diagram of a system for integrating a finite state machine (FSM) in a chatbot system, according to some non-limiting embodiments or aspects;
[0116] FIG. 2 is a schematic diagram of a system for identifying a user conversing with a chatbot system, according to some non-limiting embodiments or aspects;
[0117] FIG. 3 is a schematic diagram of a system for generating an input for a large language model (LLM), according to some non-limiting embodiments or aspects;
[0118] FIG. 4 are schematic diagrams of finite state machine (FSM) graphs, according to some non-limiting embodiments or aspects;
[0119] FIGS. 5A-5F show a process for maintaining sensitive data in a chatbot system, according to some non-limiting embodiments or aspects;
[0120] FIG. 6 is a flow diagram of a method for integrating a finite state machine (FSM) in a chatbot system, according to some non-limiting embodiments or aspects;
[0121] FIG. 7 is a flow diagram of a method for maintaining sensitive data in a chatbot system, according to some non-limiting embodiments or aspects;
[0122] FIG. 8 is a schematic diagram of an example environment in which methods, systems, and / or computer program products, described herein, may be implemented according to some non-limiting embodiments or aspects; and
[0123] FIG. 9 is a schematic diagram of example components of one or more devices of FIGS. 1 -8, according to some non-limiting embodiments or aspects.DETAILED DESCRIPTION
[0124] For purposes of the description hereinafter, the terms “end,” “upper,” “lower,” “right,” “left,” “vertical,” “horizontal,” “top,” “bottom,” “lateral,” “longitudinal,” and derivatives thereof shall relate to the embodiments as they are oriented in the drawing figures. However, it is to be understood that the present disclosure may assume various alternative variations and step sequences, except where expressly specified to the contrary. It is also to be understood that the specific devices and processes illustrated in the attached drawings, and described in the following specification, are simply exemplary and non-limiting embodiments or aspects of the disclosed subject matter. Hence, specific dimensions and other physical characteristics related to the embodiments or aspects disclosed herein are not to be considered as limiting.
[0125] Some non-limiting embodiments or aspects may be described herein in connection with thresholds. As used herein, satisfying a threshold may refer to a value being greater than the threshold, more than the threshold, higher than the threshold, greater than or equal to the threshold, less than the threshold, fewer than the threshold, lower than the threshold, less than or equal to the threshold, equal to the threshold, etc.
[0126] No aspect, component, element, structure, act, step, function, instruction, and / or the like used herein should be construed as critical or essential unless explicitly described as such. Also, as used herein, the articles “a” and “an” are intended to include one or more items and may be used interchangeably with “one or more” and “at least one.” Furthermore, as used herein, the term “set” is intended to include one or more items (e.g., related items, unrelated items, a combination of related and unrelated items, and / or the like) and may be used interchangeably with “one or more” or “at least one.” Where only one item is intended, the term “one” or similar languageis used. Also, as used herein, the terms “has,” “have,” “having,” or the like are intended to be open-ended terms. Further, the phrase “based on” is intended to mean “based at least partially on” unless explicitly stated otherwise. In addition, reference to an action being “based on” a condition may refer to the action being “in response to” the condition. For example, the phrases “based on” and “in response to” may, in some non-limiting embodiments or aspects, refer to a condition for automatically triggering an action (e.g., a specific operation of an electronic device, such as a computing device, a processor, and / or the like).
[0127] As used herein, the term “acquirer institution” may refer to an entity licensed and / or approved by a transaction service provider to originate transactions (e.g., payment transactions) using a payment device associated with the transaction service provider. The transactions the acquirer institution may originate may include payment transactions (e.g., purchases, original credit transactions (OCTs), account funding transactions (AFTs), and / or the like). In some non-limiting embodiments or aspects, an acquirer institution may be a financial institution, such as a bank. As used herein, the term “acquirer system” may refer to one or more computing devices operated by or on behalf of an acquirer institution, such as a server computer executing one or more software applications.
[0128] As used herein, the term “account identifier” may include one or more primary account numbers (PANs), tokens, or other identifiers associated with a customer account. The term “token” may refer to an identifier that is used as a substitute or replacement identifier for an original account identifier, such as a PAN. Account identifiers may be alphanumeric or any combination of characters and / or symbols. Tokens may be associated with a PAN or other original account identifier in one or more data structures (e.g., one or more databases, and / or the like) such that they may be used to conduct a transaction without directly using the original account identifier. In some examples, an original account identifier, such as a PAN, may be associated with a plurality of tokens for different individuals or purposes.
[0129] As used herein, the term “Application Programming Interface” (API) refers to computer code or other data on a computer-readable medium that may be executed by a processor to facilitate interaction between software components such as, for example, an application that communicates data to and / or receives data from a server. An API may receive a request to return data or perform an action. As used herein, the terms “request” and “request message” may refer to data, such as but not limited toone or more data packets or other forms of data structures, configured to cause a response from a receiving system. An API request message may be a message structured according to one or more parameters of the API. For example, an API request message may include one or more queries.
[0130] As used herein, the terms “client” and “client device” may refer to one or more client-side devices or systems (e.g., remote from a transaction service provider) used to initiate or facilitate a transaction (e.g., a payment transaction). As an example, a “client device” may refer to one or more POS devices used by a merchant, one or more acquirer host computers used by an acquirer, one or more mobile devices used by a user, and / or the like. In some non-limiting embodiments or aspects, a client device may be an electronic device configured to communicate with one or more networks and initiate or facilitate transactions. For example, a client device may include one or more computers, portable computers, laptop computers, tablet computers, mobile devices, cellular phones, wearable devices (e.g., watches, glasses, lenses, clothing, and / or the like), personal digital assistants (PDAs), and / or the like. Moreover, a “client” may also refer to an entity (e.g., a merchant, an acquirer, and / or the like) that owns, utilizes, and / or operates a client device for initiating transactions (e.g., for initiating transactions with a transaction service provider).
[0131] As used herein, the term “communication” may refer to the reception, receipt, transmission, transfer, provision, and / or the like of data (e.g., information, signals, messages, instructions, commands, and / or the like). For one unit (e.g., a device, a system, a component of a device or system, combinations thereof, and / or the like) to be in communication with another unit means that the one unit is able to directly or indirectly receive information from and / or transmit information to the other unit. This may refer to a direct or indirect connection (e.g., a direct communication connection, an indirect communication connection, and / or the like) that is wired and / or wireless in nature. Additionally, two units may be in communication with each other even though the information transmitted may be modified, processed, relayed, and / or routed between the first and second unit. For example, a first unit may be in communication with a second unit even though the first unit passively receives information and does not actively transmit information to the second unit. As another example, a first unit may be in communication with a second unit if at least one intermediary unit processes information received from the first unit and communicates the processed information to the second unit. In some non-limiting embodiments oraspects, a message may refer to a network packet (e.g., a data packet and / or the like) that includes data. It will be appreciated that numerous other arrangements are possible.
[0132] As used herein, the term “computing device” may refer to one or more electronic devices configured to process data. A computing device may, in some examples, include the necessary components to receive, process, and output data, such as a processor, a display, a memory, an input device, a network interface, and / or the like. A computing device may be a mobile device. As an example, a mobile device may include a cellular phone (e.g., a smartphone or standard cellular phone), a portable computer, a wearable device (e.g., watches, glasses, lenses, clothing, and / or the like), a PDA, and / or other like devices. A computing device may also be a desktop computer or other form of non-mobile computer.
[0133] As used herein, the term “issuer institution” may refer to one or more entities, such as a bank, that provide accounts to customers for conducting transactions (e.g., payment transactions), such as initiating credit and / or debit payments. For example, an issuer institution may provide an account identifier, such as a PAN, to a customer that uniquely identifies one or more accounts associated with that customer. The account identifier may be embodied on a payment device, such as a physical financial instrument, e.g., a payment card, and / or may be electronic and used for electronic payments. The term “issuer system” refers to one or more computer devices operated by or on behalf of an issuer institution, such as a server computer executing one or more software applications. For example, an issuer system may include one or more authorization servers for authorizing a transaction.
[0134] As used herein, the term “merchant” may refer to an individual or entity that provides goods and / or services, or access to goods and / or services, to customers based on a transaction, such as a payment transaction. The term “merchant” or “merchant system” may also refer to one or more computer systems operated by or on behalf of a merchant, such as a server computer executing one or more software applications.
[0135] As used herein, the term “payment device” may refer to an electronic payment device, a portable financial device, a payment card (e.g., a credit or debit card), a gift card, a smartcard, smart media, a payroll card, a healthcare card, a wristband, a machine-readable medium containing account information, a keychain device or fob, an radio frequency identification (RFID) transponder, a retailer discountor loyalty card, a cellular phone, an electronic wallet mobile application, a PDA, a pager, a security card, a computing device, an access card, a wireless terminal, a transponder, and / or the like. In some non-limiting embodiments or aspects, the payment device may include volatile or non-volatile memory to store information (e.g., an account identifier, a name of the account holder, and / or the like).
[0136] As used herein, the term “payment gateway” may refer to an entity and / or a payment processing system operated by or on behalf of such an entity (e.g., a merchant service provider, a payment service provider, a payment facilitator, a payment facilitator that contracts with an acquirer, a payment aggregator, and / or the like), which provides payment services (e.g., transaction service provider payment services, payment processing services, and / or the like) to one or more merchants. The payment services may be associated with the use of portable financial devices managed by a transaction service provider. As used herein, the term “payment gateway system” may refer to one or more computer systems, computer devices, servers, groups of servers, and / or the like, operated by or on behalf of a payment gateway.
[0137] As used herein, a “point-of-sale (POS) device” may refer to one or more devices, which may be used by a merchant to conduct a transaction (e.g., a payment transaction) and / or process a transaction. For example, a POS device may include one or more client devices. Additionally or alternatively, a POS device may include peripheral devices, card readers, scanning devices (e.g., code scanners), Bluetooth® communication receivers, near-field communication (NFC) receivers, RFID receivers, and / or other contactless transceivers or receivers, contact-based receivers, payment terminals, and / or the like. As used herein, a “point-of-sale (POS) system” may refer to one or more client devices and / or peripheral devices used by a merchant to conduct a transaction. For example, a POS system may include one or more POS devices and / or other like devices that may be used to conduct a payment transaction. In some non-limiting embodiments or aspects, a POS system (e.g., a merchant POS system) may include one or more server computers configured to process online payment transactions through webpages, mobile applications, and / or the like.
[0138] As used herein, the term “server” may refer to or include one or more computing devices that are operated by or facilitate communication and processing for multiple parties in a network environment, such as the Internet, although it will be appreciated that communication may be facilitated over one or more public or privatenetwork environments and that various other arrangements are possible. Further, multiple computing devices (e.g., servers, point-of-sale (POS) devices, mobile devices, etc.) directly or indirectly communicating in the network environment may constitute a “system.”
[0139] As used herein, the term “system” may refer to one or more computing devices or combinations of computing devices and / or components of such (e.g., processors, servers, client devices, software applications, and / or the like). Reference to “a device,” “a server,” “a processor,” and / or the like, as used herein, may refer to a previously-recited device, server, or processor that is recited as performing a previous step or function, a different device, server, or processor, and / or a combination of devices, servers, and / or processors. For example, as used in the specification and the claims, a first device, a first server, or a first processor that is recited as performing a first step or a first function may refer to the same or different device, server, or processor recited as performing a second step or a second function.
[0140] As used herein, the term “transaction service provider” may refer to an entity that receives transaction authorization requests from merchants or other entities and provides guarantees of payment, in some cases through an agreement between the transaction service provider and an issuer institution. For example, a transaction service provider may include a payment network such as Visa® or any other entity that processes transactions. The term “transaction processing system” may refer to one or more computer systems operated by or on behalf of a transaction service provider, such as a transaction processing server executing one or more software applications. A transaction processing server may include one or more processors and, in some non-limiting embodiments or aspects, may be operated by or on behalf of a transaction service provider.
[0141] Non-limiting embodiments or aspects of the disclosed subject matter are directed to methods, systems, and computer program products for integrating a finite state machine (FSM) in a chatbot system. Non-limiting embodiments or aspects configure FSM graphs that are input to large language models (LLMs) which, when traversed by the LLMs, function as guardrails thereto in order to control the response of the LLM within predetermined parameters. Each FSM graph may comprise a plurality of states connected in a directed graph. The FSM graph is associated with a dialog flow type and is invoked for provision to the LLM in response to a user device submitting a message associated with the dialog flow type. Each state of the pluralityof states includes at least one function configured to be executed during the state. Each function may have a set of program instructions configured to be executed by the LLM during the state as determined by the LLM.
[0142] Non-limiting embodiments or aspects arrange an intermediary chatbot system between a user device engaging with a large language model (LLM) in a dialog. The intermediary chatbot system may intercept a message comprising text sent from the user device to engage in a dialog with the LLM and automatically determine that the text is associated with a dialog flow type. The intermediary chatbot system may be used to determine that the text is associated with a dialog flow type. Based on determining the dialog flow type, the intermediary chatbot system may retrieve the relevant FSM graph and functions associated therewith. Along with the text, the chatbot system may input the retrieved FSM graph and functions to the LLM to control actions and / or responses of the LLM. The LLM may traverse the input FSM graph and may execute one or more relevant functions as the LLM traverses through the states of the FSM graph. The LLM may generate a response message based on the text and as controlled by the FSM graph (e.g., the states thereof and functions thereof).
[0143] The integration of FSM graphs into chatbot systems, and the input of the FSM graphs and relevant functions to the LLM with the text of the dialog intended for the LLM, results in an LLM that responds in a controlled manner according to predetermined parameters. By controlling the output of the LLM, the performance of the LLM may be improved by prohibiting the LLM from returning response messages that provide sensitive or otherwise prohibited information to the user device.
[0144] Non-limiting embodiments or aspects of the disclosed subject matter are also directed to methods, systems, and computer program products for maintaining sensitive data in a chatbot system. Non-limiting embodiments or aspects arrange an intermediary chatbot system between a user device and an LLM engaging with the user device in a dialog. The chatbot system may automatically detect sensitive data elements in text-containing messages generated by the user device (e.g., an intended input from the user device to the LLM). The chatbot system may generate a deidentified data element based on the detected sensitive data element, and the deidentified data element may be a non-sensitive data element. The chatbot system may be configured to modify messages received from the user device. For example, modifying a message may include replacing the sensitive data element with the de-identified data element. The modified message no longer containing the sensitive data element may be transmitted to the LLM to enable the user device to engage in a dialog with the LLM without exposing sensitive data elements to the remote LLM.
[0145] Non-limiting embodiments or aspects may further receive a response message from the LLM, which may contain a de-identified data element. The deidentified data element in the response message may be replaced back with the sensitive data element prior to the response message being transmitted to the user device. As such, the chatbot system may modify the response message by replacing de-identified data elements with the corresponding sensitive data elements. The modified response message may be transmitted to the user device to continue the dialog between the user device and the LLM.
[0146] By uniquely arranging the chatbot system between the user device and the LLM, the user device may engage in a dialog with the LLM on topics associated with sensitive data without exposing the sensitive data to the LLM (e.g., by the chatbot system intercepting and modifying messages transmitted therebetween). By not exposing sensitive data to remote systems (e.g., the LLM), a user’s sensitive data may be kept more secure, such that the risk of fraud involving the sensitive data is reduced. Moreover, the unique arrangement of the intermediary chatbot system addresses a technical problem specifically arising in the realm of computer technology associated with chatbots by enabling chatbot dialog to be executed without the chatbot receiving sensitive data elements.
[0147] For the purpose of illustration, in the following description, while the presently disclosed subject matter is described with respect to methods, systems, and computer program products for integrating a finite state machine (FSM) in a chatbot system, e.g., for chatbot systems engaging in dialog regarding user payment transactions, one skilled in the art will recognize that the disclosed subject matter is not limited to the non-limiting embodiments or aspects disclosed herein. For example, the methods, systems, and computer program products described herein may be used with a wide variety of settings, such as a chatbot system that is data type aware for any suitable type of sequential dataset and / or for making determinations (e.g., responses, predictions, classifications, regressions, and / or the like) with at least one machine learning model (e.g., an LLM) based on the sequential dataset, such as for fraud detection / prevention, authorization, authentication, identification, featureselection, product recommendation, click through recommendation (CTR), and / or the like.
[0148] Further, while the presently disclosed subject matter is also described with respect to methods, systems, and computer program products for maintaining sensitive data in a chatbot system, e.g., for chatbot systems engaging in dialog regarding user payment transactions, one skilled in the art will recognize that the disclosed subject matter is not limited to the non-limiting embodiments or aspects disclosed herein. For example, the methods, systems, and computer program products described herein may be used with a wide variety of settings, such as a chatbot system that is data type aware for any suitable type of sequential dataset and / or for making determinations (e.g., responses, predictions, classifications, regressions, and / or the like) with at least one machine learning model (e.g., an LLM) based on the sequential dataset, such as for fraud detection / prevention, authorization, authentication, identification, feature selection, product recommendation, CTR, and / or the like.
[0149] Referring now to FIG. 1 , shown is a system 100 for integrating a finite state machine (FSM) in a chatbot system and for maintaining sensitive data in a chatbot system, according to some non-limiting embodiments or aspects. System 100 may include at least one of the following: a user device 102, a chatbot system 104, a large language model (LLM) 106, an FSM builder 108, an FSM database 1 10, a client system 1 12, and / or any combination thereof.
[0150] User device 102 may include at least one computing device as described herein. For example, user device 102 may include a computer (e.g., portable computer, non-mobile computer, and / or the like), a server (e.g., a single server), a group of servers, and / or other like devices of a user. In some non-limiting embodiments or aspects, user device 102 may include at least one processor (e.g., a multi-core processor) such as a graphics processing unit (GPU), a central processing unit (CPU), an accelerated processing unit (APU), a microprocessor, and / or the like. In some non-limiting embodiments or aspects, user device 102 may include memory, one or more storage components, one or more input components, one or more output components, and / or one or more communication interfaces, as described herein. The user may be an account holder and / or a consumer.
[0151] Chatbot system 104 may include at least one computing device as described herein. For example, chatbot system 104 may include a computer (e.g.,portable computer, non-mobile computer, and / or the like), a server (e.g., a single server), a group of servers, and / or other like devices of a user. In some non-limiting embodiments or aspects, chatbot system 104 includes at least one processor (e.g., a multi-core processor) such as a graphics processing unit (GPU), a central processing unit (CPU), an accelerated processing unit (APU), a microprocessor, and / or the like. In some non-limiting embodiments or aspects, chatbot system 104 may include memory, one or more storage components, one or more input components, one or more output components, and / or one or more communication interfaces, as described herein. Chatbot system 104 may receive a message comprising text from user device 102. Chatbot system 104, after parsing the user input (e.g., message comprising text), may generate at least one request for LLM 106 based on the parsed input and one or more application programming interfaces (APIs) of LLM 106. For example, chatbot system 104 may determine one or more APIs from a plurality of APIs of LLM 106 based on the parsed input. In non-limiting embodiments, chatbot system 104 parses the input, generates one or more requests based on the relevant API(s), and communicates such requests to LLM 106. Chatbot system 104 may retrieve at least one FSM graph for inputting to LLM 106. In some non-limiting embodiments or aspects, chatbot system 104 may be configured to determine that at least a portion of the received text comprises at least one sensitive data element, generating at least one de-identified data element based on the sensitive data element, and modifying the text replacing the at least one sensitive data element with the at least one de-identified data element to form a modified message.
[0152] LLM 106 may include at least one computing device as described herein. For example, LLM 106 may include a computer (e.g., portable computer, non-mobile computer, and / or the like), a server (e.g., a single server), a group of servers, and / or other like devices of a user. In some non-limiting embodiments or aspects, LLM 106 may include at least one processor (e.g., a multi-core processor) such as a graphics processing unit (GPU), a central processing unit (CPU), an accelerated processing unit (APU), a microprocessor, and / or the like. In some non-limiting embodiments or aspects, LLM 106 may include memory, one or more storage components, one or more input components, one or more output components, and / or one or more communication interfaces, as described herein. LLM 106 may comprise a natural language processing system. LLM 106 may be configured to simulate how a human would behave as a conversational partner. Non-limiting examples of LLMs includeCHATGPT, GEMINI, CLAUDE, LLAMA, and the like. LLM 106 may be hosted locally or remote from chatbot system 104 and / or from the same entity hosting chatbot system 104. LLM 106 may be a private and / or secure instance of the model generated specifically for chatbot system 104.
[0153] FSM builder 108 may include at least one computing device as described herein. For example, FSM builder 108 may include a computer (e.g., portable computer, non-mobile computer, and / or the like), a server (e.g., a single server), a group of servers, and / or other like devices of a user. In some non-limiting embodiments or aspects, FSM builder 108 may include at least one processor (e.g., a multi-core processor) such as a graphics processing unit (GPU), a central processing unit (CPU), an accelerated processing unit (APU), a microprocessor, and / or the like. In some non-limiting embodiments or aspects, FSM builder 108 may include memory, one or more storage components, one or more input components, one or more output components, and / or one or more communication interfaces, as described herein. FSM builder 108 may include a user interface configured to enable configuration of FSM graphs, each FSM graph comprising a plurality of states connected in a directed graph, each FSM graph associated with a dialog flow type, each state of the plurality of states comprising at least one function configured to be executed during the state. FSM builder 108 may be a component of client system 1 12 (e.g., an issuer system) and / or may be a component with which client system 1 12 may engage to configure FSM graphs. FSM builder 108 may be a component of chatbot system 104.
[0154] FSM database 1 10 may include at least one computing device, as described herein. In some non-limiting embodiments or aspects, FSM database 1 10 may store data records. In some non-limiting embodiments or aspects, FSM database 1 10 may be in communication with FSM builder 108 and / or chatbot system 104, e.g., to store FSM graphs configured by FSM builder 108 and / or enable retrieval of FSM graphs stored therein by chatbot system 104. In some non-limiting embodiments or aspects FSM database 1 10 may store FSM graphs and the data associated therewith (e.g., dialog flow types, data about each state, data about functions associated with each state, executable instructions of the functions, and the like). FSM database 1 10 may be a component of chatbot system 104.
[0155] Client system 1 12 may include at least one computing device as described herein. For example, client system 112 may include a computer (e.g., portablecomputer, non-mobile computer, and / or the like), a server (e.g., a single server), a group of servers, and / or other like devices of a user. In some non-limiting embodiments or aspects, client system 1 12 includes at least one processor (e.g., a multi-core processor) such as a graphics processing unit (GPU), a central processing unit (CPU), an accelerated processing unit (APU), a microprocessor, and / or the like. In some non-limiting embodiments or aspects, client system 1 12 may include memory, one or more storage components, one or more input components, one or more output components, and / or one or more communication interfaces, as described herein. Client system 1 12 may communicate with FSM builder 108 to configure one or more FSM graph. In some non-limiting embodiments or aspects, FSM builder 108 may be a component of client system 1 12, or FSM builder 108 may be a separate component from client system 1 12.
[0156] The number and arrangement of systems and devices shown in FIG. 1 are provided as an example. There may be additional systems and / or devices, fewer systems and / or devices, different systems and / or devices, and / or differently arranged systems and / or devices than those shown in FIG. 1. Furthermore, two or more systems or devices shown in FIG. 1 may be implemented within a single system or device, or a single system or device shown in FIG. 1 may be implemented as multiple, distributed systems or devices. Additionally or alternatively, a set of systems (e.g., one or more systems) or a set of devices (e.g., one or more devices) of system 100 may perform one or more functions described as being performed by another set of systems or another set of devices of system 100.
[0157] With continued reference to FIG. 1 , client system 112 may configure a plurality of FSM graphs. Client system 112 may configure the FSM graphs by engaging with FSM builder 108. For example, client system 1 12 may communicate with FSM builder 108 to configure the FSM graphs. Each FSM graph may comprise a plurality of states connected in a directed graph. The directed graph may comprise a plurality of nodes, each node representing at least one state, and the plurality of nodes are connected by at least one directed edge, representing the possible transitions between states when the directed graph is traversed.
[0158] Configuring each FSM graph may be executed by generating a plurality of states to be included and connected in the FSM graph. Each of the plurality of states may comprise at least one function configured to be executed during the state. Configuring each FSM graph may be executed by connecting the plurality of states inthe directed graph (e.g., by configuring the directed edges between the plurality of states). Configuring each FSM graph may be executed by associating at least one dialog flow type with the configured FSM graph.
[0159] In the FSM graphs, each state may be a condition and / or status of the system at a given time. For example, for user device 102 engaging with chatbot system 104 in an automated conversation with LLM 106, each state may be a condition and / or status of the conversation with user device 102. Each state may comprise at least one (e.g., predetermined) function that may be executed while the system is at the state. The functions that may be executed at that state may be assigned to the state, such as by client system 1 12 during configuration of FSM graph. Functions not assigned to the state may be precluded from being executed at the state. LLM 106 may execute one or more functions assigned to the state in response to receiving at least one input (e.g., conversational text from user device 102) that triggers execution of the function.
[0160] Each state may also comprise at least one input that triggers a transition to at least one different state, which different state may have at least one different assigned function and / or at least one different input that triggers a transition to another state. For example, a first state of an FSM graph may comprise a trigger that, if satisfied, moves the system to a second state. In response to receiving the trigger associated with a transition, the FSM graph may be traversed from the first state to the second state.
[0161] Each state may comprise at least one function. Each function may comprise at least one of the following: an action, an operation, a computation, and / or any combination thereof, which may be executable by LLM 106 in the state. Thus, the functions assigned to the state may be the tools LLM 106 may use in the given state. The functions assigned to the state may be configured to be executed during the state.
[0162] With continued reference to FIG. 1 , configuring the FSM graphs may comprise associating at least one dialog flow type with the FSM graph. A dialog flow type may correspond to a conversation topic and / or request type. Chatbot system 104 may receive a message from user device 102 and, based on the context of the message, determine the conversation topic and / or request type requested by the user. Based on the determined dialog flow type associated with the message from user device 102, the corresponding FSM graph may be determined and / or retrieved.
[0163] In some non-limiting embodiments or aspects, configuring the FSM graphs may comprise generating new FSM graphs. Configuring the FSM graphs may comprise reconfiguring and / or updating and / or modifying an existing FSM graph, which may comprise at least one of the following: generating at least one additional state, removing at least one existing state, changing a relation of at least one state relative to at least one different state, adding / removing / changing at least one function of a state, adding / removing / changing an input that triggers a transition to at least one different state, adding / removing / changing at least one dialog flow type associate with the FSM graph, and / or any combination thereof.
[0164] Referring to FIG. 4, schematic diagrams are shown of FSM graphs, according to some non-limiting embodiments or aspects. Specifically, FIG. 4 shows 3 different FSM graphs including: a first FSM graph 400, a second FSM graph 410, and a third FSM graph 420.
[0165] According to first FSM graph 400, the flow may comprise 5 states S1 , S2,53, S4, and S5, with first state S1 being the initial state of first FSM graph 400. In response to an input that triggers a transition, first FSM graph 400 may be traversed from first state S1 to second state S2. In response to an input that triggers a transition, first FSM graph 400 may be traversed from second state S2 to third state S3 and / or fourth state S4. In third state S3, in response to an input that triggers a transition, traversal of first FSM graph 400 may be completed and / or terminated. In fourth state54, in response to an input that triggers a transition, first FSM graph 400 may be traversed from fourth state S4 to fifth state S5. In fifth state S5, in response to an input that triggers a transition, traversal of first FSM graph 400 may be completed and / or terminated. First FSM graph 400 may comprise a directed acyclic graph (DAG).
[0166] According to second FSM graph 410, the flow may comprise 3 states S1 , S2, and S3, with first state S1 being the initial state of second FSM graph 410. In response to an input that triggers a transition, second FSM graph 410 may be traversed from first state S1 to second state S2. In response to an input that triggers a transition, second FSM graph 410 may be traversed from second state S2 to third state S3. In third state S3, in response to an input that triggers a transition, traversal of second FSM graph 410 may be completed and / or terminated. Second FSM graph 410 may comprise a directed acyclic graph (DAG). In some non-limiting embodiments or aspects, first FSM graph 400 may be modified to second FSM graph 410 by client system 112 (from FIG. 1 ) reconfiguring first FSM graph 400 using FSM builder 108(from FIG. 1 ), such as by removing fourth state S4 and fifth state S5 from first FSM graph 400 to form second FSM graph 410.
[0167] According to third FSM graph 420, the flow may comprise 4 states S1 , S2,53, and S4, with first state S1 being the initial state of third FSM graph 420. In response to an input that triggers a transition, third FSM graph 420 may be traversed from first state S1 to second state S2. In response to an input that triggers a transition, third FSM graph 420 may be traversed from second state S2 to third state S3 and / or fourth state S4. In third state S3, in response to an input that triggers a transition, traversal of third FSM graph 420 may be completed and / or terminated. In fourth state54, in response to an input that triggers a transition, third FSM graph 420 may be traversed from fourth state S4 back to first state S1 . In some non-limiting embodiments or aspects, second FSM graph 410 may be modified to third FSM graph 420 by client system 1 12 (from FIG. 1 ) reconfiguring second FSM graph 410 using FSM builder 108 (from FIG. 1 ), such as by adding fourth state S4 to second FSM graph 410 to form third FSM graph 420.
[0168] Each FSM graph shown in FIG. 4 is a non-limiting example of an FSM graph, and it will be appreciated that other states and arrangements thereof may be employed according to the present disclosure. Each FSM graph may be saved and stored in a data structure that is machine readable, such as by LLM 106. For example, each FSM graph and / or each state and / or function thereof may be represented in a JavaScript Object Notation (JSON) format or other format that may be parsed and / or executed by LLM 106.
[0169] Referring again to FIG. 1 , in response to client system 1 12 configuring a plurality of FSM graphs using FSM builder 108, the configured FSM graphs may be stored in FSM database 1 10. For example, chatbot system 104 may store the FSM graphs in FSM database 100. FSM builder 108 and / or FSM database 1 10 may be a component of chatbot system 104. Chatbot system 104 and / or LLM 106 may retrieve at least one FSM graph from FSM database 1 10 during an automated conversation with user device 102. The FSM graphs used by LLM 106 may control output of LLM 106 in response to receiving an input.
[0170] Referring to FIGS. 1 and 2, chatbot system 104 may receive a message from user device 102 of a user. For example, user device 102 may engage with a website, application, and / or other platform operated by or on behalf of client system 1 12 and / or chatbot system 104 in order for user device 102 to transmit messages tochatbot system 104. The message may comprise text, such as text entered into user device 102 and / or text generated by user device 102 in response to a verbal input by user to user device 102 (e.g., converting audio input to textual data). In some nonlimiting embodiments or aspects, the message received may be a prompt to engage with LLM 106 in an automated conversation. The prompt may comprise a question, a request, an inquiry, an instruction, a command, and / or the like. The prompt may be a request for a response from LLM 106, which response may comprise an answer to the prompt. LLM 106 may automatically generate the response in response to receiving the prompt (e.g., the message) as described herein.
[0171] Referring to FIG. 2, a system 200 is shown for identifying a user conversing with chatbot system 104, according to some non-limiting embodiments or aspects. User device 102 may communicate the message comprising text to chatbot system 104. In some non-limiting embodiments or aspects, the message may further comprise metadata associated with user device 102. For example, the metadata may comprise a device identifier, a location identifier, a device setting (e.g., browser header, and the like), or other metadata that may uniquely identify the user. In response to receiving the message, chatbot system 104 may automatically determine the user associated with user device 102. For example, chatbot system 104 may automatically determine the user based on the metadata contained in the message. For example, chatbot system 104 may automatically determine the user based on the contents of the message, such as a user name, user identifier (e.g., a primary account number (PAN)), contact data (phone number, email address, and the like), transaction data, or other data that may uniquely identify the user. For example, chatbot system 104 may automatically determine the user based on login credentials provided by the user to the website, application, and / or other platform. In some non-limiting embodiments or aspects, in response to identifying the users, chatbot system 104 may retrieve data associated with the user (e.g., from user database 214), such as a user name, user identifier, contact data, transaction data, or other data that may be associated with the user.
[0172] Chatbot system 104 may comprise a user database 214 that stores user data. For example, user database 214 may store any of the foregoing metadata and / or data that may uniquely identify the user. User database 214 may comprise transaction data associated with electronic payment transactions involving the user. The usersmay have initiated the electronic payment transactions using at least one payment device.
[0173] Chatbot system 104 may also comprise a user chat database 216. User chat database 216 and user database 214 may be the same database or different databases. User chat database 216 may store historic chat logs associated with users, such as storing transcripts of prior conversations between user device 102 and chatbot system 104 and / or LLM 106. In response to chatbot system 104 automatically determining the user of user device 102 based on the message, chatbot system 104 may automatically retrieve historic chat logs associated with the determined user from user chat database 216. Historic chat logs associated with the determined user may provide further context regarding the user’s message, may provide data associated with prior responses generated by LLM 106 and communicated to user device 102, may provide data regarding the user’s conversation style, and the like.
[0174] In some non-limiting embodiments or aspects, before chatbot system 104 engages LLM 106 to cause LLM 106 to generate at least one response to the message and / or to traverse an FSM graph, chatbot system 104 and user device 102 may converse back and forth (e.g., using an LLM and / or natural language processing (NLP) model of chatbot system 104) to collect data needed by LLM 106 to engage in the conversation. The data may comprise one or more user selections requested in response to the original message from user device 102.
[0175] Referring to FIG. 3, a schematic diagram of a system 300 is shown for generating an input for LLM 106, according to some non-limiting embodiments or aspects. In response to chatbot system 104 receiving the message from user device 102, chatbot system 104 may automatically determine that the text is associated with a dialog flow type. For example, LLM router 318 may analyze the text of the message and determine the dialog flow type corresponding to the text. LLM router 318 may automatically determine the conversation topic and / or request type based on the context of the text of the message, in order to determine the dialog flow type. LLM router 318 may automatically determine the dialog flow type based on the text of the message and historic chat logs of the determined user. Thus, LLM router 318 may determine that the text is associated with the dialog flow type based on the text and a dialog history of dialog with user device 102.
[0176] In some non-limiting embodiments or aspects, the message from user device 102 may be determined by chatbot system 104 to not correspond to any of theavailable dialog flow types. This may indicate that the dialog (e.g., conversation topic) is not of the type handled by chatbot system 104 and / or LLM 106. Chatbot system 104 may return an error message indicating that no further dialog associated with the topic of the message can be provided. As a non-limiting example, a chatbot system associated with a banking application may reject a proposed conversation topic in which the user asks about the weather.
[0177] In response to determining that the text of the message is associated with a first dialog flow type, chatbot system 104 (e.g., LLM router 318) may automatically retrieve a first FSM graph stored in FSM database 1 10. The first FSM graph stored in FSM database 1 10 may correspond to the first dialog flow type determined by LLM router 318. The first FSM graph may comprise a plurality of states connected in a directed graph. Each state of the retrieved first FSM graph may comprise at least one function configured to be executed during the state. LLM router 318 may retrieve the first FSM graph and the functions configured to be applied in each of the plurality of states of the first FSM graph.
[0178] With continued reference to FIG. 3, in response to receiving the first FSM graph and corresponding functions, LLM router 318 may generate an input payload for LLM 106. The input payload may comprise the first FSM graph and corresponding functions. The input payload may comprise the text of the message (e.g., the prompt for LLM 106). The input payload may comprise at least one instruction generated by chatbot system 104 that may be executed by LLM 106 to enable chatbot system 104 to control an output of LLM 106. The instruction may specify an initial state of first FSM graph and / or one or more instructions as to how to traverse the first FSM graph, execute suitable corresponding functions, and / or generate and return a response.
[0179] Chatbot system 104 may input the input payload (e.g., the text, the at least one FSM graph (e.g., first FSM graph), and the functions thereof) into LLM 106 to cause LLM 106 to generate and return a response message. In response to receiving the input payload, LLM 106 may automatically generate a response message to the text based on the first FSM graph, at least one state of the plurality of states of the first FSM graph, and / or at least one function of the at least one state.
[0180] Referring to FIGS. 1 , 3, and 4, LLM 106 generating the response message may comprise LLM 106 determining present and / or future states of the FSM graph, execute at least one function of the present state, and / or traverse the directed FSM graph to traverse between states as specified in the FSM graph. Non-limitingexamples described hereinafter of LLM 106 automatically generating a response message based on receiving the input payload are described in connection with first FSM graph 400 of FIG. 4.
[0181] LLM 106 generating the response may comprise LLM 106 determining at least one present state of FSM graph. For example, in response to LLM 106 receiving the input payload comprising first FSM graph 400, LLM 106 may determine an initial state of first FSM graph 400 and / or a state of first FSM graph 400 at which to start. LLM 106 may automatically determine the initial state of first FSM graph 400. LLM 106 may receive the state at which to start from the input payload received from chatbot system 104. LLM 106 may determine that first state S1 is the first state in first FSM graph 400 and may start generating the response message from the instructions and / or functions associated with first state S1 .
[0182] In some non-limiting embodiments or aspects, LLM 106 generating the response may comprise LLM 106 executing a function assigned to the present state of the FSM graph. For example, with first FSM graph 400 in first state S1 , LLM 106 may execute at least one function assigned to first state S1 . In response to receiving the input payload (e.g., text, the at least one FSM graph, and the at least one function), LLM 106 may automatically determine a function of the at least one function to be executed based on at least one of the following: the text, the at least one FSM graph, the at least one function, and / or any combination thereof. For example, LLM 106 may determine that the present state is first state S1 from first FSM graph 400 and determine a function assigned to first state S1 that is to be executed. LLM 106 may automatically execute the function corresponding to first state S1 in response to determining that the function is to be executed while in first state S1 . In some nonlimiting embodiments or aspects, the function comprises at least one of the following: an action, an operation, a computation, and / or any combination thereof to be executed by LLM 106. In some non-limiting embodiments or aspects, the function may comprise a transition between states of the FSM graph (e.g., a transition from first state S1 to second state S2).
[0183] In some non-limiting embodiments or aspects, LLM 106 may be precluded from executing a function different from a function assigned to the present state during traversal of the FSM graph to generate the response message. LLM 106 may not execute a function not assigned to the present state.
[0184] LLM 106 generating the response may comprise LLM 106 determining a future (e.g., next) state of the FSM graph. In response to an input that triggers a transition, LLM 106 may determine the next state of the FSM graph and may traverse the FSM graph to the determined next state. Upon transition to the next state, LLM 106 may execute at least one function assigned to the next state (and may be precluded from executing functions assigned to the prior state). For example, in first FSM graph 400 and in first state S1 , in response to an input that triggers a transition, LLM 106 may determine the next state of first FSM graph 400 being second state S2.
[0185] LLM 106 generating the response may comprise LLM 106 traversing the FSM graph from the current state to the next state. For example, the function executed while in first state S1 of first FSM graph 400 may comprise a transition from first state S1 in first FSM graph 400 to second state S2 in first FSM graph 400. In executing the function, LLM 106 may traverse first FSM graph 400 from first state S1 to second state S2. LLM 106 may continue to traverse through first FSM graph 400 until completion of the conversation with user device 102 and / or completion of the FSM protocol configured by first FSM graph 400. It will be appreciated that LLM 106 may execute functions according to the FSM graph(s) in input payload and may be precluded from executing functions not specified by the FSM graph(s).
[0186] In some non-limiting embodiments or aspects, in a particular state, a function assigned to the state may be executed that comprises generating, with LLM 106 a response message to the text. The response message may be generated based on the text, such as LLM 106 functioning as an automated conversation partner with user device 102, and the response message may comprise a response to the text of the original message from user device 102. LLM 106 may transmit the generated response message to chatbot system 104 which may transmit the response message (or a modified version thereof) to user device 102.
[0187] In some non-limiting embodiments or aspects, in response to the original or subsequent message from user device 102, LLM 106 may determine that the function to be executed is not part of a current state of the FSM graph being traversed by LLM 106. LLM 106 may be precluded from executing the determined function based on it not being part of the current state of the FSM graph. In response to determining that the function to be executed is not part of a current state of the FSM graph being traversed by LLM 106, LLM 106 may generate and transmit a response message to chatbot system 104. The response message in this non-limiting embodiment or aspectmay be based on the function to be executed not being part of the current state of the at least one FSM graph. For example, the response message may indicate to chatbot system 104 that the requested function cannot be completed, that an error has occurred, that further instruction from chatbot system 104 is requested before the requested function can be executed, and / or the like. Further, a response message may be transmitted to user device 102 based on the function to be executed not being part of the current state of the at least one FSM graph. For example, the message to user device 102 may indicate that the requested function cannot be completed, that an error has occurred, that further or alternate instructions from user device 102 are needed, and / or the like.
[0188] Chatbot system 104 may receive the response message generated by LLM 106. In response to receiving the response message, chatbot system 104 may output the response message to user device 102. Chatbot system 104 may output the response message to user device 102 without modification. Chatbot system 104 may modify the response message and output the modified response message to user device 102. User device 102 may display the response message and continue the conversation with LLM 106, such as by responding to the response message.
[0189] Referring to FIG. 1 , in some non-limiting embodiments or aspects, system 100 may enable LLM 106 to handle complex and / or convoluted conversations in which the user switches between topics. In such conversations, the user may switch from a first conversation topic associated with a first dialog flow type to a second conversation topic associated with a second dialog flow type.
[0190] During the complex and / or convoluted conversation, chatbot system 104 may receive a first message from user device 102, and chatbot system 104 may determine that the first message is associated with a first dialog flow type. In response to determining that the first message is associated with the first dialog flow type, chatbot system 104 may retrieve the corresponding FSM graph (e.g., first FSM graph) and the at least one function configured to be applied during each of the plurality of states of the first FSM graph. Chatbot system 104 may also retrieve a historical conversation log associated with the user of user device 102.
[0191] Chatbot system 104 may input the text of the first message, the first FSM graph, and its associated functions to LLM 106. LLM 106 may traverse first FSM graph according to the program instructions associated therewith and execute one or more functions assigned to one or more states of first FSM graph. In some non-limitingembodiments or aspects, executing a function of a state of first FSM graph may comprise LLM 106 generating a first response message to be transmitted to user device 102 (e.g., through chatbot system 104). First response message may be a text response to the first message associated with the first dialog flow type (e.g., relevant to the first conversation topic).
[0192] During traversal of first FSM graph by LLM 106, chatbot system 104 may receive a second message from user device 102, and chatbot system 104 may determine that the second message is associated with a second dialog flow type (different from first dialog flow type). This may indicate that user has changed the conversation topic while LLM 106 is still traversing first FSM graph associated with first dialog flow type. In response to determining that the second message is associated with the second dialog flow type, chatbot system 104 may retrieve the corresponding FSM graph (e.g., second FSM graph) and the at least one function configured to be applied during each of the plurality of states of the second FSM graph. In response to receiving the second message and each subsequent message from user device 102, chatbot system 104 may determine whether the dialog flow type has stayed the same or changed and adjust the FSM graph input to LLM 106 accordingly.
[0193] Chatbot system 104 may input the text of the second message, the second FSM graph, and its associated functions to LLM 106. In response to receiving the input, LLM 106 may terminate traversal of first FSM graph. For example, LLM 106 may automatically terminate traversal of first FSM graph before LLM 106 traverses to a final state of first FSM graph. For example, LLM 106 may automatically terminate traversal of first FSM graph by LLM 106 traversing first FSM graph to a final state that comprises a function to terminate traversal of first FSM graph, which termination function may be executed by LLM 106 to terminate further traversal of first FSM graph.
[0194] In response to receiving the input, LLM 106 may traverse second FSM graph according to the program instructions associated therewith and execute one or more functions assigned to one or more states of second FSM graph. In some nonlimiting embodiments or aspects, executing a function of a state of second FSM graph may comprise LLM 106 generating a second response message to be transmitted to user device 102 (e.g., through chatbot system 104). Second response message may be a text response to the second message associated with the second dialog flow type (e.g., relevant to the second conversation topic).
[0195] Therefore, using this system including the configured FSM graphs, LLM 106 may seamlessly transition from a first dialog flow to a second dialog flow and avoid replying to a prior topic from which user device 102 has apparently transitioned based on newly-received messages.
[0196] The foregoing processes and systems for configuring FSM graphs, retrieving the FSM graph associated with the dialog flow type, and providing the retrieved FSM graph to LLM 106 may function to control the conversational output generated by LLM 106. LLM 106 executing and traversing the FSM graph may cause LLM 106 to generate a different output compared to the same LLM 106 not receiving the FSM graph as an input. LLM 106 executing and traversing the FSM graph may prevent LLM 106 from generating a response message containing an error, containing sensitive data, containing irrelevant data, containing data based on a hallucination, and the like. Therefore, controlling LLM 106 using the FSM graphs in the manner described herein may improve the computer technology of the LLMs and the responses generated thereby.
[0197] The foregoing processes and systems further enable LLM 106 to engage in highly intricate dialogs, such as long conversations, adversarial conversations, factually incorrect conversations, user-manipulative conversations, conversations in which a user switches between topics (e.g., complicated and / or convoluted conversations), and the like, by returning logical and / or controlled responses to user inputs.
[0198] With continued reference to FIG. 1 , the message and the response message may be part of a dialog between user device 102 and LLM 106. The dialog between user device and LLM 106 may be associated with any suitable topic, and the process and system may be implemented for any suitable use case involving large language models engaging in automated conversations with users.
[0199] It will be appreciated that the dialog between user device 102 and LLM 106 may be conducted in real time such that a prompt from user device 102 to LLM 106 may trigger a response (e.g., generating and returning a response) from LLM 106 in real time relative to receiving the prompt (e.g., in real-time, in near real-time, during the event, as soon as practically available after the event, during processing and / or communication of messages related to the event, at the time of making a decision related to the event (e.g., receiving the prompt)). For example, the term “real time”may refer to performance of a task or tasks during another process or before another process is completed.
[0200] In some non-limiting embodiments or aspects, chatbot system 104 may be a component of a transaction processing system (e.g., of a transaction service provider) and / or an issuer system. LLM 106 may be remote from and not a component of the transaction processing system and / or the issuer system. LLM 106 may be an instance of an LLM prepared specifically for use with the transaction processing system and / or the issuer system.
[0201] In some non-limiting embodiments or aspects, chatbot system 104 may be a component of a transaction processing system and client system 1 12 may be a component of an issuer system. In some non-limiting embodiments or aspects, chatbot system 104 may be a component of a transaction processing system and client system 1 12 may be associated with a client of transaction processing system.
[0202] In some non-limiting embodiments or aspects, the dialog between user device 102 and LLM 106 may be associated with an electronic payment transaction of the user. The dialog between user device 102 and LLM 106 may be associated with an account (e.g., payment account) of the user. The dialog between user device 102 and LLM 106 may be associated with a customer service application, where the user is a customer of chatbot system 104 and / or client system 1 12.
[0203] Referring again to FIG. 3, in some non-limiting embodiments or aspects, the message received by chatbot system 104 from user device 102 (as previously described) may comprise text. The text may comprise at least one sensitive data element. The sensitive data element may include any data that user device 102 and / or chatbot system 104 and / or client system 1 12 does not want to share, such as confidential data, proprietary data, personally identifiable data, a trade secret, account data, customer data, and / or any other type of data that a system may wish to keep from other systems and / or entities. The sensitive data element may comprise personally identifiable information (PH) and / or sensitive personal information (SPI).
[0204] Non-limiting examples of sensitive data elements for applications in which the dialog between user device 102 and LLM 106 is associated with an electronic payment transaction and / or an account of the user may comprise at least one of the following: a user name, a merchant name, a transaction amount, an account balance, a payment device and / or account identifier, and / or any combination thereof.
[0205] In some non-limiting embodiments or aspects, in response to receiving the message from user device 102, chatbot system 104 (e.g., PH system 320 thereof) may apply a filter to the message. For example, the filter may comprise a regex filter. The regex filter may be configured to detect strings and / or substrings of text using string pattern matching. By applying the filter, chatbot system 104 may identify the sensitive data element having a first format; and modify the sensitive data element having the first format to a sensitive data element having a second format. Reformatting the sensitive data elements may enable the sensitive data elements having the second format to be identified by downstream processes as described hereinafter and / or to be replaced by generated de-identified data elements as described hereinafter.
[0206] In response to receiving the message from user device 102, chatbot system 104 (e.g., PH system 320 thereof) may automatically determine that at least a portion of the text comprises a sensitive data element. PH system 320 may automatically determine that at least a portion of the text comprises a sensitive data element using any suitable protocol. For example, PH system 320 may comprise a regex filter configured to identify sensitive data elements in the text. For example, PH system 320 may comprise a model, such as an LLM and / or an NLP model, configured to identify sensitive data elements in the text.
[0207] With continued reference to FIG. 3, chatbot system 104 (e.g., PH system 320 thereof) may automatically generate a de-identified data element based on the sensitive data element. The de-identified data element may correspond to the sensitive data element and be used in the dialog to represent the sensitive data element. For example, the de-identified data element may comprise at least one of the following relative to the sensitive data element: a genericized version thereof, a description thereof, a category thereof, an approximation thereof, and / or any combination thereof.
[0208] Chatbot system 104 (e.g., PH system 320 thereof) may automatically generate the de-identified data element using any suitable protocol. For example, PH system 320 may comprise a regex filter configured to identify sensitive data elements in the text and replace the sensitive data element with a corresponding de-identified data element. For example, PH system 320 may comprise a model, such as an LLM and / or an NLP model, configured to generate a de-identified data element based on the sensitive data element input thereto. For example, PH system 320 may comprise a look-up table to generate the de-identified data element corresponding to thesensitive data element, and the look-up table may map a data element and / or a data type / category to a de-identified data element.
[0209] In response to automatically determining that the at least a portion of the text comprises the sensitive data element, chatbot system 104 (e.g., PH system 320 thereof) may determine a category of the sensitive data element. The category may comprise the type of data represented by the sensitive data element. Non-limiting examples of data types correspond to the previously listed types of sensitive data elements. For example, for applications in which the dialog between user device 102 and LLM 106 is associated with an electronic payment transaction and / or an account of the user, the category may comprise at least one of the following: a user name, a merchant name, a transaction amount, an account balance, a payment device and / or account identifier, and / or any combination thereof. The de-identified data element may be generated based on the category of the sensitive data element. The category of data may determine the type of de-identified data element used to describe that type of data.
[0210] In some non-limiting embodiments or aspects, the sensitive data element may comprise a merchant name. PH system 320 may identify the sensitive data element as belong to the category of a merchant name. De-identified data element for merchant name may be generated by retrieving a merchant category code associated with the merchant name, such as from a look-up table or other data structure mapping merchant names to merchant category codes. The de-identified data element may be generated based on the retrieved merchant category code. The de-identified data element being generated based on the retrieved merchant category code may result in the de-identified data element comprising a generic description goods and / or services provided by the merchant (e.g., “Apex Streaming” to “Streaming Service” or “Streaming Service Merchant”).
[0211] With continued reference to FIG. 3, chatbot system 104 may modify the message received from user device 102, such as by modifying at least a portion of the text of the message. Chatbot system 104 may modify the message by replacing the sensitive data element with the de-identified data element to form a modified message.
[0212] In some non-limiting embodiments or aspects, automatically determining that the at least a portion of the text of the message comprises the sensitive data element may include chatbot system 104 identifying the sensitive data element in the text. A start location in the text of the sensitive data element may be determined bychatbot system 104. An end location in the text of the sensitive data element may be determined by chatbot system 104. For example, the start and end locations may be determined using a regex filter. For example, the start and end locations may be determined using a model, such as an LLM and / or an NLP model. In response to identifying the sensitive data element and its start and end locations, chatbot system 104 may modify the message. The message may be modified by removing a segment of the text from the start location to the end location (e.g., the determined sensitive data element) and inserting the de-identified data element in place of the removed segment, thus forming the modified message.
[0213] With continued reference to FIG. 3, chatbot system 104 may transmit the modified message containing the de-identified data element to LLM 106 remote from chatbot system 104. LLM 106 may be operated by or on behalf of an entity different from chatbot system 104, and LLM 106 may not receive any sensitive data elements from chatbot system 104, thus preserving privacy of the data contained in the original message from user device 102.
[0214] LLM 106 may generate the response message as previously described with the exception that LLM 106 may generate the response message based on the modified message (e.g., without access to the sensitive data elements). The response message generated by LLM 106 may comprise second text comprising at least one de-identified data element from the modified message received by LLM 106. The response message may answer to the prompt (e.g., the modified message). In some non-limiting embodiments or aspects, LLM 106 may generate the response to the modified message without receiving and / or traversing an FSM graph. In some nonlimiting embodiments or aspects, LLM 106 may generate the response to the modified message based on receiving and / or traversing an FSM graph, as was previously described in detail. LLM 106 may transmit the response message to chatbot system 104 in response to receiving the modified message.
[0215] In response to receiving the response message comprising the second text from LLM 106, chatbot system 104 may retrieve the sensitive data elements associated with the de-identified data elements contained in the response message. The de-identified data elements in the response message may be identified in the same or similar manner as chatbot system 104 identified the sensitive data elements in the original message from user device 102. Chatbot system 104 may identify the de-identified data elements in the second text of the response message and retrievethe sensitive data elements corresponding to the identified de-identified data elements.
[0216] Chatbot system 104 may modify the response message received from LLM 106 by replacing the de-identified data elements from the second text with the corresponding sensitive data elements. Replacing the de-identified data elements from the second text with the corresponding sensitive data elements may form a modified response message.
[0217] With continued reference to FIG. 3, chatbot system 104 may output the modified response message containing the sensitive data elements to user device 102. User device 102 may display the modified response message and continue the conversation with LLM 106, such as by responding to the modified response message.
[0218] Referring to FIGS. 5A-5F, a process is shown for maintaining sensitive data in a chatbot system, according to some non-limiting embodiments or aspects. The process is described in connection with system 100 from FIG. 1 .
[0219] FIG. 5A shows a non-limiting example of a message generated by user device 102 and transmitted to chatbot system 104. In this non-limiting example, the message is “I am John Smith. My card number is 1234 5678 9101 1 121 , and my statement lists a purchase with Apex Streaming on March 1 , 2025 for $102.33. I never made this transaction and believe it is fraudulent.”
[0220] FIG. 5B shows a non-limiting example of chatbot system 104 automatically determining that at least a portion of the text comprises a sensitive data element. The portions of the text of the message determined by chatbot system 104 as being sensitive data elements are emphasized in FIG. 5B by being surrounded by the rectangle user interface elements. The sensitive data elements determined in the message include: “John Smith” (a user name), “1234 5678 9101 1 121 ” (a payment device identifier), “Apex Streaming” (a merchant name), “March 1 , 2025” (a transaction date), and “$102.33” (a transaction amount).
[0221] FIG. 5C shows a non-limiting example of chatbot system 104 generating a de-identified data element based on the sensitive data element. FIG. 5C shows a table mapping the de-identified data element generated by chatbot system 104 for each sensitive data element from the message. Each de-identified data element may comprise a genericized version, a description, a category, an approximation, and / or any combination thereof of the sensitive data element. The de-identified data element for “John Smith” may be “Person”. The de-identified data element for “1234 5678 91011 121 ” may be “Card Number”. The de-identified data element for “Apex Streaming” may be “Streaming Service”. The de-identified data element for “March 1 , 2025” may be “Date”. The de-identified data element for “$102.33” may be “Amount”.
[0222] FIG. 5D shows a non-limiting example of chatbot system 104 modifying the message by replacing the sensitive data elements with the de-identified data elements to form a modified message. The de-identified data elements replacing the sensitive data elements are set off by “<>” in the modified message for emphasis. The modified message in this non-limiting example is “I am <Person>. My card number is cCard Number>, and my statement lists a purchase with <Streaming Service> on <Date> for <Amount>. I never made this transaction and believe it is fraudulent.” The modified message may be free of sensitive data elements. Chatbot system 104 may transmit the modified message containing the de-identified data elements to LLM 106, such as a model remote from chatbot system 104.
[0223] FIG. 5E shows a non-limiting example of LLM 106 processing the modified message and automatically generating a response message comprising second text in response to receiving the modified message. The second text in the response message may comprise at least one of the de-identified data elements. The response message in this non-limiting example is “Thank you <Person> for contacting us. Your <Streaming Service> transaction has been cancelled on cCard Number>. The transaction has been reported to our fraud investigation system.” LLM 106 may transmit the response message to chatbot system 104.
[0224] FIG. 5F shows a non-limiting example of chatbot system 104 modifying the response message by replacing the de-identified data elements with the sensitive data elements to form a modified response message. Each de-identified data element may be removed from the response message and replaced with the original sensitive data element corresponding to the de-identified data element. The modified response message in this non-limiting example is “Thank you John Smith for contacting us. Your Apex Streaming transaction has been cancelled on 1234 5678 9101 1 121. The transaction has been reported to our fraud investigation system.” The modified response message may be output to user device 102.
[0225] The non-limiting examples of a conversation topic between user device 102 and chatbot system 104 / LLM 106 in FIGS. 5A-5F is the user challenging a fraudulent transaction and / or requesting a stop payment service. However, it will be appreciated that any suitable conversation topic may be handled by the foregoing system, such asa transaction look-up, a merchant look-up, a transaction report request, an account report request, account open / close request, payment device open / close request, and the like. It will be further appreciated that the foregoing conversation system may be implemented for non-payment account applications. For example, the conversation system may be used for applications in which the users submit requests containing sensitive data elements (e.g., financial applications, healthcare applications, cyber security applications, government applications, technology applications, manufacturing applications, e-commerce applications, and the like).
[0226] Referring now to FIG. 6, shown is a flow diagram for integrating a finite state machine (FSM) in a chatbot system, according to some non-limiting embodiments or aspects. The steps shown in FIG. 6 are for example purposes only. It will be appreciated that additional, fewer, different, and / or a different order of steps may be used in some non-limiting embodiments or aspects. In some non-limiting embodiments or aspects, a step may be automatically performed in response to performance and / or completion of a prior step.
[0227] In some non-limiting embodiments or aspects, process 600 may include: configuring, with an issuer system (or other client system or device), a plurality of FSM graphs including the at least one FSM graph by, for each FSM graph of the plurality of FSM graphs: generating a plurality of states, each of the plurality of states comprising a function; connecting the plurality of states in the directed graph; and associating at least one dialog flow type with the FSM graph. FSM builder 108 may configure the FSM graphs. Client system 1 12 may configure the FSM graphs using FSM builder 108. In some non-limiting embodiments or aspects, an issuer system (a non-limiting example of client system 112) may configure FSM graphs using FSM builder 108.
[0228] In some non-limiting embodiments or aspects, LLM 106 may execute a function of a first state of the plurality of states. LLM 106 may execute the function of the first state by executing the executable instructions associated therewith.
[0229] As shown in FIG. 6, at step 602, process 600 may include storing, with a chatbot system 104 comprising at least one processor, at least one finite state machine (FSM) graph. The at least one FSM graph may comprise a plurality of states connected in a directed graph. The at least one FSM graph may be associated with a dialog flow type. Each state of the plurality of states may include at least one function configured to be executed during the state. The FSM graph may comprise a plurality of states (e.g., nodes) connected in a directed graph. The FSM graph may comprisea representation of the directed graph, such as a data structure representing the directed graph. Non-limiting examples of a dialog flow type include a conversation topic and / or subject matter related to a request of a user. A function of a state may comprise a software function, such as a set of instructions associated with the function that, when executed by at least one processor (e.g., a processor of LLM 106), are configured to execute the function. FSM database 110 may store the FSM graph (e.g., a data structure representation thereof) and the functions associated with states thereof in response to receiving FSM graphs configured by FSM builder 108.
[0230] As shown in FIG. 6, at step 604, process 600 may include receiving, with chatbot system 104, a message from user device 102 of a user, the message comprising text. The message comprising text may include the start of and / or continuation of a dialog between user device 102 and LLM 106.
[0231] As shown in FIG. 6, at step 606, process 600 may include automatically determining, with chatbot system 104, that the text is associated with the dialog flow type. Chatbot system 104 may determine that the text is associated with the dialog flow type. Chatbot system 104 may engage LLM 106 to determine that the text is associated with the dialog flow, such as using LLM 106 to analyze the text.
[0232] In some non-limiting embodiments or aspects, determining that the text is associated with the dialog flow type is based on the text and a dialog history of dialog with user device 102. The dialog history may be associated with user device 102 and / or historical dialog data associated with other user devices. The text and a dialog history may be input to LLM 106 to enable LLM 106 to determine with which of the dialog flow types the text is associated.
[0233] As shown in FIG. 6, at step 608, process 600 may include, in response to determining that the text is associated with the dialog flow type, retrieving, with chatbot system 104, the at least one FSM graph (e.g., a data structure representation thereof) and the at least one function configured to be applied during each of the plurality of states of the at least one FSM graph. Chatbot system 104 may retrieve this data from FSM database 1 10.
[0234] As shown in FIG. 6, at step 610, process 600 may include inputting, with chatbot system 104, the text, the at least one FSM graph (e.g., a data structure representation thereof), and the at least one function into LLM 106. The input may cause LLM 106 to generate a response message to the text based on the at least one FSM graph, at least one state of the plurality of states of the at least one FSM graph,and / or at least one function of the at least one state. Chatbot system 104 may input this data to LLM 106, and LLM 106 may generate the response message based thereon.
[0235] As shown in FIG. 6, at step 612, process 600 may include receiving, with chatbot system 104, the response message from LLM 106.
[0236] As shown in FIG. 6, at step 614, process 600 may include outputting, with chatbot system 104, the response message to user device 102. The output may comprise at least one of the following: text data, audio data, and / or visual data. User device 102 may display the output. User device 102 may emit (e.g., play) the audio data output.
[0237] In some non-limiting embodiments or aspects, process 600 may include: in response to receiving the text, the at least one FSM graph, and the at least one function, determining, with LLM 106, a function of the at least one function (e.g., a next function) to be executed based on at least one of the following: the text, the at least one FSM graph, the at least one function, and / or any combination thereof.
[0238] In some non-limiting embodiments or aspects, the function to be executed comprises a transition from a first state in the at least one FSM graph to a second state in the at least one FSM graph. Process 600 may include traversing, with LLM 106, the at least one FSM graph from the first state to the second state.
[0239] In some non-limiting embodiments or aspects, LLM 106 is precluded from executing a function different from the at least one function during traversal of the at least one FSM graph.
[0240] In some non-limiting embodiments or aspects, the function to be executed comprises generating the response message to the text. Process 600 may include: generating, with LLM 106, the response message to the text based on the text; and transmitting, with LLM 106, the response message to chatbot system 104. Chatbot system 104 may output the response message to user device 102.
[0241] In some non-limiting embodiments or aspects, process 600 may include: determining, with LLM 106, that the function to be executed is not part of a current state of the at least one FSM graph; and generating and transmitting, with LLM 106, the response message to chatbot system 104 based on the function to be executed not being part of the current state of the at least one FSM graph. The response message may indicate that LLM 106 cannot execute the function due to the function not being part of the current state of FSM graph that LLM 106 is enabled to execute.As such, the FSM graph and the states defined therein may function as guardrails that prevent LLM 106 from executing functions desired by the user but restricted by the system configuring the FSM graph (e.g., an issuer system).
[0242] In some non-limiting embodiments or aspects, process 600 may include: determining, with LLM 106, that the function to be executed includes obtaining a user confirmation. LLM 106 may transmit the response message to chatbot system 104 indicating obtention of a user confirmation should be executed. Chatbot system 104 may execute a protocol to obtain the user confirmation, such as transmitting a confirmation request to user device 102 causing user device 102 to display confirmation options on the interface thereof. In response to selection of one of the displayed confirmation options, chatbot system 104 may receive a confirmation response from user device 102, the confirmation response comprising a confirm indicator or a reject indicator. The confirmation may be obtained outside LLM 106.
[0243] Non-limiting examples of confirmations include a confirmation to cancel a transaction, a confirmation to initiate a transaction, a confirmation to place or remove a hold on an account, and the like.
[0244] In some non-limiting embodiments or aspects, process 600 may include: automatically determining, with chatbot system 104, that at least a portion of the text comprises a sensitive data element; generating, with chatbot system 104, a deidentified data element based on the sensitive data element; modifying, with chatbot system 104, the message by replacing the sensitive data element with the de-identified data element to form a modified message; transmitting, with chatbot system 104, the modified message containing the de-identified data element to LLM 106, LLM 106 remote from chatbot system 104; receiving, with chatbot system 104, the response message from LLM 106, the response message comprising second text, the second text comprising the de-identified data element; in response to receiving the response message comprising the second text, retrieving, with chatbot system 104, the sensitive data element associated with the de-identified data element; modifying, with chatbot system 104, the response message by replacing the de-identified data element with the sensitive data element to form a modified response message; and outputting, with chatbot system 104, the modified response message containing the sensitive data element to user device 102.
[0245] In some non-limiting embodiments or aspects, the sensitive data element may include at least one of the following: a user name, a merchant name, and / or apayment device and / or account identifier. The sensitive data element may comprise PH.
[0246] In some non-limiting embodiments or aspects, the sensitive data element may include a merchant name. Generating the de-identified data element based on the sensitive data element may include: retrieving a merchant category code associated with the merchant name and generating the de-identified data element based on the merchant category code. A database may store associations between merchant names and merchant category codes (e.g., “Smith’s Coffee Shop” corresponds to MCC 1234). A database may store associations between merchant category code and de-identified data elements (e.g., MCC 1234 corresponds to “coffee shop”). The chatbot system 104 may generate the de-identified data element.
[0247] In some non-limiting embodiments or aspects, automatically determining that the at least a portion of the text comprises the sensitive data element may include: identifying the sensitive data element in the text; determining a start location in the text of the sensitive data element; and determining an end location in the text of the sensitive data element. Modifying the message may include removing a segment of the text from the start location to the end location and inserting the de-identified data element in place of the removed segment. Chatbot system 104 may identify the sensitive data element, determine the start and end location of the sensitive data element, and modify the message.
[0248] In some non-limiting embodiments or aspects, process 600 may include, in response to automatically determining that the at least a portion of the text comprises the sensitive data element, determining, with chatbot system 104, a category of the sensitive data element. The de-identified data element may be generated based on the category of the sensitive data element. The category may include at least one of the following: a user name, a merchant name, and / or a payment device and / or account identifier.
[0249] In some non-limiting embodiments or aspects, process 600 may include, in response to receiving the message, applying a filter to the message to: identify the sensitive data element having a first format; and modify the sensitive data element having the first format to a sensitive data element having a second format. Chatbot system 104 may identify the sensitive data element and modify the sensitive data element from the first format to the second format. The filter may comprise a regular expression (Regex) filter.
[0250] In some non-limiting embodiments or aspects, chatbot system 104 may be a component of a transaction processing system and / or an issuer system, and LLM 106 may be remote from and not a component of the transaction processing system and / or the issuer system.
[0251] In some non-limiting embodiments or aspects, the message and the modified response message may be part of a dialog between user device 102 and LLM 106. The dialog may be associated with an electronic payment transaction of the user. For example, the dialog may be associated with a user looking up a previous electronic payment transaction (e.g., based on date and / or merchant), a user challenging a past electronic payment transaction, a user stopping a future electronic payment transaction, and the like.
[0252] Referring now to FIG. 7, shown is a flow diagram for a method for maintaining sensitive data in a chatbot system, according to some non-limiting embodiments or aspects. The steps shown in FIG. 7 are for example purposes only. It will be appreciated that additional, fewer, different, and / or a different order of steps may be used in some non-limiting embodiments or aspects. In some non-limiting embodiments or aspects, a step may be automatically performed in response to performance and / or completion of a prior step.
[0253] As shown in FIG. 7, at step 702, process 700 may include receiving, with chatbot system 104 comprising at least one processor, a message from a user device of a user, the message comprising text. For example, chatbot system 104 may receive the message from user device 102. The message comprising text may be text the user intends to transmit to LLM 106 to engage or further the dialog between the user and LLM 106.
[0254] As shown in FIG. 7, at step 704, process 700 may include automatically determining, with chatbot system 104, that at least a portion of the text comprises a sensitive data element. For example, chatbot system 104 may automatically determine that at least a portion of the text (e.g., in the message) comprises the sensitive data element.
[0255] In some non-limiting embodiments or aspects, the sensitive data element may include at least one of the following: a user name, a merchant name, and / or a payment device and / or account identifier. The sensitive data element may comprise PH.
[0256] In some non-limiting embodiments or aspects, the sensitive data element may include a merchant name. Generating the de-identified data element based on the sensitive data element may include: retrieving a merchant category code associated with the merchant name and generating the de-identified data element based on the merchant category code. A database may store associations between merchant names and merchant category codes. A database may store associations between merchant category codes and de-identified data elements. Chatbot system 104 may generate the de-identified data element.
[0257] In some non-limiting embodiments or aspects, automatically determining that the at least a portion of the text comprises the sensitive data element may include: identifying the sensitive data element in the text; determining a start location in the text of the sensitive data element; and determining an end location in the text of the sensitive data element. Modifying the message may include removing a segment of the text from the start location to the end location (i.e., the sensitive data element) and inserting the de-identified data element in place of the removed segment.
[0258] As shown in FIG. 7, at step 706, process 700 may include generating, with chatbot system 104, a de-identified data element based on the sensitive data element. For example, chatbot system 104 may generate the de-identified data element based on the sensitive data element.
[0259] As shown in FIG. 7, at step 708, process 700 may include modifying, with chatbot system 104, the message by replacing the sensitive data element with the deidentified data element to form a modified message. For example, chatbot system 104 may modify the message by replacing the sensitive data element with the deidentified data element to form a modified message.
[0260] As shown in FIG. 7, at step 710, process 700 may include transmitting, with chatbot system 104, the modified message containing the de-identified data element to an LLM remote from chatbot system 104. For example, chatbot system 104 may transmit the modified message containing the de-identified data element to LLM 106 remote from chatbot system 104. Sensitive data elements may have been removed prior to transmitting the modified message, such that LLM 106 does not receive the sensitive data elements.
[0261] As shown in FIG. 7, at step 712, process 700 may include receiving, with the chatbot system, a response message from the LLM, the response messagecomprising second text, the second text comprising the de-identified data element. For example, chatbot system 104 may receive the response message from LLM 106.
[0262] As shown in FIG. 7, at step 714, process 700 may include, in response to receiving the response message comprising the second text, retrieving, with chatbot system 104, the sensitive data element associated with the de-identified data element. For example, chatbot system 104 may retrieve the sensitive data element associated with the de-identified data element. The association between the sensitive data element and the de-identified data element may be stored in a database.
[0263] As shown in FIG. 7, at step 716, process 700 may include modifying, with chatbot system 104, the response message by replacing the de-identified data element with the sensitive data element to form a modified response message. For example, chatbot system 104 may modify the response message by replacing the deidentified data element with the sensitive data element to form a modified response message.
[0264] As shown in FIG. 7, at step 718, process 700 may include outputting, with chatbot system 104, the modified response message containing the sensitive data element to the user device. For example, chatbot system 104 may output the modified response message containing the sensitive data element to user device 102. The output may comprise at least one of the following: text data, audio data, and / or visual data. User device 102 may display the output. User device 102 may emit (e.g., play) the audio data output.
[0265] In some non-limiting embodiments or aspects, process 700 may include, in response to automatically determining that the at least a portion of the text comprises the sensitive data element, determining, with chatbot system 104, a category of the sensitive data element. The de-identified data element may be generated based on the category of the sensitive data element. The category may include at least one of the following: a user name, a merchant name, and / or a payment device and / or account identifier.
[0266] In some non-limiting embodiments or aspects, process 700 may include, in response to receiving the message, applying a filter to the message to: identify the sensitive data element having a first format; and modify the sensitive data element having the first format to a sensitive data element having a second format. Chatbot system 104 may identify the sensitive data element and modify the sensitive dataelement from the first format to the second format. The filter may comprise a regular expression (Regex) filter.
[0267] In some non-limiting embodiments or aspects, chatbot system 104 may be a component of a transaction processing system and / or an issuer system, and LLM 106 may be remote from and not a component of the transaction processing system and / or the issuer system.
[0268] In some non-limiting embodiments or aspects, the message and the modified response message may be part of a dialog between user device 102 and LLM 106. The dialog may be associated with an electronic payment transaction of the user. For example, the dialog may be associated with a user looking up a previous electronic payment transaction (e.g., based on date and / or merchant), a user challenging a past electronic payment transaction, a user stopping a future electronic payment transaction, and the like.
[0269] FIG. 8 shows an electronic payment processing network 800 according to non-limiting embodiments or aspects. The payment processing network 800 may be used in conjunction with the systems and methods described herein. It will be appreciated that the particular arrangement of electronic payment processing network 800 shown is for example purposes only, and that various arrangements are possible. Transaction processing system 801 (e.g., a transaction handler) is shown to be in communication with one or more issuer systems (e.g., such as issuer system 806) and one or more acquirer systems (e.g., such as acquirer system 808). Although only a single issuer system 806 and single acquirer system 808 are shown, it will be appreciated that transaction processing system 801 may be in communication with a plurality of issuer systems and / or acquirer systems. In some embodiments, transaction processing system 801 may also operate as an issuer system such that both transaction processing system 801 and issuer system 806 are a single system and / or controlled by a single entity.
[0270] In some non-limiting embodiments or aspects, transaction processing system 801 may communicate with merchant system 804 directly through a public or private network connection. Additionally or alternatively, transaction processing system 801 may communicate with merchant system 804 through payment gateway 802 and / or acquirer system 808. In some non-limiting embodiments or aspects, an acquirer system 808 associated with merchant system 804 may operate as payment gateway 802 to facilitate the communication of transaction requests from merchantsystem 804 to transaction processing system 801. Merchant system 804 may communicate with payment gateway 802 through a public or private network connection. For example, a merchant system 804 that includes a physical POS device may communicate with payment gateway 802 through a public or private network to conduct card-present transactions. As another example, a merchant system 804 that includes a server (e.g., a web server) may communicate with payment gateway 802 through a public or private network, such as a public Internet connection, to conduct card-not-present transactions.
[0271] In some non-limiting embodiments or aspects, transaction processing system 801 , after receiving a transaction request from merchant system 804 that identifies an account identifier of a payor (e.g., such as an account holder) associated with an issued payment device 810 (e.g., a consumer device), may generate an authorization request message to be communicated to the issuer system 806 that issued the payment device 810 and / or account identifier. Issuer system 806 may then approve or decline the authorization request and, based on the approval or denial, generate an authorization response message that is communicated to transaction processing system 801. Transaction processing system 801 may communicate an approval or denial to merchant system 804. When issuer system 806 approves the authorization request message, it may then clear and settle the payment transaction between the issuer system 806 and acquirer system 808.
[0272] Referring now to FIG. 9, shown is a diagram of example components of a device 900 according to non-limiting embodiments. Device 900 may correspond to user device 102, chatbot system 104, LLM 106, FSM builder 108, FSM database 1 10, client system 1 12, user database 214, user chat database 216, LLM router 318, PH system 320, transaction processing system 801 , payment gateway 802, merchant system 804, issuer system 806, acquirer system 808, and / or payment device 810 of FIGS. 1 -8, as an example. In some non-limiting embodiments, such systems or devices may include at least one device 900 and / or at least one component of device 900. The number and arrangement of components shown are provided as an example. In some non-limiting embodiments, device 900 may include additional components, fewer components, different components, or differently arranged components than those shown. Additionally, or alternatively, a set of components (e.g., one or more components) of device 900 may perform one or more functions described as being performed by another set of components of device 900.
[0273] As shown in FIG. 9, device 900 may include a bus 902, a processor 904, memory 906, a storage component 908, an input component 910, an output component 912, and a communication interface 914. Bus 902 may include a component that permits communication among the components of device 900. In some non-limiting embodiments, processor 904 may be implemented in hardware, firmware, or a combination of hardware and software. For example, processor 904 may include a processor (e.g., a central processing unit (CPU), a graphics processing unit (GPU), an accelerated processing unit (APU), etc.), a microprocessor, a digital signal processor (DSP), and / or any processing component (e.g., a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), etc.) that can be programmed to perform a function. Memory 906 may include random access memory (RAM), read only memory (ROM), and / or another type of dynamic or static storage device (e.g., flash memory, magnetic memory, optical memory, etc.) that stores information and / or instructions for use by processor 904.
[0274] With continued reference to FIG. 9, storage component 908 may store information and / or software related to the operation and use of device 900. For example, storage component 908 may include a hard disk (e.g., a magnetic disk, an optical disk, a magneto-optic disk, a solid-state disk, etc.) and / or another type of computer-readable medium. Input component 910 may include a component that permits device 900 to receive information, such as via user input (e.g., a touch screen display, a keyboard, a keypad, a mouse, a button, a switch, a microphone, etc.). Additionally, or alternatively, input component 910 may include a sensor for sensing information (e.g., a global positioning system (GPS) component, an accelerometer, a gyroscope, an actuator, etc.). Output component 912 may include a component that provides output information from device 900 (e.g., a display, a speaker, one or more light-emitting diodes (LEDs), etc.). Communication interface 914 may include a transceiver-like component (e.g., a transceiver, a separate receiver and transmitter, etc.) that enables device 900 to communicate with other devices, such as via a wired connection, a wireless connection, or a combination of wired and wireless connections. Communication interface 914 may permit device 900 to receive information from another device and / or provide information to another device. For example, communication interface 914 may include an Ethernet interface, an optical interface, a coaxial interface, an infrared interface, a radio frequency (RF) interface, auniversal serial bus (USB) interface, a Wi-Fi® interface, a cellular network interface, and / or the like.
[0275] Device 900 may perform one or more processes described herein. Device 900 may perform these processes based on processor 904 executing software instructions stored by a computer-readable medium, such as memory 906 and / or storage component 908. A computer-readable medium may include any non-transitory memory device. A memory device includes memory space located inside of a single physical storage device or memory space spread across multiple physical storage devices. Software instructions may be read into memory 906 and / or storage component 908 from another computer-readable medium or from another device via communication interface 914. When executed, software instructions stored in memory 906 and / or storage component 908 may cause processor 904 to perform one or more processes described herein. Additionally, or alternatively, hardwired circuitry may be used in place of or in combination with software instructions to perform one or more processes described herein. Thus, embodiments described herein are not limited to any specific combination of hardware circuitry and software. The term “configured to,” as used herein, may refer to an arrangement of software, device(s), and / or hardware for performing and / or enabling one or more functions (e.g., actions, processes, steps of a process, and / or the like). For example, “a processor configured to” may refer to a processor that executes software instructions (e.g., program code) that cause the processor to perform one or more functions.
[0276] Although embodiments have been described in detail for the purpose of illustration, it is to be understood that such detail is solely for that purpose and that the disclosure is not limited to the disclosed embodiments or aspects, but, on the contrary, is intended to cover modifications and equivalent arrangements that are within the spirit and scope of the appended claims. For example, it is to be understood that the present disclosure contemplates that, to the extent possible, one or more features of any embodiment or aspect can be combined with one or more features of any other embodiment or aspect.
Claims
WHAT IS CLAIMED IS:1 . A computer-implemented method, comprising: storing, with a chatbot system comprising at least one processor, at least one finite state machine (FSM) graph, the at least one FSM graph comprising a plurality of states connected in a directed graph, the at least one FSM graph associated with a dialog flow type, each state of the plurality of states comprising at least one function configured to be executed during the state; receiving, with the chatbot system, a message from a user device of a user, the message comprising text; automatically determining, with the chatbot system, that the text is associated with the dialog flow type; in response to determining that the text is associated with the dialog flow type, retrieving, with the chatbot system, the at least one FSM graph and the at least one function configured to be applied during each of the plurality of states of the at least one FSM graph; inputting, with the chatbot system, the text, the at least one FSM graph, and the at least one function into a large language model (LLM), causing the LLM to generate a response message to the text based on the at least one FSM graph, at least one state of the plurality of states of the at least one FSM graph, and / or at least one function of the at least one state; receiving, with the chatbot system, the response message from the LLM; and outputting, with the chatbot system, the response message to the user device.
2. The computer-implemented method of claim 1 , further comprising: configuring, with an issuer system, a plurality of FSM graphs including the at least one FSM graph by, for each FSM graph of the plurality of FSM graphs: generating a plurality of states, each of the plurality of states comprising a function; connecting the plurality of states in the directed graph; and associating at least one dialog flow type with the FSM graph.
3. The computer-implemented method of claim 2, wherein the LLM executes a function of a first state of the plurality of states.
4. The computer-implemented method of claim 1 , wherein determining that the text is associated with the dialog flow type is based on the text and a dialog history of dialog with the user device.
5. The computer-implemented method of claim 1 , further comprising: in response to receiving the text, the at least one FSM graph, and the at least one function, determining, with the LLM, a function of the at least one function to be executed based on at least one of the following: the text, the at least one FSM graph, the at least one function, and / or any combination thereof.
6. The computer-implemented method of claim 5, wherein the function to be executed comprises a transition from a first state in the at least one FSM graph to a second state in the at least one FSM graph, the computer-implemented method further comprising: traversing, with the LLM, the at least one FSM graph from the first state to the second state.
7. The computer-implemented method of claim 1 , wherein the LLM is precluded from executing a function different from the at least one function during traversal of the at least one FSM graph.
8. The computer-implemented method of claim 5, wherein the function to be executed comprises generating the response message to the text, the computer-implemented method further comprising: generating, with the LLM, the response message to the text based on the text; and transmitting, with the LLM, the response message to the chatbot system.
9. The computer-implemented method of claim 5, further comprising: determining, with the LLM, that the function to be executed is not part of a current state of the at least one FSM graph; and generating and transmitting, with the LLM, the response message to the chatbot system based on the function to be executed not being part of the current state of the at least one FSM graph.
10. The computer-implemented method of claim 1 , further comprising: automatically determining, with the chatbot system, that at least a portion of the text comprises a sensitive data element; generating, with the chatbot system, a de-identified data element based on the sensitive data element; modifying, with the chatbot system, the message by replacing the sensitive data element with the de-identified data element to form a modified message; transmitting, with the chatbot system, the modified message containing the de-identified data element to the LLM, the LLM remote from the chatbot system; receiving, with the chatbot system, the response message from the LLM, the response message comprising second text, the second text comprising the deidentified data element; in response to receiving the response message comprising the second text, retrieving, with the chatbot system, the sensitive data element associated with the de-identified data element; modifying, with the chatbot system, the response message by replacing the de-identified data element with the sensitive data element to form a modified response message; and outputting, with the chatbot system, the modified response message containing the sensitive data element to the user device.1 1 . The computer-implemented method of claim 1 , wherein the chatbot system is a component of a transaction processing system and / or an issuer system, and the LLM is remote from and not a component of the transaction processing system and / or the issuer system.
12. The computer-implemented method of claim 1 , wherein the message and the response message are part of a dialog between the user device and the LLM.
13. The computer-implemented method of claim 12, wherein the dialog is associated with an electronic payment transaction of the user.
14. A system, comprising a chatbot system comprising at least one processor configured to: store at least one finite state machine (FSM) graph, the at least one FSM graph comprising a plurality of states connected in a directed graph, the at least one FSM graph associated with a dialog flow type, each state of the plurality of states comprising at least one function configured to be executed during the state; receive a message from a user device of a user, the message comprising text; automatically determine that the text is associated with the dialog flow type; in response to determining that the text is associated with the dialog flow type, retrieve the at least one FSM graph and the at least one function configured to be applied during each of the plurality of states of the at least one FSM graph; input the text, the at least one FSM graph, and the at least one function into a large language model (LLM), causing the LLM to generate a response message to the text based on the at least one FSM graph, at least one state of the plurality of states of the at least one FSM graph, and / or at least one function of the at least one state; receive the response message from the LLM; and output the response message to the user device.
15. The system of claim 14, further comprising an issuer system configured to: configure a plurality of FSM graphs including the at least one FSM graph by, for each FSM graph of the plurality of FSM graphs:generating a plurality of states, each of the plurality of states comprising a function; connecting the plurality of states in the directed graph; and associating at least one dialog flow type with the FSM graph.
16. The system of claim 15, wherein the LLM executes a function of a first state of the plurality of states.
17. The system of claim 14, wherein determining that the text is associated with the dialog flow type is based on the text and a dialog history of dialog with the user device.
18. The system of claim 14, further comprising the LLM configured to: in response to receiving the text, the at least one FSM graph, and the at least one function, determine a function of the at least one function to be executed based on at least one of the following: the text, the at least one FSM graph, the at least one function, and / or any combination thereof.
19. The system of claim 18, wherein the function to be executed comprises a transition from a first state in the at least one FSM graph to a second state in the at least one FSM graph, the LLM further configured to: traverse the at least one FSM graph from the first state to the second state.
20. The system of claim 14, the chatbot system further configured to: automatically determine that at least a portion of the text comprises a sensitive data element; generate a de-identified data element based on the sensitive data element; modify the message by replacing the sensitive data element with the deidentified data element to form a modified message; transmit the modified message containing the de-identified data element to the LLM, the LLM remote from the chatbot system;receive the response message from the LLM, the response message comprising second text, the second text comprising the de-identified data element; in response to receiving the response message comprising the second text, retrieve the sensitive data element associated with the de-identified data element; modify the response message by replacing the de-identified data element with the sensitive data element to form a modified response message; and output the modified response message containing the sensitive data element to the user device.
21. A computer program product comprising at least one non- transitory computer-readable medium including program instructions that, when executed by a chatbot system comprising at least one processor, cause the at least one processor to: store at least one finite state machine (FSM) graph, the at least one FSM graph comprising a plurality of states connected in a directed graph, the at least one FSM graph associated with a dialog flow type, each state of the plurality of states comprising at least one function configured to be executed during the state; receive a message from a user device of a user, the message comprising text; automatically determine that the text is associated with the dialog flow type; in response to determining that the text is associated with the dialog flow type, retrieve the at least one FSM graph and the at least one function configured to be applied during each of the plurality of states of the at least one FSM graph; input the text, the at least one FSM graph, and the at least one function into a large language model (LLM), causing the LLM to generate a response message to the text based on the at least one FSM graph, at least one state of the plurality of states of the at least one FSM graph, and / or at least one function of the at least one state; receive the response message from the LLM; and output the response message to the user device.
Citation Information
Patent Citations
Configuration methods for human-computer dialogue systems, configuration platforms for multi-turn dialogue systems, and electronic devices.
CN111611357B
System and method of active chat robot with composite finite-state machine
CN116775834A
Dialogue device, weight information learning device, dialogue method, weight information learning method, and program
JP5582225B2
Community-driven, context-aware intelligent research assistant systems
US11768880B1
Method and Apparatus for Obtaining Information from the Web
US20170249385A1