AI user intent for actions on a user device
Systems and methods for classifying user intent based on the user interaction with an entry bar on a user device include receiving an input from a user in an entry box; classifying the input into a category of a plurality of categories including a category for an Artificial Intelligence (AI) session for an AI agent; and performing an action responsive to the classified category, including utilizing the AI agent for the AI session when the category is the category for the AI session and bypassing the AI agent for other categories of the plurality of categories.
1 . A method implemented through a user device, the method comprising steps of:
receiving an input from a user in an entry box of a web browser on the user device;
classifying the input into a category of a plurality of categories including a Uniform Resource Locator (URL) category, a data/resource category and a category for an Artificial Intelligence (AI) session for an AI agent, the classifying being performed locally on the user device, as the input is being received and prior to completion of the input, and prior to initiating any remote AI-session or data-service request for the input, by first applying pattern matching using regular expressions until a confidence threshold is met and, if not met, invoking a general-purpose AI model associated with the AI agent that is configured via token reweighting to deterministically output a single-token class label; and
performing an action responsive to the classified category, including preloading a webpage when the category is the URL category, establishing and priming an AI session when the category is the category for the AI session, and bypassing the AI agent for other categories of the plurality of categories.
2 . The method of claim 1 , wherein the classifying is performed by an AI model associated with the AI agent, the AI model being a general-purpose AI model configured to perform the AI session as well as to provide the classifying.
3 . The method of claim 1 , wherein the classifying is performed using matching via regular expressions, the regular expressions comprising predefined URL patterns and keyword templates that are executed entirely locally on the user device to filter likely categories before invoking any AI model.
4 . The method of claim 1 , wherein the classifying is performed first using matching via regular expressions as the input is being received until a confidence level is reached, and second via an AI model associated with the AI agent where the confidence level is not reached.
5 . The method of claim 1 , wherein the plurality of categories also includes a category for a Uniform Resource Locator (URL) for loading an associated address and a category for data for obtaining a resource from an external system.
6 . The method of claim 1 , wherein the classifying is performed as the input is being received until a confidence level is reached, without having a full input from the user.
7 . The method of claim 1 , wherein the classifying includes:
for each character of the input during the receiving, attempting to determine the category;
determining a confidence score for each of the attempting; and
determining the classified category based on a level of the confidence score, wherein the confidence score is dynamically updated as each character is entered and used to trigger anticipatory preactions including connection setup of resource allocation.
8 . The method of claim 1 , wherein the performing the action includes pre-loading a webpage when the category is the Uniform Resource Locator (URL), the pre-loading beginning before the user completes the full URL input based on a predicted completion and continuing in parallel with the ongoing classification.
9 . The method of claim 1 , wherein the performing the action includes, when the category is the AI session:
performing a connection to the AI agent; and
loading base prompts and some parts of a query to the AI agent.
10 . A non-transitory computer-readable medium storing instructions that, when executed, cause one or more processors on a user device to perform steps of:
receiving an input from a user in an entry box of a web browser on the user device;
classifying the input into a category of a plurality of categories including a Uniform Resource Locator (URL) category, a data/resource category, and a category for an Artificial Intelligence (AI) session for an AI agent, the classifying being performed locally on the user device, as the input is being received and prior to completion of the input, and prior to initiating any remote AI-session or data-service request for the input, by first applying pattern matching using regular expressions until a confidence threshold is met and, if not met, invoking a general-purpose AI model associated with the AI agent that is configured via token reweighting to deterministically output a single-token class label; and
performing an action responsive to the classified category, including preloading a webpage when the category is the URL category establishing and priming an AI session when the category is the category for the AI session and, bypassing the AI agent for other categories of the plurality of categories.
11 . The non-transitory computer-readable medium of claim 10 , wherein the classifying is performed by an AI model associated with the AI agent, the AI model being a general-purpose AI model configured to perform the AI session as well as to provide the classifying.
12 . The non-transitory computer-readable medium of claim 10 , wherein the classifying is performed using matching via regular expressions, the regular expressions comprising predefined URL patterns and keyword templates that are executed entirely locally on the user device to filter likely categories before invoking any AI model.
13 . The non-transitory computer-readable medium of claim 10 , wherein the classifying is performed first using matching via regular expressions as the input is being received until a confidence level is reached, and second via an AI model associated with the AI agent where the confidence level is not reached.
14 . The non-transitory computer-readable medium of claim 10 , wherein the plurality of categories also includes a category for a Uniform Resource Locator (URL) for loading an associated address and a category for data for obtaining a resource from an external system.
15 . The non-transitory computer-readable medium of claim 10 , wherein the classifying is performed as the input is being received until a confidence level is reached, without having a full input from the user.
16 . The non-transitory computer-readable medium of claim 10 , wherein the classifying includes:
for each character of the input during the receiving, attempting to determine the category;
determining a confidence score for each of the attempting; and
determining the classified category based on a level of the confidence score, wherein the confidence score is dynamically updated as each character is entered and used to trigger anticipatory preactions including connection or resource allocation.
17 . The non-transitory computer-readable medium of claim 10 , wherein the performing the action includes pre-loading a webpage when the category is Uniform Resource Locator (URL), the pre-loading beginning before the user complete s the full URL input based on a predicted completion and continuing in parallel with the ongoing classification.
18 . The non-transitory computer-readable medium of claim 10 , wherein the performing the action includes, when the category is the AI session:
performing a connection to the AI agent; and
loading base prompts and some parts of a query to the AI agent.
19 . A user device comprising:
one or more processors; and
memory storing instructions that, when executed, cause the one or more processors to:
receive an input from a user in an entry box of a web browser on the user device;
classify the input into a category of a plurality of categories including a Uniform Resource Locator (URL) category, a data/resource category, and a category for an Artificial Intelligence (AI) session for an AI agent, the classifying being performed locally on the user device, as the input is being received and prior to completion of the input, and prior to initiating any remote AI-session of data-service request for the input, by first applying pattern matching using regular expressions until a confidence threshold is met and, if not met, invoking a general-purpose AI model associated with the AI agent that is configured via token reweighting to deterministically output a single-token class label; and
perform an action responsive to the classified category, including preloading a webpage when the category is the URL category, establishing and priming an AI session when the category is the category for the AI session and bypassing the AI agent for other categories of the plurality of categories.
20 . The user device of claim 19 , wherein the user device includes an AI model associated with the AI agent, the AI model being a general-purpose AI model configured to perform the AI session as well as to classify the input.