Artificial intelligence to handle financial actions
In one aspect, a computer-implemented method includes: receiving, by an interface to an AI-assistant service, a request to carry out a financial transaction pertaining to a particular account; receiving, from the AI-assistant service, a text response to the request to carry out the financial transaction, wherein the text response is an instruction to carry out the financial transaction; and performing, by a financial service, the financial transaction as instructed in the text response, whereby the financial transaction is semi-autonomously performed in response to the request.
1 . A method comprising:
receiving, by an interface to an artificial intelligence-assistant (AI-assistant) service, a request to carry out a financial transaction pertaining to a particular account;
outputting, by a large language model (LLM) of the AI-assistant service, an intent of the request based on the request;
retrieving, by a query engine from a metric database, a predefined structured query for retrieving a metric relevant to responding to the request from a structured database;
generating, by the LLM, a custom query by varying a parameter of the predefined structured query based on the intent of the request while preserving a structure of the predefined structured query, wherein the predefined structured query comprises a schema-defined template that restricts modification to predefined parameter fields, and wherein the custom query is specific to attributes of a transaction database and adheres to a schema of the transaction database, thereby facilitating the use of the LLM to generate an executable query;
retrieving, by the query engine from the transaction database, transaction data using the custom query, wherein the transaction data is limited to data associated with the particular account based on application of a row-level filter and wherein the transaction data is relevant to the financial transaction;
receiving, from the AI-assistant service, a text response to the request to carry out the financial transaction, wherein the text response is an instruction to carry out the financial transaction and wherein the text response is based in part on the transaction data associated with the particular account;
determining, by a guardrail model, that the text response is not based on transaction data associated with accounts other than the particular account; and
instructing a financial service to complete the financial transaction using the text response, wherein the financial transaction is semi-autonomously performed in response to the request and is based on the text response generated from row-level filtered transaction data.
2 . The method of claim 1 , wherein the interface to the AI-assistant service is a proxy for one or more chatbots or language models.
3 . The method of claim 1 , wherein the interface to the AI-assistant service comprises at least one of a chatbot supported by a language model or a proxy to the language model.
4 . The method of claim 1 , wherein the text response is in natural language or a programming language interpretable by an action engine.
5 . The method of claim 1 , further comprising:
outputting, by the LLM, the text response based, in part, on the intent, wherein the transaction data associated with the particular account is provided as parameters to the LLM.
6 . The method of claim 1 , further comprising:
providing a second prompt to the AI-assistant service, the second prompt including the transaction data relevant to the financial transaction along with information in the request to carry out the financial transaction to the AI-assistant service with instructions to the AI-assistant service to generate the text response to the request to carry out the financial transaction using a retrieval augmented generation technique that focuses the text response to be based on the transaction data relevant to the financial transaction.
7 . The method of claim 6 , further comprising:
evaluating the text response to the second prompt from the AI-assistant service by a knowledge engine, the knowledge engine being configured to confirm that the text response to the second prompt does not include data from accounts other than the particular account, and that the text response to the second prompt comports with expected outputs for requests having a similar intent as the request pertaining to the financial transaction.
8 . The method of claim 6 , wherein the AI-assistant service can be multiple different services, including a general language model service and a domain-specific language model, wherein the first prompt goes to the general language model, and the second prompt goes to the domain-specific language model, wherein the domain-specific language model is trained with domain-specific knowledge.
9 . A computing system comprising:
at least one processor; and
a memory storing instructions that, when executed by the at least one processor, configures the computing system to:
receive, by an interface to an artificial intelligence-assistant (AI-assistant) service, a request to carry out a financial transaction pertaining to a particular account;
output, by a large language model (LLM) of the AI-assistant service, an intent of the request based on the request;
retrieve, from a metric database, a predefined structured query for retrieving a metric relevant to responding to the request from a structured database;
generate, by the LLM a custom query by varying a parameter of the predefined structured query based on the intent of the request while preserving a structure of the predefined structured query, wherein the predefined structured query comprises a schema-defined template that restricts modification to predefined parameter fields, and wherein the custom query is specific to attributes of a transaction database and adheres to a schema of the transaction database, thereby facilitating the use of the LLM to generate an executable query;
retrieve, from the transaction database, transaction data using the custom query, wherein the transaction data is limited to data associated with the particular account based on application of a row-level filter;
receive, from the AI-assistant service, a text response to the request to carry out the financial transaction, wherein the text response is an instruction to carry out the financial transaction and wherein the text response is based in part on the transaction data associated with the particular account;
determine, by a guardrail model, that the text response is not based on transaction data associated with accounts other than the particular account; and
instruct a financial service to complete the financial transaction using the text response, wherein the financial transaction is semi-autonomously performed in response to the request and is based on the text response generated from row-level filtered transaction data.
10 . The computing system of claim 9 , wherein the interface to the AI-assistant service is a proxy for one or more chatbots or language models.
11 . The computing system of claim 9 , wherein the interface to the AI-assistant service comprises at least one of a chatbot supported by a language model or a proxy to the language model.
12 . The computing system of claim 9 , wherein the text response is in natural language or a programming language interpretable by an action engine.
13 . The computing system of claim 9 , wherein the instructions further configure the apparatus to:
output, by the LLM, the text response based, in part, on the intent, wherein the transaction data associated with the particular account is provided as parameters to the LLM.
14 . The computing system of claim 9 , wherein the instructions further configure the apparatus to:
provide a second prompt to the AI-assistant service, the second prompt including the transaction data relevant to the financial transaction along with information in the request to carry out the financial transaction to the AI-assistant service with instructions to the AI-assistant service to generate the text response to the request to carry out the financial transaction using a retrieval augmented generation technique that focuses the text response to be based on the transaction data relevant to the financial transaction.
15 . The computing system of claim 14 , wherein the instructions further configure the apparatus to:
evaluate the text response to the second prompt from the AI-assistant service by a knowledge engine, the knowledge engine being configured to confirm that the text response to the second prompt does not include data from accounts other than the particular account, and that the text response to the second prompt comports with expected outputs for requests having a similar intent as the request pertaining to the financial transaction.
16 . The computing system of claim 14 , wherein the AI-assistant service can be multiple different services, include a general language model service and a domain-specific language model, wherein the first prompt goes to the general language model, and the second prompt goes to the domain-specific language model, wherein the domain-specific language model is trained with domain-specific knowledge.
17 . A non-transitory computer-readable storage medium, the computer-readable storage medium including instructions that when executed by at least one processor, cause the at least one processor to:
receive, by an interface to an artificial intelligence assistant (AI-assistant) service, a request to carry out a financial transaction pertaining to a particular account;
outputting, by a large language model (LLM) of the AI-assistant service, an intent of the request based on the request;
retrieving, from a metric database, a predefined structured query for retrieving a metric relevant to responding to the request from a structured database;
generating, by the LLM a custom query by varying a parameter of the predefined structured query based on the intent of the request while preserving a structure of the predefined structured query, wherein the predefined structured query comprises a schema-defined template that restricts modification to predefined parameter fields, and wherein the custom query is specific to attributes of a transaction database and adheres to a schema of the transaction database, thereby facilitating the use of the LLM to generate an executable query;
retrieving, from the transaction database, transaction data using the custom query, wherein the transaction data is limited to data associated with the particular account based on application of a row-level filter;
receive, from the AI-assistant service, a text response to the request to carry out the financial transaction, wherein the text response is an instruction to carry out the financial transaction and wherein the text response is based in part on the transaction data associated with the particular account;
determine, by a guardrail model, that the text response is not based on transaction data associated with accounts other than the particular account; and
instruct a financial service to complete the financial transaction using the text response, wherein the financial transaction is semi-autonomously performed in response to the request and is based on the text response generated from row-level filtered transaction data.
18 . The computer-readable storage medium of claim 17 , wherein the instructions further configure the at least one processor to:
output, by the LLM, the text response based, in part, on the intent, wherein the transaction data associated with the particular account is provided as parameters to the LLM.
19 . The computer-readable storage medium of claim 17 , wherein the instructions further configure the at least one processor to:
provide a second prompt to the AI-assistant service, the second prompt including the transaction data relevant to the financial transaction along with information in the request to carry out the financial transaction to the AI-assistant service with instructions to the AI-assistant service to generate the text response to the request to carry out the financial transaction using a retrieval augmented generation technique that focuses the text response to be based on the transaction data relevant to the financial transaction.
20 . The computer-readable storage medium of claim 19 , wherein the instructions further configure the at least one processor to:
evaluate the text response to the second prompt from the AI-assistant service by a knowledge engine, the knowledge engine being configured to confirm that the text response to the second prompt does not include data from accounts other than the particular account, and that the text response to the second prompt comports with expected outputs for requests having a similar intent as the request pertaining to the financial transaction.