Connecting Blocks
Helping AI to think and create incrementally is the best way to unlock its potential.
Create and connect
In the previous section we created a block to generate a blog post outline. Now, we’ll build on that by adding a block to write the first draft of the blog post. This will illustrate how to connect blocks and build a more complex AI workflow.
The quickest way to create and connect a new block is to click the (+) handle to the right of an existing block. This will add a new block and automatically connect it to the previous block:
Building on the previous output
The connector between the blocks shows the data flow from one block to the next. In this case, the output from the outline block is passed as input to the new block. This allows the AI model in the new block to build on the outline and generate the first draft of the blog post.
We’ll instruct the new block as follows:
Write the first draft of this blog post, based on the outline provided. Keep it brief and to the point.
Click Run or deselect the block to execute the AI task. Now we’re cooking with gas! The AI model processes the instructions and generates the first draft of the blog post, which you can review in the block output or reader view:
The power of connections
Prompt chaining has proven to be a powerful way to leverage AI models and create sophisticated outputs.
Connecting blocks in Hunch allows you to quickly and easily build AI workflows that use the output of one block as the input for another. This incremental approach to AI tasks unlocks the full potential of AI models. Keeping the AI model focused on a specific task at each step ensures that the results are accurate and relevant.