How to make a GPT chatbot that follows step by step directions

AI Prompt Design
4 min readSep 24, 2024

--

Ever wonder how those super smart chatbots got super smart? Of course, the underlying models are smart, but what about all the directions they’re followed, the optionality, and the steps they walk you through.

Well, here we consider prompt design an art, so it requires a little skill. Often when you write a good prompt, the interaface of a conversation causes it or the user to drift off topic. So how do you keep your AI conversation on track and follow a series of defined steps?

Today we’re gonna cover just that: how to make a custom AI chatbot or GPT that follows step by step directions and then executes an action. This helps keep conversations structured but flexible. Let’s walk through the steps.

Creating a Chatbot: Start with a prompt

You can make your chatbot anywhere, but you will likely need to start with a prompt in order to set the AI chatbot’s behavior. There are plenty of ways to create a chatbot and tons of ways to launch your own ChatGPT wrapper app but we aren’t gonna cover those today. Today we’re gonna stick to the prompt engineering basics.

And with this type of chatbot, it all starts with the prompt.

Prompt Structure

I like to advocate for a structured prompt with defined sections. There’s no right or wrong way, but I like this way because it’s easy to write and easy to edit later.

You should include a section that describes the personality, a section about the goal/task, a section about the speaking style, etc. In this vein, I like to create a Conversation Steps section, a small section that lays out the steps of the conversations.

Let’s use the example of a tax advisor chatbot that is going to ask for several pieces of information and then write a evaluative report with it after its gotten all the information. Let’s say it needs:

  • The user’s profession
  • The user’s location
  • The user’s tax bracket

And that after it gets that information, it will then generate a list of tax exemptions that the user can pursue based on their profession and state tax laws.

Writing the Step-by-Step Prompt

Below is a breakdown of the a step-by-step prompt for this tax advisor chatbot.

Importantly, you’ll notice it’s pretty simple! A simple explanation of the bot and the steps it should follow.

You can test out the chatbot and add steps at any point to the conversation.

Writing the tax advisor chatbot prompt…

For most modern no-code chatbot builders, you can simultaneously build the tool and test it. So iterating should be fast and easy!

You can also stress-test the prompt. Try giving unclear answers or taking left turns when it’s expecting a right. This will help you design a more impactful, robust chatbot.

Testing the tax advisor chatbot prompt…

The formula is pretty simple! This framework is simple to use, flexible for any changes you want, and fairly quick to write!

If you create Actions or API integrations within the chatbot, you can even instruct the chatbot to run these in one of the steps! For example, if you enable some abilities like web-browsing or image generation, you can include those as discrete steps in your chatbot.

Enabling special functions in a chatbot

After you’ve enabled those functions, you can evoke them from your prompt with ease!

Calling the special functions within the steps of the chatbot

Get Started

Step by step chatbots (sometimes called stepwise chatbots) are a powerful framework for flexible GPTs. It’s the beginning of truly agentic chatbots (chatbots that can make decisions at points in the conversation).

There are plenty of cool ideas to pursue with AI chatbots. Get started creating your own AI chatbot today.

--

--