Discover more from Cyborgs Writing
Step-by-Step Guide to Taking a Structured Approach to Building Chatbots
GPTs are tools, not people.
Unless you've been off the grid, you're likely buzzing about GPTs and ChatGPT's new bot builder.
But let's tame our expectations – while this is a significant leap in how we harness ChatGPT within its own ecosystem … these bots are no HAL 9000.
That said, when used in targeted and structured ways, GPTs can be great tools for everyday or common tasks that don’t require a lot of data or complexity.
Basically, these chatbots are a clever use of prompts tucked into a user-friendly chat interface. You can now feed these bots your data, and if you're already a ChatGPT Plus member, it's not going to cost extra.
Imagine the possibilities, especially for educators seeking budget-friendly tech solutions. Free, accessible, and customizable bots for the classroom. To good to be true!
Yeah, probably – it's currently exclusive to subscribers. To use any of these bots, you must fork over the $20 a month … not many students are likely doing that.
And while I think schools will need to implement something like this, eventually, I don’t expect it any time soon. I’m still waiting for the video editing software update from four years ago. 😆
The effectiveness of these bots hinges on the quality of your prompts and data. You're not unlocking new ChatGPT capabilities; you're refining how you use existing ones. If you've got the knack for structuring your approach, these GPT bots can become invaluable tools in your personal toolkit or within your team's workflow.
So, let's dive in and explore how you can make the most of this exciting development!
Step 1: Tailor Your Bot for a Specific Task
Make one GPT per task. Most people expect too much from the LLM technology that we currently use for these chatbots.
The more complex or the more steps to a task, the more likely it will go off the rails.
They work best with a narrow, well-defined task that is clearly contextualized and articulated in detail. Structured approaches to GenAI usually means focusing the technology on specific, well-defined purposes, constraining its field of vision.
Right now that mostly means structuring a prompt or providing new data.
Ultimately, ChatGPT is a guessing technology. It may seem countintuitive, but the bigger the model or dataset the worst it works. It is simply more things to guess about.
Prompt-building has always been about constraining AI with context, examples, content, data, or just a more interaction.
So avoid making people or personas and focus on tools … or people and personas that perform a very specific task.
Don’t create a writing advisor bot. Create a Medium Article Booster that specifically helps writers make their writing more human-centered.
Don’t create an audience analysis bot. Create a Choose-Your-Own Persona for Substack coach that helps users fine-tune and test a specific audience using personas.
Once you’ve got this narrowed, its time to structure your instructions.
Step 2: Clearly Structure Your Instructions
I don’t recommend just using the bot builder, which does not create structured prompts.
Whoever created the bot builder doesn’t understand structured prompting. You can past your structured prompt into the prompt builder, but there is a good chance it will mess it up simply by trying to paraphrase it.
Instead, click on “Configuration.” Add your prompt to the“Instructions” box. If you are using something like Zapier, it might say “Directions” or something similar.
If you want to know more about structured prompting, take a look at some of my other posts. These two are a good place to start:
In a nutshell, structured prompting is a technique that involves organizing prompts into distinct, labeled blocks using semantic tags [TAG]. These blocks provide a clear structure and framework for the chatbot's instructions, making it easier for the AI models to understand and generate accurate responses.
By dividing prompts into specific sections, such as role, goal, definitions, constraints, task, process, and examples, structured prompting helps constrain the AI's focus and improve the quality and relevance of its output.
This approach enhances the chatbot's ability to communicate effectively, provide helpful information, and guide users through desired interactions. It also helps teams and organizations test AI prompts for accuracy and consistency.
As a quick example, here is a basic template that I use to build my chatbots. It is a great starting point.
[ROLE] -Describe the persona of the chatbot.- [GOAL] -Overarching goal or learning outcome.- [DEFINITIONS] -Define any word or idea specific to the class, especially if referenced in the prompt- [CONTRAINTS] -What don't you want the bot to do- [TASK] -Detailed description of the task- [PROCESS] -Break task into steps. Be sure to describe expectations for user interaction- [EXAMPLE] -Provide any examples of relevant output-
You can also add files with data, but I recommend only doing this when necessary and only use the data that is directly relevant to the task. Too much irrelevant data makes it more likely to go off the rails.
Alternatively, you can use the bot builder to draft your GPT, but then go into the configuration and add some structure.
For example, for my Medium booster bot, I used the GPT builder and turned its instructions into a [INSTRUCTIONS] prompt block. I then added a [GOAL] and [PROCESS] block.
Then I decided that I wanted the bot to use the same greeting and signoff. XML works for this. An XML tag looks like this <greeting> Text. </greeting>. Then you use the same tag in your instructions.
1. Start with the <GREETING> to be sure the user is on the same page. Do not include the XML.
If you don’t know, XML (or Extensible Markup Language) is a standardized way of organizing and structuring data similar to HTML. It uses tags to define the structure and content of information in a document. XML is highly versatile and widely used in various industries, including web development, data storage, and communication between different systems.
XML is valuable for prompting AI because it provides a structured format that helps in constraining and guiding the AI model's understanding, especially when labeling content blocks (or prompt blocks containing content for the AI).
Warning: These are not secure chatbots. It is really easy for users to get your instructions or the data you upload. Do not upload or prompt anything you would not post on the internet.
Step 3: Test and Refine Your Chatbot
Once you've structured your instructions, it's time to test your chatbot to see how well it performs. Start by inputting some sample prompts and evaluating the responses. Pay attention to any areas where the bot may struggle or provide inaccurate information.
Remember to also review and update any constraints you have set for the chatbot. By clearly defining what the bot should not do, you can help prevent it from providing irrelevant or incorrect information.
I also recommend that you fine tune each step in the [PROCESS] block. It can take considerable work to make sure those steps are worded in a way that delivers consistent results, especially if you want to the interaction to go through a specific set of steps. Here are tips that might help:
Make each step super small.
Clearly label expectations from the user.
Repeat important steps or steps that get missed.
Add “Make sure to …” for steps that consistently get missed
Regularly test and refine your chatbot to ensure it continues to meet your needs and deliver accurate and valuable responses. If needed, iterate on your instructions, making them more explicit or providing additional examples. The goal is to refine your chatbot's abilities and improve its performance over time.
Don't forget to test your chatbot with real users as well. Gather feedback and make any necessary adjustments based on their experiences.
Step 4: Don’t Forget the User
Building bots isn’t just about getting the bot do what you want or programming a bot to perform tasks.
Effective chatbots require a tacit agreement between the builder, the bot, and the user (unless you are the only user). If these are not in alignment, then the interaction is more likely to go off the rails. So how do we create alignment?
As we do with any content or interaction. Communicate clearly with users.
Transparency is key. Users should be informed about the bot’s purpose and how to interact with it effectively. This understanding fosters smoother interactions and enhances user experience.
If the user doesn't know, understand, or agree with this tacit agreement, the bot is not going to work. The secret to a successful chatbot lies in the harmony of its design, functionality, and user interaction.
You are not just shaping outputs … you are shaping interactions.
To build this into your prompt, I recommend:
Creating a clear (not clever) name for your bot that describes its purpose
Outline the interaction in the bot description
Include inside the prompt little notes (or XML text) to the user that encourage the bot to explain what is happening
For example, here is my description for my Substack persona bot … a fairly complex interaction.
Remember, the user's understanding and engagement are crucial for the success of your chatbot. By communicating clearly and fostering a positive user experience, you can enhance the effectiveness of your bot and create a more satisfying interaction for users.
Bots aren’t people. It’s vital to remember this as you embark on the journey of creating and using them. The key is to give them a task, not a role.
They're not like traditional software programs that follow instructions to the letter. You can’t expect them to execute commands with absolute precision, nor can you anticipate that users will always interact with them as intended.
Chatbots are, at their core, semantic language models. Their primary function is to generate text based on the input they receive. This characteristic makes them incredibly powerful and versatile tools in the digital world. However, it's crucial to temper our expectations and understand the limitations inherent in their design.
While chatbots can simulate conversation and provide helpful responses, they operate within the boundaries of the data they're trained on and the instructions they're given. They excel in tasks that are well-defined and where the scope of interaction is clearly outlined.
Setting realistic expectations is key.
Acknowledge the strengths of chatbots in handling specific tasks and generating user-oriented content, but also be mindful of these limitations. They aren’t a one-stop solution for every digital interaction, but when used strategically, they can significantly enhance the efficiency and quality of digital communications.
By embracing chatbots for what they are – sophisticated, yet limited text generators – we can harness their full potential without overestimating their capabilities.
Let's approach chatbot creation and interaction not just with enthusiasm and innovation but also with a clear understanding of what these remarkable tools can and cannot do.
(Not a ChatGPT plus subscriber, I’ll show you how to do this for free with Zapier in the upcoming bonus for paid subscribers.)