Declarative code-less workflow using LLM
Example implementations include a method, apparatus, and computer-readable medium configured for implementing a workflow using a large language model (LLM). A workflow automation application sends a first prompt to a large language model (LLM) to transform a first input data source in a first format to a second format. The workflow automation application sends a second prompt to the LLM to define multiple steps of a workflow starting on the data source in the second format. The workflow automation application sends a third prompt to the LLM to define execution of business logic for each step of the workflow. The workflow automation application receives, from the LLM, output data indicating that each step of the workflow has been executed.
1 . A method of implementing a workflow using a large language model (LLM) comprising:
receiving, by the LLM, a first prompt that causes the LLM to process a first input data source in a first format and output a transformed data source in a second format;
receiving, by the LLM, a second prompt that causes the LLM to output a workflow that defines multiple steps of the workflow starting on the transformed data source in the second format;
receiving, by the LLM, a third prompt that defines logic for each step of the workflow, wherein the third prompt is nested within a corresponding step of the workflow produced by the second prompt; and
executing, by the LLM, each step of the workflow including the logic defined by the third prompt.
2 . The method of claim 1 , wherein the first prompt defines an input data format, an output data format, and a transformation rule.
3 . The method of claim 2 , further comprising outputting a transformed data set in the output data format to a local memory.
4 . The method of claim 1 , wherein the second prompt identifies, for a first step, a property of the transformed data source in the second format and an operation on the property.
5 . The method of claim 1 , wherein the third prompt requests execution of code via one or more of an application programming interface, a local executable file, or an external executable.
6 . The method of claim 1 , further comprising receiving a workflow document and a prompt to extract the first format, the second format, and the multiple steps.
7 . The method of claim 1 , further comprising:
providing a user interface with fields to enter the first prompt, the second prompt, and the third prompt; and
verifying whether text entered into each of the fields includes required content for each prompt.
8 . An apparatus comprising:
one or more memories; and
one or more processors coupled with the one or more memories and, individually or in combination, configured to:
send a first prompt to a large language model (LLM) to cause the LLM to process a first input data source in a first format and output a transformed data source in to a second format;
send a second prompt to the LLM to cause the LLM to output a workflow that defines multiple steps of the workflow starting on the transformed data source in the second format;
generate one or more third prompts to the LLM that define logic for one or more corresponding steps of the workflow;
nest the one or more third prompts within the one or more corresponding steps of the workflow produced by the second prompt;
prompt the LLM to execute each step of the workflow including the logic defined by the one or more third prompts; and
receive, from the LLM, output data indicating that each step of the workflow has been executed.
9 . The apparatus of claim 8 , wherein the first prompt defines an input data format, an output data format, and a transformation rule.
10 . The apparatus of claim 9 , wherein the one or more processors, individually or in combination, are configured to receive a transformed data set in the output data from the LLM in response to the first prompt.
11 . The apparatus of claim 8 , wherein the second prompt identifies, for a first step, a property of the transformed data source in the second format and an operation on the property.
12 . The apparatus of claim 8 , wherein the one or more third prompts request execution of code via one or more of an application programming interface, a local executable file, or an external executable.
13 . The apparatus of claim 8 , wherein the one or more processors, individually or in combination, are configured to send a workflow document and a prompt to extract the first format, the second format, and the multiple steps to the LLM.
14 . The apparatus of claim 8 , wherein the one or more processors, individually or in combination, are configured to:
provide a user interface with fields to enter the first prompt, the second prompt, and the third prompt; and
verify whether text entered into each of the fields includes required content for each prompt.
15 . A non-transitory computer-readable medium having computer-executable instructions stored thereon that when executed by a computer processor cause the computer processor to:
send a first prompt to a large language model (LLM) to cause the LLM to process a first input data source in a first format and output a transformed data source in to a second format;
send a second prompt to the LLM to cause the LLM to output a workflow that defines multiple steps of the workflow starting on the transformed data source in the second format;
generate one or more third prompts to the LLM that define logic for one or more corresponding steps of the workflow;
nest the one or more third prompts within the one or more corresponding steps of the workflow produced by the second prompt;
prompt the LLM to execute each step of the workflow including the logic defined by the one or more third prompts; and
receive, from the LLM, output data indicating that each step of the workflow has been executed.
16 . The non-transitory computer-readable medium of claim 15 , wherein the first prompt defines an input data format, an output data format, and a transformation rule.
17 . The non-transitory computer-readable medium of claim 15 , wherein the second prompt identifies, for a first step, a property of the transformed data source in the second format and an operation on the property.
18 . The non-transitory computer-readable medium of claim 15 , wherein the one or more third prompts request execution of code via one or more of an application programming interface, a local executable file, or an external executable.