Rationale

What is a Workflow?

Workflow is a way to capture prior knowledge and experience, and make it reusable by other components. An easy analogy is to think of workflow as serverless functions with LLM, but with strong observability because of unpredictable nature of LLM.

let's consider an example, the workflow is asked to read a manual and follow the instructions to process the data. We exactly know how to do that as follows:

  1. Read the manual
  2. Parse the manual
  3. Follow the instructions
  4. Process the data

We don't need any LLM planning capability to do that, we just need a sequence of actions to be executed. This is where the workflow comes in, a workflow is a sequence of actions that can be executed sequentially or in parallel, actions can be anything from reading a file, making an HTTP request, to executing an SQL query, make LLM call, etc.

In ReByte, we define Workflow as a serverless API that can be executed on cloud, usually workflows will leverage LLM models to perform some tasks to achieve its intelligence, but this is not required. A Workflow without any AI model is just like a normal serverless API, but we will focus on AI tools in this document. Here are some typical examples of AI tools:

  • Based on user's query, find the most relevant information from the user's knowledge base, and summarize the result and return the summary to the user.
  • User describes a database query in natural language, workflow will translate the query into SQL and execute the query on user's database to get results, then use LLM to generate a summary of the results and return to user.
  • Help user to do professional translation between two languages, user can describe the translation task in natural language, workflow will not only do the translation but also evaluate the translation quality, if the quality is not good enough, workflow will iterate the translation process until the quality is good enough.