GPT chatbots like ChatGPT are great at some tasks, but . . . not at everything.
Luckily, there are prompting strategies you can use to improve your generative AI workflows.
Prompt chaining is a technique you can use for any tasks that require multiple in-depth steps. It involves breaking down the task into smaller steps, and using the AI output to inform the next steps.
Let’s break it down:
What is prompt chaining?
Prompt chaining is a natural language processing (NLP) technique that uses a series of prompts to tackle each step of a multi-step task.
Each prompt in the chain handles one part of the task, and the AI output is used to inform the subsequent steps.
Examples of prompt chaining
Content creation
Prompt 1: Create an outline for an employee briefing about how AI automation can improve productivity.
Output:
- Introduction: What is AI automation?
- Benefits of AI automation in the workplace
- How AI can streamline repetitive tasks
- AI tools that can enhance productivity
- Addressing concerns and challenges with AI automation
- Conclusion and next steps
Prompt 2: What are common concerns and challenges (i.e. #5 from the above output) for employees adopting AI automation?
Output:
- Job security
- Skill gaps
- Trust and transparency
- Data security and privacy
Prompt 3: What are common data security concerns for employees adopting AI automation and how can we mitigate them?
Using this technique, you can prompt a conversational AI tool to generate all the ideas and content that you want to include in your briefing.
If you asked a generative AI chatbot for this briefing outright, it’s likely not going to deliver the same length or level of quality as it will when broken down into individual steps.
Strategic planning
Say you want to ask an AI chatbot to generate an outline of a marketing plan for your hotel business.
Prompt 1: Generate an outline of a strategic marketing plan.
Output:
- Executive summary
- Market research and analysis
- Marketing goals and objectives
- Target audience
- Marketing strategies
- Tactics and implementation
- Budget and resources
- Measurement and analytics
- Conclusion
Prompt 2: What are examples of marketing goals and objectives?
Output:
- Increase brand awareness
- Generate leads
- Boost sales and revenue
- Improve customer retention
- Expand marketing reach
Prompt 3: What are the best ways to generate leads for a hotel?
Output:
- Invest in an AI chatbot to efficiently book rooms and upsell services
- Partner with local businesses for referral services
- Offer special promotions and packages
- Optimize your website for SEO
Prompt 4: Can you explain step-by-step how I can implement a chatbot for hotels?
By asking for information about each step and sub-step of the generated outline, you can easily build out a draft of your strategic marketing plan.
When should I use prompt chaining?
Prompt chaining is best suited for complex, multi-step tasks. If each step of a task needs to be thought through, it’ll always be beneficial to break it into smaller tasks.
And if you’re starting from zero, getting ideas and content through each step of your prompt chain is the easiest way to build cohesive output.
A few examples of tasks that should employ prompt chaining include:
- Building a business strategy for a new business
- Developing an AI sales strategy or AI sales funnel
- Generating detailed content, like a report or a briefing
- Designing a training program for new employees
- Calculating the ROI of your AI chatbot
These tasks require multiple steps that are better generated one at a time than all at once.
Prompting changing vs chain-of-thought prompting
Though similar in name, prompt chaining and chain-of-thought prompting are different prompting strategies to improve generative AI output.
Chain-of-thought prompting
With chain-of-thought prompting, a user guides the AI to explain the reasoning behind its answer in a single response. This prompts the AI to walk through each step of the problem-solving process, but it’s accomplished in a single prompt and response.
For example, a chain-of-thought prompt can be accomplished in one message:
"An HR team needs to review 5 employee performance evaluations. Each will take 30 minutes and they need 15 minutes to prep beforehand. Senior evals will require an extra 10 minutes each. How long will it take to complete 5 senior and 25 junior evals? Break down your reasoning step by step."
Prompt chaining
With prompt chaining, the task is broken into separate steps with multiple prompts, each building on the previous result. This helps structure and guide the AI through a complex task that likely involves reasoning.
The first prompt might look like:
Prompt: Identify the main challenges a company might face when transitioning to remote work.
Output:
- Communication gaps
- Maintaining productivity
- Technology infrastructure
- Employee engagement
The next prompts might dive further into these concepts. For example:
Prompt: Please tell me how a company can find solutions to communication gaps when transitioning to remote work.
After the next round of output, the next link of the chain may be:
Prompt: What are the common challenges companies face when they adopt these solutions?
So while the two are similar, they take different approaches to extracting the most in-depth and relevant content from generative AI tools.
Build a customized AI agent
Botpress is the only AI agent platform that allows you to build truly autonomous agents.
The open and flexible Botpress Studio allows for endless use cases across industries, from HR to lead generation. Our pre-built integration library and extensive tutorials let users easily build AI agents from scratch.
Start building today. It’s free.
Table of Contents
Stay up to date with the latest on AI agents
Share this on: