Task Linking

Linking for a complex behaviour

We recognized early on that the power of introducing multiple tasks that can be executed at a click of a button is to create intricate dependencies between them.

Consider the following practical interconnected steps:

  1. search for publications on five different topics,

  2. use all five results to draft an introduction to a paper,

  3. ideate on gaps from the whole set of publications,

  4. collate the introduction, gaps and propose a new line of research.

Such a flow requires at least 8 steps. If tried manually and using available search engines and LLMs, the user is stuck in a lengthy process going back and forth between tools.

With Workflows, we can create a short Hashtag script in floatz AI defining and interlinking all tasks.

Header-Linking

We can add the use optional header to link tasks:

#task: name
#use: taskName1, taskName2, ..., taskNameN
AI prompt

The use header needs to be followed by colon : and a comma separated list of task names: taskName1, taskName2, ...

Linked tasks can be defined before or after the task that requires them.

Example 1

#task: taskName1
...

#task: name
#use: taskName1, laterTask
AI prompt

#task: laterTask
...

Note that circular dependencies are not allowed and will lead to a syntax error. For example: taskName1 cannot use name.

Example 2

The below example shows how we can search for two sets of publications and draft a text based on their content.

In-line Linking

Beyond header linking, we can use in-line linking of tasks directly in the prompt:

Each task name needs to start with # when used in a prompt.

By using this technique we can refer to the answer of a task directly within the prompt.

Note that both in-line and header-linking can be used within a task.

Warning: For best performance in-line linking should be used in tandem with Modes which we cover later in this manual.

Example

This example enables the AI to reflect on its answer for task 2, and enhance it based on the answer given in task 1.

Note that the last task is using Modes.

Execution Order

The interpreter for Hashtag automatically identifies the order of execution of tasks in a Workflow. The first tasks to be executed are those that do not have any use header. The last tasks to be executed are those that are not used by any other task.

Further, if task answers do not have to be shown to the user, they will be executed in parallel depending on dependencies.

In the next section we will see which task answers are shown to the user, and how to force an answer to be shown.

Last updated