Skip to main content

[Flows] Translation Example Step-by-Step

Learn how to build a translation flow in Promptitude with this easy-to-follow guide for beginners - no coding required!

Promptitude Team avatar
Written by Promptitude Team
Updated over a week ago

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:

  1. 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.

  2. 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}}.

  3. 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.

  4. Accessing results - Each step's output is accessible using {{step#.result}} where # is the step number.

  5. 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:

  1. Create a new step using a prompt template

  2. Configure it to translate and rewrite the original content for your specific audience

  3. Use {{flow.input.#_original_content}} as the input, where # is the input number.

  4. 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:

  1. Add the DeepL tool as your second step

  2. Use {{step1.result}} as the input (the result from your first translation)

  3. Set the target language using {{flow.input.target_language}}

  4. This step will produce a refined translation

3️⃣ Step 3: Quality Evaluation

For the final step:

  1. Create a prompt that compares and evaluates both translations

  2. Use {{flow.input.original_content}} as the reference content

  3. Use {{step2.result}} as the processed translation to evaluate

  4. This step will output an assessment of translation quality

✅ Testing and Refining Your Flow

Once you've built your flow:

  1. Click "Run" to test the entire process

  2. Debug step by step to identify any issues

  3. 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.

Did this answer your question?