Skip to content

Workflows with Multi-Step Prompts|Lectures 16

Workflows with Multi Step Prompts

Learn how to build complex workflows by chaining multiple prompts together. This advanced technique allows you to break down large tasks into manageable steps for the AI. Lectures 16

Single Prompts to Full Workflows

Welcome back! You are now an expert in writing single, effective prompts. The next level is to become an architect of prompt chains or workflows. This means breaking down a large, complex task into a series of smaller, manageable prompts.

Instead of asking the AI to do everything at once, you guide it through a process, using the output of one step as the input for the next. This gives you much more control and leads to higher-quality results for complex tasks.

Why Break Down a Task?

Trying to do too much in one prompt can confuse the AI and lead to poor results. It’s like trying to cook a whole meal in one pot at the same time. It’s better to prepare each ingredient separately.

By breaking down the task, you can:

  • Improve Accuracy: Each step is simpler, reducing the chance of error.
  • Increase Control: You can review and approve the output of each step before moving on.
  • Enable More Complex Tasks: You can tackle projects that would be impossible with a single prompt.
  • Make Debugging Easier: If something goes wrong, you know exactly which step failed.

Example: Creating a Blog Post from a YouTube Video

Let’s say our goal is to write a blog post summarizing a YouTube video. Doing this in one prompt would be very difficult. Let’s break it down into a workflow.

Step 1: Get the Transcript

Prompt:

"Here is the URL to a YouTube video: [URL]. Please provide a full transcript of the video."

(Here we assume the AI has a tool to access the URL and get the transcript, similar to the ReAct framework).

Step 2: Summarize the Transcript

Prompt:

"Here is the transcript from a video. Please summarize the main points in a clear, bulleted list."

[Paste the transcript from Step 1 here]

Step 3: Draft the Blog Post

Prompt:

"Act as a professional blog writer. Using the summary points below, write an engaging 500-word blog post. The tone should be informative but casual. Create a catchy title for the post."

[Paste the bulleted list from Step 2 here]

Step 4: Generate Social Media Snippets

Prompt:

"Based on the blog post below, create three different tweets to promote it. Include relevant hashtags."

[Paste the final blog post from Step 3 here]

Designing Your Own Workflows

To build a workflow, you need to think like a project manager. Before you write any prompts, map out the steps:

  1. Define the Final Goal: What is the exact final product you want? (e.g., a finished report, a piece of code, a marketing plan).
  2. Identify the Major Stages: What are the high-level steps to get there? (e.g., Research -> Outline -> Draft -> Refine).
  3. Create a Prompt for Each Stage: Write a specific prompt for each step you identified.
  4. Connect the Steps: Ensure the output of one prompt is in the right format to be used as the input for the next prompt.
Workflows with Multi Step Prompts
Workflows with Multi Step Prompts

Key Takeaways from Lecture 16

  • Don’t try to solve huge tasks with a single prompt. Break them down.
  • workflow or prompt chain is a series of prompts where the output of one step feeds into the next.
  • This approach gives you more control, accuracy, and power.
  • Think like a project manager: plan your steps before you start prompting.
  • This is one of the most important skills for moving from a casual user to a professional prompt engineer.

End of Lecture 16. You are now an AI architect! Next, we’ll briefly touch on how these prompting concepts apply to generating images.

ReAct and Tree Advanced Techniques | Lecture 15

Najeeb Alam

Najeeb Alam

Technical writer specializes in developer, Blogging and Online Journalism. I have been working in this field for the last 20 years.