Large language model numerical problem solution architecture
AssigneeIntuit Inc.
InventorsSundip Sharma, Bibhakar Ranjan
Life of this patent
Estimating the term…
Abstract
A method includes obtaining a sequence of instructions for generating a final result of a computation from a large language model by processing a user prompt requesting the computation. The method further includes converting the sequence of instructions to a sequence of mathematical expressions. The method further includes evaluating, by a numerical solver, the sequence of mathematical expressions to obtain a corresponding set of intermediate results. The method further includes evaluating the final result using the corresponding set of intermediate results, and presenting the final result.
Claims18
A method comprising:
- receiving a user prompt from a user application comprising a set of operands and an instruction in natural language requesting a computation referencing the set of operands;
- transmitting, by a structured reasoning framework to a large language model (LLM), a machine-readable prompt from a prompt template, the machine-readable prompt comprising the user prompt and a second instruction directing the LLM to generate a sequence of instructions according to a structured reasoning process, wherein the LLM is a foundation artificial intelligence (AI) model having a transformer architecture, fine-tuned on a document corpus;
- obtaining, from the LLM processing the machine-readable prompt, the sequence of instructions, each instruction comprising a directive specifying an operation to be performed and an explanation providing a natural language rationale for the operation, wherein the sequence of instructions describes generating a final result of the computation;
- converting, by a computation artificial intelligence (AI) agent separate from the LLM, the sequence of instructions to a sequence of mathematical expressions;
- evaluating, by a numerical solver, the sequence of mathematical expressions to obtain a corresponding set of intermediate results;
- evaluating the final result using the corresponding set of intermediate results;
- performing, by a precision check engine, operations comprising:
- performing a semantic similarity analysis to compare respective explanations of the sequence of instructions with a plurality of domain-specific reference explanations, using an embedding-based similarity function, and
- comparing the set of intermediate results and the final result with expected values,
- wherein the LLM resides on a first node of a network, and the precision check engine resides on a second node of the network;
- and
- presenting the final result.
A system, comprising:
- at least one computer processor;
- a user application, executing on the at least one computer processor;
- a computation artificial intelligence (AI) agent, executing on the at least one computer processor;
- and
- a large language model (an LLM) that is separate from the computation AI agent, executing on the at least one computer processor,
- wherein the computation AI agent is configured for:
- receiving a user prompt from the user application comprising a set of operands and an instruction in natural language requesting a computation referencing the set of operands,
- instantiating a machine-readable prompt from a prompt template, comprising the user prompt, and a second instruction directing the LLM to generate a sequence of instructions according to a structured reasoning process, wherein the LLM is a foundation artificial intelligence (AI) model having a transformer architecture, fine-tuned on a document corpus,
- causing the LLM to process the machine-readable prompt to obtain the sequence of instructions, each instruction comprising a directive specifying an operation to be performed and an explanation providing a natural language rationale for the operation, wherein the sequence of instructions describes generating a final result of the computation,
- converting the sequence of instructions to a sequence of mathematical expressions,
- evaluating, by a numerical solver of the computation AI agent, the sequence of mathematical expressions to obtain a corresponding set of intermediate results,
- evaluating, by the numerical solver, the final result using the corresponding set of intermediate results,
- causing a precision check engine to perform operations comprising:
- performing a semantic similarity analysis to compare respective explanations of the sequence of instructions with a plurality of domain-specific reference explanations, using an embedding-based similarity function, and
- comparing the set of intermediate results and the final result with expected values, wherein the LLM resides on a first node of a cloud network, and the precision check engine resides on a second node of the cloud network, and
- presenting the final result.
A method, comprising:
- receiving a user prompt from a user application, the user prompt comprising a set of operands, and an instruction in natural language requesting a computation, wherein an operand comprises an operand name and an operand value, and the computation references the set of operands;
- transmitting, by a structured reasoning framework to a large language model (LLM), a machine-readable prompt from a prompt template, the machine-readable prompt comprising the user prompt, and a second instruction directing an LLM to generate a sequence of instructions for generating a final result of the computation according to a structured reasoning process,
- wherein successive instructions of the sequence of instructions comprise corresponding mathematical expressions corresponding to successive steps of the computation, a mathematical expression comprising a partial computation of the set of operands and producing an intermediate result, and wherein the LLM is a foundation AI model having a transformer architecture fine-tuned on a document corpus;
- processing, by the LLM, the machine-readable prompt, to generate the sequence of instructions, each instruction further comprising an explanation providing a natural language rationale for a corresponding mathematical expression, and wherein the sequence of instructions describing generating the final result of the computation;
- converting, by a computation artificial intelligence (AI) agent separate from the LLM, the sequence of instructions to a corresponding sequence of mathematical expressions;
- evaluating, by a numerical solver, a first mathematical expression of the corresponding sequence of mathematical expressions, wherein the first mathematical expression references a first set of operands, to obtain a first intermediate result value,
- wherein the first set of operands is obtained from a first instruction of the sequence of instructions, the first instruction corresponding to the first mathematical expression;
- adding a first intermediate result name obtained from the first instruction and the first intermediate result value to a set of intermediate results, wherein the set of intermediate results corresponds to the sequence of mathematical expressions;
- evaluating, by the numerical solver, a final mathematical expression of the corresponding sequence of mathematical expressions, wherein the final mathematical expression references the set of intermediate results, to obtain the final result;
- performing, by a precision check engine, operations comprising:
- performing a semantic similarity analysis to compare respective explanations of the sequence of instructions with a plurality of domain-specific reference explanations, using an embedding-based similarity function, and
- comparing the set of intermediate results and the final result with expected values, wherein the LLM resides on a first node of a network, and the precision check engine resides on a second node of the network;
- and
- presenting the final result.
Dependencies are inferred from the claim text.