Artificial intelligence based system and method for adaptively executing tasks based on cost data analysis and budgetary constraints
View Patent ↗An artificial intelligence (AI)-based system and a method for adaptively executing tasks based on cost analysis and budgetary constraints, are disclosed. The AI-based system comprises a data obtaining subsystem, a cost estimating subsystem, a real-time cost monitoring subsystem, and an output generating subsystem. The data obtaining subsystem obtains input data including a monetary value, a token quota, a computational resource limit, textual inputs, an expected output size, Large Language Model (LLM) preference, and retrieval-augmented generation (RAG) steps. The cost estimating subsystem computes estimated cost data for each AI workflow using predefined pricing models. The real-time cost monitoring subsystem continuously monitors execution cost data of AI workflows, in real-time to dynamically adjust the executed cost data in compliance with the pre-defined budget ensuring. The output generating subsystem provides the dynamically adjusted executed cost data with real-time feedback, one or more alerts, and cost reports, ensuring transparency in task execution.
1 . An artificial intelligence (AI)-based method for adaptively executing one or more tasks based on cost analysis and budgetary constraints, the AI-based method comprising:
obtaining, by one or more hardware processors, input data from one or more communication devices associated with one or more users, wherein the input data comprise at least one of: a monetary value indicating a pre-defined budget, a token quota, a computational resource limit, one or more textual inputs, an expected output size, preference of one or more language models, and one or more retrieval-augmented generation (RAG) steps;
computing, by the one or more hardware processors, estimated cost data for each AI workflow of one or more AI workflows using one or more pre-defined pricing models;
monitoring, by the one or more hardware processors, executed cost data of the one or more tasks in the one or more AI workflows in real-time to dynamically adjust the executed cost data of the one or more tasks in the one or more AI workflows in compliance with the pre-defined budget,
wherein monitoring the executed cost data of the one or more tasks in the one or more AI workflows in real-time, comprises:
monitoring, by the one or more hardware processors, at least one of: token usage, inference time, and tool call execution, corresponding to each AI workflow, in real-time based on the estimated cost data;
comparing, by the one or more hardware processors, one or more real-time cost metrics associated with the executed cost data of the one or more AI workflows, with the pre-defined budget provided in the input data, using a decision making module;
determining, by the one or more hardware processors, whether the executed cost data of the one or more tasks in the one or more AI workflows are compliant with the budget constraints based on comparison results, using the decision making module; and
dynamically adjusting, by the one or more hardware processors, one or more execution parameters comprising at least one of: LLM selection, token length, and number of reasoning iterations in real-time, to adapt the executed cost data in compliance with the pre-defined budget provided in the input data, using the decision making module,
wherein dynamically adjusting the one or more execution parameters to adapt the executed cost data in compliance with the pre-defined budget, comprises at least one of:
selecting, by the one or more hardware processors, fixed and deterministic execution flow using less expensive, lower-capacity LLMs and minimal reasoning steps, and reducing a number of reasoning cycles and external tool interactions, using the decision making module when the pre-defined budget is low; and
activating, by the one or more hardware processors, a dynamic execution flow that leverages high-performance LLMs, advanced reasoning, and dynamic decision-making when the pre-defined budget is high.
2 . The AI-based method of claim 1 , wherein computing the estimated cost data for each AI workflow using the one or more pre-defined pricing models, comprises:
assigning, by the one or more hardware processors, at least one of: cost-per-token, cost-per-inference-time unit, and costs fixed tool call, corresponding to each AI workflow of the one or more workflows, using the one or more pre-defined pricing models;
analyzing, by the one or more hardware processors, the input data to estimate token counts for each AI workflow;
computing, by the one or more hardware processors, the estimated cost data for at least one of: RAG, Large Language Model (LLM) processing, and one or more tool and Application Programming Interface (API) calls;
estimating, by the one or more hardware processors, a number of tokens required for task execution, comprising both input and output token counts, for determining LLM inference costs by assessing the input data;
providing, by the one or more hardware processors, a breakdown of estimated cost data for one or more components comprising at least one of: cost per token and cost per API call; and
estimating, by the one or more hardware processors, a cost of sending messages and delegating the one or more tasks for computing the estimated cost data by analyzing at least one of: token counts, processing time, and external API usage, using an inter-agent cost estimation module configured in a cost estimating subsystem.
3 . The AI-based method of claim 1 , further comprising providing, by the one or more hardware processors, the dynamically adjusted executed cost data, with at least one of: real-time feedback, one or more alerts, and one or more cost reports, as an output, to the one or more users through one or more user interfaces associated with the one or more communication devices of the one or more users.
4 . The AI-based method of claim 1 , further comprising:
re-estimating, by the one or more hardware processors, remaining budget allocation for one or more subsequent steps using the decision making module through one or more feedback loops;
adapting, by the one or more hardware processors, dynamic selection between one or more execution flows based on the estimated cost data, using the decision-making module; and
providing, by the one or more hardware processors, historical cost tracking and predictive analytics for future budgeting to assist the one or more users in refining budgeting strategies for future AI operations, using the decision making module.
5 . The AI-based method of claim 3 , further comprising at least one of:
generating, by the one or more hardware processors, the real-time feedback for the one or more users provided through the one or more user interfaces associated with the one or more communication devices, potentially suggesting one or more modifications to at least one of: the input data and the predefined budget based on the monitored cost data;
generating, by the one or more hardware processors, the one or more alerts when the monitored cost data exceeds the pre-defined budget, adapting the one or more users to take corrective action before budget overruns occur;
generating, by the one or more hardware processors, the one or more cost reports before the one or more AI workflows are executed; and
generating, by the one or more hardware processors, one or more logs associated with the one or more cost reports for auditing, optimization, and future cost prediction improvements, adapting financial planning for one or more subsequent task executions by one or more AI agents.
6 . The AI-based method of claim 1 , further comprising automatically exchanging, by the one or more hardware processors, the estimated cost data during communications between the one or more AI agents, by:
offloading, by the one or more hardware processors, the one or more tasks from a first AI agent of the one or more AI agents to a second AI agent possessing lower-cost task executions, and adjusting complexity of a request based on a cumulative cost estimate;
adapting, by the one or more hardware processors, a hierarchical cost management where a master AI agent of the one or more AI agents oversees and optimizes overall expenditure across one or more sub-AI agents; and
providing, by the one or more hardware processors, dynamic routing of the one or more tasks to a third AI agent possessing cost-effective task executions, to optimize performance and cost.
7 . An artificial intelligence (AI)-based system for adaptively executing one or more tasks based on cost analysis and budgetary constraints, the AI-based system comprising:
one or more hardware processors; and
a memory coupled to the one or more hardware processors, wherein the memory comprises a plurality of subsystems in form of programmable instructions executable by the one or more hardware processors, and wherein the plurality of subsystems comprises:
a data obtaining subsystem configured to obtain input data from one or more communication devices associated with one or more users, wherein the input data comprise at least one of: a monetary value indicating a pre-defined budget, a token quota, a computational resource limit, one or more textual inputs, an expected output size, preference of one or more language models, and one or more retrieval-augmented generation (RAG) steps;
a cost estimating subsystem configured to compute estimated cost data for each AI workflow of one or more AI workflows using one or more pre-defined pricing models;
a real-time cost monitoring subsystem configured to monitor executed cost data of the one or more tasks in the one or more AI workflows in real-time to dynamically adjust the executed cost data of the one or more tasks in the one or more AI workflows in compliance with the pre-defined budget,
wherein in monitoring the executed cost data of the one or more tasks in the one or more AI workflows in real-time, the real-time cost monitoring subsystem is further configured to:
monitor at least one of: token usage, inference time, and tool call execution, corresponding to each AI workflow, in real-time based on the estimated cost data;
compare one or more real-time cost metrics associated with the executed cost data of the one or more AI workflows, with the pre-defined budget provided in the input data, using a decision making module;
determine whether the executed cost data of the one or more tasks in the one or more AI workflows are compliant with the budget constraints based on comparison results, using the decision making module; and
dynamically adjust one or more execution parameters comprising at least one of: LLM selection, token length, and number of reasoning iterations in real-time, to adapt the executed cost data in compliance with the pre-defined budget provided in the input data, using the decision making module, and
wherein in dynamically adjusting the one or more execution parameters to adapt the executed cost data in compliance with the pre-defined budget, the real-time cost monitoring subsystem is configured to at least one of:
select fixed and deterministic execution flow using less expensive, lower-capacity LLMs and minimal reasoning steps, and reducing a number of reasoning cycles and external tool interactions, using the decision making module when the pre-defined budget is low; and
activate a dynamic execution flow that leverages high-performance LLMs, advanced reasoning, and dynamic decision-making, when the pre-defined budget is high.
8 . The AI-based system of claim 7 , wherein in computing the estimated cost data for each AI workflow using the one or more pre-defined pricing models, the cost estimating subsystem is further configured to:
assign at least one of: cost-per-token, cost-per-inference-time unit, and costs fixed tool call, corresponding to each AI workflow of the one or more workflows, using the one or more pre-defined pricing models;
analyze the input data to estimate token counts for each AI workflow;
compute the estimated cost data for at least one of: RAG, Large Language Model (LLM) processing, and one or more tool and Application Programming Interface (API) calls;
estimate a number of tokens required for task execution, comprising both input and output token counts, for determining LLM inference costs by assessing the input data;
provide a breakdown of estimated cost data for one or more components comprising at least one of: cost per token and cost per API call; and
estimate a cost of sending messages and delegating the one or more tasks for computing the estimated cost data by analyzing at least one of: token counts, processing time, and external API usage, using an inter-agent cost estimation module configured in the cost estimating subsystem.
9 . The AI-based system of claim 7 , further comprising an output generating subsystem configured to provide the dynamically adjusted executed cost data, with at least one of: real-time feedback, one or more alerts, and one or more cost reports, as an output, to the one or more users through one or more user interfaces associated with the one or more communication devices of the one or more users.
10 . The AI-based system of claim 7 , wherein the real-time cost monitoring subsystem is further configured to:
re-estimate remaining budget allocation for one or more subsequent steps using the decision making module through one or more feedback loops;
adapt dynamic selection between one or more execution flows based on the estimated cost data, using the decision-making module; and
provide historical cost tracking and predictive analytics for future budgeting to assist the one or more users in refining budgeting strategies for future AI operations, using the decision making module.
11 . The AI-based system of claim 9 , wherein the output generating subsystem is further configured to at least one of:
generate the real-time feedback for the one or more users provided through the one or more user interfaces associated with the one or more communication devices, potentially suggesting one or more modifications to at least one of: the input data and the predefined budget based on the monitored cost data;
generate the one or more alerts when the monitored cost data exceeds the pre-defined budget, adapting the one or more users to take corrective action before budget overruns occur;
generate the one or more cost reports before the one or more AI workflows are executed; and
generate one or more logs associated with the one or more cost reports for auditing, optimization, and future cost prediction improvements, adapting financial planning for one or more subsequent task executions by one or more AI agents.
12 . The AI-based system of claim 7 , further comprising a data exchanging subsystem configured to automatically exchange the estimated cost data during communications between the one or more AI agents, by:
offloading the one or more tasks from a first AI agent of the one or more AI agents to a second AI agent possessing lower-cost task executions, and adjusting complexity of a request based on a cumulative cost estimate;
adapting a hierarchical cost management where a master AI agent of the one or more AI agents oversees and optimizes overall expenditure across one or more sub-AI agents; and
providing dynamic routing of the one or more tasks to a third AI agent possessing cost-effective task executions, to optimize performance and cost.
13 . A non-transitory computer-readable storage medium having instructions stored therein that when executed by one or more hardware processors, cause the one or more hardware processors to execute operations of:
obtaining input data from one or more communication devices associated with one or more users, wherein the input data comprise at least one of: a monetary value indicating a pre-defined budget, a token quota, a computational resource limit, one or more textual inputs, an expected output size, preference of one or more language models, and one or more retrieval-augmented generation (RAG) steps;
computing estimated cost data for each AI workflow of one or more AI workflows using one or more pre-defined pricing models;
monitoring executed cost data of one or more tasks in the one or more AI workflows in real-time to dynamically adjust the executed cost data of the one or more tasks in the one or more AI workflows in compliance with the pre-defined budget,
wherein monitoring the executed cost data of the one or more tasks in the one or more AI workflows in real-time, comprises:
monitoring at least one of: token usage, inference time, and tool call execution, corresponding to each AI workflow, in real-time based on the estimated cost data;
comparing one or more real-time cost metrics associated with the executed cost data of the one or more AI workflows, with the pre-defined budget provided in the input data, using a decision making module;
determining, by the one or more hardware processors, whether the executed cost data of the one or more tasks in the one or more AI workflows are compliant with the budget constraints based on comparison results, using the decision making module; and
dynamically adjusting, by the one or more hardware processors, one or more execution parameters comprising at least one of: LLM selection, token length, and number of reasoning iterations in real-time, to adapt the executed cost data in compliance with the pre-defined budget provided in the input data, using the decision making module, and
wherein dynamically adjusting the one or more execution parameters to adapt the executed cost data in compliance with the pre-defined budget, comprises at least one of:
selecting, by the one or more hardware processors, fixed and deterministic execution flow using less expensive, lower-capacity LLMs and minimal reasoning steps, and reducing a number of reasoning cycles and external tool interactions, using the decision making module when the pre-defined budget is low; and
activating, by the one or more hardware processors, a dynamic execution flow that leverages high-performance LLMs, advanced reasoning, and dynamic decision-making when the pre-defined budget is high.
14 . The non-transitory computer-readable storage medium of claim 13 , wherein computing the estimated cost data for each AI workflow using the one or more pre-defined pricing models, comprises:
assigning at least one of: cost-per-token, cost-per-inference-time unit, and costs fixed tool call, corresponding to each AI workflow of the one or more workflows, using the one or more pre-defined pricing models;
analyzing the input data to estimate token counts for each AI workflow;
computing the estimated cost data for at least one of: RAG, Large Language Model (LLM) processing, and one or more tool and Application Programming Interface (API) calls;
estimating a number of tokens required for task execution, comprising both input and output token counts, for determining LLM inference costs by assessing the input data;
providing a breakdown of estimated cost data for one or more components comprising at least one of: cost per token and cost per API call; and
estimating a cost of sending messages and delegating the one or more tasks for computing the estimated cost data by analyzing at least one of: token counts, processing time, and external API usage, using an inter-agent cost estimation module configured in a cost estimating subsystem.
15 . The non-transitory computer-readable storage medium of claim 13 , further comprising providing the dynamically adjusted executed cost data, with at least one of: real-time feedback, one or more alerts, and one or more cost reports, as an output, to the one or more users through one or more user interfaces associated with the one or more communication devices of the one or more users.
16 . The non-transitory computer-readable storage medium of claim 13 , further comprising:
re-estimating remaining budget allocation for one or more subsequent steps using the decision making module through one or more feedback loops;
adapting dynamic selection between one or more execution flows based on the estimated cost data, using the decision-making module; and
providing historical cost tracking and predictive analytics for future budgeting to assist the one or more users in refining budgeting strategies for future AI operations, using the decision making module.
17 . The non-transitory computer-readable storage medium of claim 15 , further comprising at least one of:
generating the real-time feedback for the one or more users provided through the one or more user interfaces associated with the one or more communication devices, potentially suggesting one or more modifications to at least one of: the input data and the predefined budget based on the monitored cost data;
generating the one or more alerts when the monitored cost data exceeds the pre-defined budget, adapting the one or more users to take corrective action before budget overruns occur;
generating the one or more cost reports before the one or more AI workflows are executed; and
generating one or more logs associated with the one or more cost reports for auditing, optimization, and future cost prediction improvements, adapting financial planning for one or more subsequent task executions by one or more AI agents.
18 . The non-transitory computer-readable storage medium of claim 13 , further comprising automatically exchanging the estimated cost data during communications between the one or more AI agents, by:
offloading the one or more tasks from a first AI agent of the one or more AI agents to a second AI agent possessing lower-cost task executions, and adjusting complexity of a request based on a cumulative cost estimate;
adapting a hierarchical cost management where a master AI agent of the one or more AI agents oversees and optimizes overall expenditure across one or more sub-AI agents; and
providing dynamic routing of the one or more tasks to a third AI agent possessing cost-effective task executions, to optimize performance and cost.