# US 2025/0209341 A1 · SELECTION-OPTIMIZATION-FINE-TUNING OF AI MODELS FOR NUANCED TASK BY ANALYZING THE NUANCED TASK USING LRI-DecNN

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0209341 A1
- Document ID: US20250209341A1
- Status: Published application
- Kind: A1
- Application number: 18/977,083
- Filed: 2024-12-11
- Published: 2025-06-26
- Earliest claimed: 2023-12-20
- Assignees: Tata Consultancy Services Limited
- Applicants: Tata Consultancy Services Limited
- Inventors: NARENDRAN SIVAKUMAR; SANKARANARAYANAN VISWANATHAN; RADHIKA KANNAN; SUBRAMANIAN RAMASAMY VENKADA
- Web page: https://patentgrep.com/patent/US20250209341A1

## CPC

- G06N 3/045: Combinations of networks
- G06N 3/096: Transfer learning
- G06F 40/58: Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/0475: Generative networks
- G06N 3/048: Activation functions
- G06N 3/08: Learning methods
- G06N 3/092: Reinforcement learning
- G06N 3/0985: Hyperparameter optimisation; Meta-learning; Learning-to-learn
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Currently task automation is in its initial stage. Understanding task complexity/requirements, effectiveness/efficiency of automation using best models to automate the task and performance of such task automation approaches are being explored. A method and system for selection-optimization-fine-tuning of Artificial Intelligence (AI) models for nuanced task by analyzing the nuanced task using Logic and Rule Integrated Decoder Neural Network (LRI-DecNN) is disclosed. The system performs tasks analysis using the LRI-DecNN, AI augmentation suitability check and constructs agent chain of subtasks using meta-mixture technique tailored to specific enterprise needs. Thereafter, the most appropriate generative AI model is selected and fine-tuned for the task at hand using Blackbox estimation. The task is executed and monitored for optimal performance.

## Claims

### Claim 1

A processor implemented method comprising:
analyzing, by using a Logic and Rule Integrated-Decoder Neural Network (LRI-DecNN) executed by one or more hardware processors, a task received in natural language to obtain a contextual output for the task comprising a complexity (C), a clarity of objectives (O) and an augmentation potential (A) of the task, wherein a self-attention mechanism of the LRI-DecNN is modified to integrate a logic and rule factor (B) enabling the LRI-DecNN to pay attention to a set of predefined logic and rules;
assessing, by the LRI-DecNN executed by the one or more hardware processors, suitability of the task for Artificial Intelligence (AI) augmentation based on value of a score function(S) derived from the complexity (C), the clarity of objectives (O) and the augmentation potential (A);
translating, by the one or more hardware processors, the task into an agent chain comprising a set of chained subtasks using a meta-mixture of experts technique, wherein the meta-mixture of experts technique utilizes a routing function (R) that evaluates requirements of the task and matches the requirements with the strengths and specializations of each expert model amongst the set of expert models of the meta-mixture of experts technique;
determining, by the one or more hardware processors, an AI model among a set of AI models for each subtask among the set of chained subtasks based on a statistical function for Blackbox estimation in AI augmentation;
fine-tuning, by the one or more hardware processors, each AI model identified for each subtask among the set of chained subtasks using a Kullback-Leibler (KL) divergence to align output distribution of each AI model with an expected distribution of the task, wherein fine-tuning involves adjusting training data, modifying the AI model architecture, or tweaking the learning process of the AI model to minimize the KL divergence;
determining, by the one or more hardware processors, an effective optimization technique for each AI model in accordance with the subtask using a Q-learning model to optimize each AI model; and
tuning, by the one or more hardware processors, a set of hyperparameters of each AI model among the set of AI models.

### Claim 2 (depends on 1)

The processor implemented method of claim 1, wherein an Actor-Critic framework is integrated to refine Q-values, in real time, obtained from previous reinforcement learning steps of the Q-learning, and wherein an actor proposes actions based on a current policy, while a critic evaluates the actions by estimating a value function, leading to more precise Q-value adjustments.

### Claim 3 (depends on 1)

The processor implemented method of claim 1, wherein during inferencing, the hyperparameter tuned set of AI models identified for each subtask combinedly perform the task for an enterprise, and wherein the task is a Nuanced Enterprise Task.

### Claim 4 (depends on 1)

The processor implemented method of claim 1, wherein the self-attention mechanism integrating the logic and rule factor (B) is mathematically represented as: Aθ=softmax(θ*(QKT+B)/sqrt(dk))*V, wherein (Q) represents standard queries, (K) represents standard keys, and (V) represents standard values used in the self-attention mechanism, and wherein (B) represents an encoded logic and rules integrated into calculation of attention by the self-attention mechanism, influencing weighing of different parts of the input by the LRI-DecNN.

### Claim 5 (depends on 1)

The processor implemented method as of claim 1, wherein the routing function (R) is mathematically represented as (R(T, Ei, where i=1 to n)), wherein (T) is the task, and (E) is the set of expert models (n) comprising decoder only Large Language Models (LLMs) available as experts.

### Claim 6 (depends on 1)

The processor implemented method of claim 1, wherein the statistical function is represented as,
F
⁢
(
T
⁢
C
,
H
⁢
M
⁢
P
,
D
⁢
A
,
M
⁢
A
,
T
⁢
M
⁢
A
=
w_
⁢
1
*
T
⁢
C
+
w_
⁢
2
*
H
⁢
M
⁢
P
+
w_
⁢
3
*
D
⁢
A
+
w_
⁢
4
*
M
⁢
A
+
w_
⁢
5
*
T
⁢
M
⁢
A
wherein, Task Complexity (TC) is a measure of difficulty of the task, Historical Model Performance (HMP) indicates past task performance of GenAI models for similar tasks, Data Availability (DA) providing extent and quality of data available for the task, Model Adaptability (MA) is a measure of how adaptable the GenAI model is to different types of tasks, Task-Model Alignment (TMA) is a score representing how well the task aligns with the GenAI model's strengths and capabilities, and
wherein ‘w_1’, ‘w_2’, ‘w_3’, ‘w_4’, and ‘w_5’ are the weights assigned to each parameter (TC, HMP, DA, MA,TMA) and learned using a RNN based algorithm; and
wherein a high score for F indicates suitability of the GenAI model for the natural language task.

### Claim 7

A system comprising:
a memory storing instructions;
one or more Input/Output (I/O) interfaces; and
one or more hardware processors coupled to the via the one or more I/O interfaces, wherein the one or more hardware processors are configured by the instructions to:
analyze, by using a Logic and Rule Integrated-Decoder Neural Network (LRI-DecNN), a task received in natural language to obtain a contextual output for the task comprising a complexity (C), a clarity of objectives (O) and an augmentation potential (A) of the task, wherein a self-attention mechanism of the LRI-DecNN is modified to integrate a logic and rule factor (B) enabling the LRI-DecNN to pay attention to a set of predefined logic and rules;
assess by the LRI-DecNN executed, suitability of the task for Artificial Intelligence (AI) augmentation based on value of a score function(S) derived from the complexity (C), the clarity of objectives (O) and the augmentation potential (A);
translate the task into an agent chain comprising a set of chained subtasks using a meta-mixture of experts technique, wherein the meta-mixture of experts technique utilizes a routing function (R) that evaluates requirements of the task and matches the requirements with the strengths and specializations of each expert model amongst the set of expert models of the meta-mixture of experts technique;
determine an AI model among a set of AI models for each subtask among the set of chained subtasks based on a statistical function for Blackbox estimation in AI augmentation;
fine-tune each AI model identified for each subtask among the set of chained subtasks using a Kullback-Leibler (KL) divergence to align output distribution of each AI model with an expected distribution of the task, wherein fine-tuning involves adjusting training data, modifying the AI model architecture, or tweaking the learning process of the AI model to minimize the KL divergence;
determine an effective optimization technique for each AI model in accordance with the subtask using a Q-learning model to optimize each AI model; and
tune a set of hyperparameters of each AI model among the set of AI models.

### Claim 8 (depends on 7)

The system implemented method of claim 7, wherein an Actor-Critic framework is integrated to refine Q-values, in real time, obtained from previous reinforcement learning steps of the Q-learning, and wherein an actor proposes actions based on a current policy, while a critic evaluates the actions by estimating a value function, leading to more precise Q-value adjustments.

### Claim 9 (depends on 7)

The system of claim 7, wherein during inferencing, the hyperparameter tuned set of AI models identified for each subtask combinedly perform the task for an enterprise, and wherein the task is a nuanced task.

### Claim 10 (depends on 7)

The system of claim 7, wherein the self-attention mechanism integrating the logic and rule factor (B) is mathematically represented as: Aθ=softmax(θ*(QKT+B)/sqrt(dk))*V, wherein (Q) represents standard queries, (K) represents standard keys, and (V) represents standard values used in the self-attention mechanism, and wherein (B) represents an encoded logic and rules integrated into calculation of attention by the self-attention mechanism, influencing weighing of different parts of the input by the LRI-DecNN.

### Claim 11 (depends on 7)

The system of claim 7, wherein the routing function (R) is mathematically represented as (R(T, Ei, where i=1 to n)), wherein (T) is the task, and (E) is the set of expert models (n) comprising decoder only Large Language Models (LLMs) available as experts.

### Claim 12 (depends on 7)

The system of claim 7, wherein the statistical function is represented as,
F
⁢
(
T
⁢
C
,
H
⁢
M
⁢
P
,
D
⁢
A
,
M
⁢
A
,
T
⁢
M
⁢
A
=
w_
⁢
1
*
T
⁢
C
+
w_
⁢
2
*
H
⁢
M
⁢
P
+
w_
⁢
3
*
D
⁢
A
+
w_
⁢
4
*
M
⁢
A
+
w_
⁢
5
*
T
⁢
M
⁢
A
wherein, Task Complexity (TC) is a measure of difficulty of the task, Historical Model Performance (HMP) indicates past task performance of GenAI models for similar tasks, Data Availability (DA) providing extent and quality of data available for the task, Model Adaptability (MA) is a measure of how adaptable the GenAI model is to different types of tasks, Task-Model Alignment (TMA) is a score representing how well the task aligns with the GenAI model's strengths and capabilities, and
wherein ‘w_1’, ‘w_2’, ‘w_3’, ‘w_4’, and ‘w_5’ are the weights assigned to each parameter (TC, HMP, DA, MA, TMA) and learned using a RNN based algorithm; and
wherein a high score for F indicates suitability of the GenAI model for the natural language task.

### Claim 13

One or more non-transitory machine-readable information storage mediums comprising one or more instructions which when executed by one or more hardware processors cause:
analyzing, by using a Logic and Rule Integrated-Decoder Neural Network (LRI-DecNN), a task received in natural language to obtain a contextual output for the task comprising a complexity (C), a clarity of objectives (O) and an augmentation potential (A) of the task, wherein a self-attention mechanism of the LRI-DecNN is modified to integrate a logic and rule factor (B) enabling the LRI-DecNN to pay attention to a set of predefined logic and rules;
assessing, by the LRI-DecNN, suitability of the task for Artificial Intelligence (AI) augmentation based on value of a score function(S) derived from the complexity (C), the clarity of objectives (O) and the augmentation potential (A);
translating, the task into an agent chain comprising a set of chained subtasks using a meta-mixture of experts technique, wherein the meta-mixture of experts technique utilizes a routing function (R) that evaluates requirements of the task and matches the requirements with the strengths and specializations of each expert model amongst the set of expert models of the meta-mixture of experts technique;
determining, an AI model among a set of AI models for each subtask among the set of chained subtasks based on a statistical function for Blackbox estimation in AI augmentation;
fine-tuning, each AI model identified for each subtask among the set of chained subtasks using a Kullback-Leibler (KL) divergence to align output distribution of each AI model with an expected distribution of the task, wherein fine-tuning involves adjusting training data, modifying the AI model architecture, or tweaking the learning process of the AI model to minimize the KL divergence;
determining an effective optimization technique for each AI model in accordance with the subtask using a Q-learning model to optimize each AI model; and
tuning, a set of hyperparameters of each AI model among the set of AI models.

### Claim 14 (depends on 13)

The one or more non-transitory machine-readable information storage mediums of claim 13, wherein an Actor-Critic framework is integrated to refine Q-values, in real time, obtained from previous reinforcement learning steps of the Q-learning, and wherein an actor proposes actions based on a current policy, while a critic evaluates the actions by estimating a value function, leading to more precise Q-value adjustments.

### Claim 15 (depends on 13)

The one or more non-transitory machine-readable information storage mediums of claim 13, wherein during inferencing, the hyperparameter tuned set of AI models identified for each subtask combinedly perform the task for an enterprise, and wherein the task is a Nuanced Enterprise Task.

### Claim 16 (depends on 13)

The one or more non-transitory machine-readable information storage mediums of claim 13, wherein the self-attention mechanism integrating the logic and rule factor (B) is mathematically represented as: Aθ=softmax (θ*(QKT+B)/sqrt(dk))*V, wherein (Q) represents standard queries, (K) represents standard keys, and (V) represents standard values used in the self-attention mechanism, and wherein (B) represents an encoded logic and rules integrated into calculation of attention by the self-attention mechanism, influencing weighing of different parts of the input by the LRI-DecNN.

### Claim 17 (depends on 13)

The one or more non-transitory machine-readable information storage mediums of claim 13, wherein the routing function (R) is mathematically represented as (R (T, Ei, where i=1 to n)), wherein (T) is the task, and (E) is the set of expert models (n) comprising decoder only Large Language Models (LLMs) available as experts.

### Claim 18 (depends on 13)

The one or more non-transitory machine-readable information storage mediums of claim 13, wherein the statistical function is represented as,
F
⁢
(
T
⁢
C
,
H
⁢
M
⁢
P
,
D
⁢
A
,
M
⁢
A
,
T
⁢
M
⁢
A
=
w_
⁢
1
*
T
⁢
C
+
w_
⁢
2
*
H
⁢
M
⁢
P
+
w_
⁢
3
*
D
⁢
A
+
w_
⁢
4
*
M
⁢
A
+
w_
⁢
5
*
T
⁢
M
⁢
A
wherein, Task Complexity (TC) is a measure of difficulty of the task, Historical Model Performance (HMP) indicates past task performance of GenAI models for similar tasks, Data Availability (DA) providing extent and quality of data available for the task, Model Adaptability (MA) is a measure of how adaptable the GenAI model is to different types of tasks, Task-Model Alignment (TMA) is a score representing how well the task aligns with the GenAI model's strengths and capabilities, and
wherein ‘w_1’, ‘w_2’, ‘w_3’, ‘w_4’, and ‘w_5’ are the weights assigned to each parameter (TC, HMP, DA, MA, TMA) and learned using a RNN based algorithm; and
wherein a high score for F indicates suitability of the GenAI model for the natural language task.
