Structured query language generation using large language models
AssigneeCisco Technology, Inc.
InventorsAli Payani, Ramana Rao V. R. Kompella
Life of this patent
Estimating the term…
Abstract
In one embodiment, a method herein comprises: inputting, by a device, an input prompt to a first large language model to generate an output; computing, by the device, a reward metric in part by using a solver to process the output; tuning, by the device and based on the reward metric, a second large language model configured to correct errors of the first large language model using reinforcement learning; and using, by the device, the second large language model to correct an error of the first large language model.
Claims20
A method, comprising:
- inputting, by a device, an input prompt to a first large language model to generate an output;
- computing, by the device, a reward metric in part by using a solver that processes the output against a formal specification or database schema to determine whether the output is false or unsatisfiable with respect to the formal specification or database schema;
- using, by the device, a second large language model to correct an error of the first large language model;
- and
- tuning, by the device and iteratively based on the reward metric, the second large language model using reinforcement learning, wherein the solver is a logical solver separate from the first large language model and the second large language model.
An apparatus, comprising:
- one or more network interfaces to communicate with a network;
- a processor coupled to the one or more network interfaces and configured to execute one or more processes;
- and
- a memory configured to store a process that is executable by the processor, the process, when executed, configured to:
- input an input prompt to a first large language model to generate an output;
- compute a reward metric in part by using a solver that processes the output against a formal specification or database schema to determine whether the output is false or unsatisfiable with respect to the formal specification or database schema;
- use a second large e model to correct an error of the first large language model;
- and
- tune, iteratively based on the reward metric, the second large language model using reinforcement learning, wherein the solver is a logical solver separate from the first large language model and the second large language model.
A tangible, non-transitory, computer-readable medium having computer-executable instructions stored thereon that, when executed by a processor on a computer, cause the computer to perform a method comprising:
- inputting, by a device, an input prompt to a first large language model to generate an output;
- computing, by the device, a reward metric in part by using a solver that processes the output against a formal specification or database schema to determine whether the output is false or unsatisfiable with respect to the formal specification or database schema;
- using, by the device, a second large language model to correct an error of the first large language model;
- and
- tuning, by the device and iteratively based on the reward metric, the second large language model using reinforcement learning, wherein the solver is a logical solver separate from the first large language model and the second large language model.
Dependencies are inferred from the claim text.