Building flows in Promptitude allows you to automate complex processes by connecting multiple prompts and tools together. This article walks you through creating a translation flow, demonstrating how to translate content, rewrite it for a specific audience, and evaluate the results—all without writing a single line of code.
📌 Flow Basics
Before diving into our translation example, let's cover some fundamental rules for building effective flows:
Starting and ending points - Every flow begins with step 1 and ends with the final step. The first step sets the path with all necessary inputs, while the last step delivers the final output.
Variable inputs - These are inputs you can use throughout your flow. Create them in the inputs section on the right side of your screen. They typically follow the format
{{flow.input.input_name}}
.Step sequencing - Steps are chained consecutively, always linking to subsequent steps (not previous ones). For example, you can use the result of step 1 in step 2, but not the other way around.
Accessing results - Each step's output is accessible using
{{step#.result}}
where # is the step number.Connecting steps - Each step needs inputs to link variables. You can use plain text or start typing
{{
to see a dropdown of available variables from both inputs and previous step results.
✏️ Building a Translation Flow: Step-by-Step
Let's create a flow that translates content, rewrites it for a specific audience, and evaluates the results.
Setting Up Your Inputs
First, create two input variables for your flow:
Original content to be translated and evaluated
Target language for translation
1️⃣ Step 1: Initial Translation
This is your starting point:
Create a new step using a prompt template
Configure it to translate and rewrite the original content for your specific audience
Use
{{flow.input.#_original_content}}
as the input, where # is the input number.This step will produce the first translation result
2️⃣ Step 2: DeepL Translation
In this step, you'll use the DeepL tool to translate the content again:
Add the DeepL tool as your second step
Use
{{step1.result}}
as the input (the result from your first translation)Set the target language using
{{flow.input.target_language}}
This step will produce a refined translation
3️⃣ Step 3: Quality Evaluation
For the final step:
Create a prompt that compares and evaluates both translations
Use
{{flow.input.original_content}}
as the reference contentUse
{{step2.result}}
as the processed translation to evaluateThis step will output an assessment of translation quality
✅ Testing and Refining Your Flow
Once you've built your flow:
Click "Run" to test the entire process
Debug step by step to identify any issues
Refine your prompts as needed to improve results
By following this structure, you've created a powerful translation workflow that processes content through multiple steps, each building on the previous one's output.
Remember that the key to successful flows is ensuring each step is properly connected to the next, with all necessary information flowing through the system without getting lost along the way.