So, I've been hunkered down lately, trying to finish a video course for Firehead Digital Communications on Structured Prompts for Technical Communication (and also my recent webinar with
).In the midst of this, I needed to develop a downloadable for Firehead. Initially, I went a bit overboard, sketching out a whole taxonomy of rhetorical prompt blocks.
You know, the kind of deep dive we academics love. I had to switch gears, because it was a bit more than a downloadable (but stay tuned, it will be coming as a white paper).
But during this activity, I realized something about prompt blocks (or the units we use to build structured prompts): there are actually three kinds of prompt blocks.
It’s not just about creating blocks or fancy frameworks; it is about understanding the anatomy of a structured prompt.
So, this is where we are heading today. We are going to dissect this idea of the anatomy of a structured prompt. It’s not just about understanding blocks or frameworks; it is about understanding the roles these blocks play.
By the way, I’ll be adding this to my PromptOps course, along with my 3 pillars of structuring prompts!
PromptOps coming soon to paid subscribers!
AI Whisperers?
You’ve probably heard of people referring to themselves as AI Whisperers. It sounds mysterious, like there’s some secret language or hidden technique to communicate with AI.
But here’s the secret—there’s no magic involved! It’s all about understanding and structuring prompts effectively. These “AI Whisperers” are essentially people who are adept at structuring their prompts to get the most out of AI, but the structure is not always explicit.
So that’s what I’ll be demystifying today.
To illustrate each component, we’ll take a look at a prompt from Rob Lennon, a well-known AI whisperer, and compare it to a persona prompt that I’ve crafted that helps tech writers develop software personas. This way, we can peel back the layers and see how these components shape the prompt, guiding the AI to produce the results we desire.
So when we talk about the anatomy of a structured prompt, we’re essentially talking about three core parts: Task-based, Context-based, and Content-based. Think of them as the building blocks, the DNA if you will, of every prompt we craft.
Task-Based Blocks
Let's start with the Task-based component. This is where we define what we want the AI to do. It’s like giving a clear and concise job description to the AI, laying out exactly what we expect it to accomplish. Whether it’s generating content, summarizing text, or analyzing data, the task-based component is all about clarity and precision.
For instance, if you are a creator and you’re looking to craft content that resonates, you might use a task-based component to instruct the AI to generate engaging and relatable content on a specific topic.
Or, if you’re in a team or business setting, looking to optimize AI-driven operations, your task-based component could be instructing the AI to analyze and optimize certain kinds of content.
And for the educators out there, this could mean asking the AI to create educational resources or interactive learning materials.
Examining the example prompts, it’s evident that both Lennon's prompt and my own delineate the task succinctly, but they also incorporate an additional, related block.
In my prompt, the AI is instructed not only on the task but also on how to structure the output, providing a clear framework for the response. Conversely, Lennon’s approach involves guiding the AI through a step-by-step process, ensuring a structured progression in accomplishing the task.
These distinctions highlight the importance of specificity in your task block. It’s not merely about stating what needs to be done; it’s about providing a clear and concise pathway for the AI to follow.
Context-Based Blocks
While delineating the task is crucial, the AI needs to grasp more than just what is to be done; it needs to understand the ‘why’ and ‘how’ behind it. This understanding is cultivated through the ‘Context-based’ component of the prompt. It’s not merely about providing background; it’s about embedding the underlying motivations, the reasoning, and the environment in which the task resides.
For instance, we see clear distinctions in how context is interwoven. Lennon’s prompt incorporates the role, style, and reasoning behind the content. It’s not just about what needs to be done; it’s about why it’s being done and how it should resonate stylistically. This gives the AI a clearer picture of the underlying motivations and the desired outcomes of the task.
My prompt, in contrast, lays out the role and goal but also describes the software for which we are generating a persona. This helps the AI understand not only the task at hand but also the environment in which the task is situated and the end goals we aim to achieve with the persona.
It’s this thoughtful incorporation of context that refines the effectiveness and relevance of the AI’s responses, making it an indispensable element in crafting effective structured prompts.
Content-Based Blocks
The last crucial component in the anatomy of a structured prompt is ‘Content-based’ blocks. It’s not just about telling the AI what to do and giving it the background; it’s also about supplying it with the raw materials it needs to execute the task effectively.
This could be any form of content that the AI can use or refer to while generating its responses, such as notes, drafts, previous outputs, or any relevant examples.
In Lennon’s example, the prompt is more open-ended, providing just the topic, leaving room for the AI to use its training and “creativity” to fill in the blanks. This method can be beneficial when you’re seeking diverse insights or fresh perspectives on a topic.
However, for tasks requiring more precision and adherence to specific details, adding elements like notes, drafts, and research can be pivotal, helping to narrow down the scope and guide the AI in generating content that is more aligned with your requirements.
In my example, the content provided is more detailed and structured, including specific categories typically used in creating personas, derived from thorough research. This approach ensures that the AI has a clear understanding of the expectations and a solid base to build upon.
By adding specific content elements, we are essentially refining and focusing the AI’s capabilities to align more precisely with our goals, creating a symbiotic interaction where the provided content serves as a catalyst, enhancing the AI’s efficiency and accuracy in generating the desired outputs.
So … what’s the formula?
You may be asking now whether the order of these blocks matters when structuring your prompts.
Technically, it doesn’t matter a whole lot because language models like GPT read the entire prompt in one go. But they can also focus on multiple parts at the same time.
But maintaining a consistent structure aids the AI in recognizing and adapting to your techniques, which can be especially beneficial if you’re using the same AI model repeatedly.
It also allows you to test and optimize prompts more effectively if you generally take the same tact.
Typically, here’s the order I recommend:
Start with Role and Goal: Lay the foundation by clarifying the overarching aim and purpose. It’s about setting the stage, giving a glimpse of what is to come, like, “What are we here to do?”.
Provide Context and Background: Next, delve a bit deeper by offering relevant background information or context. It’s about painting a fuller picture, filling in the details that will guide the trajectory of the task at hand.
Clearly Define the Task: Then, make your expectations explicit by detailing the specific task. Ensure that there’s a clear connection between the task and the initial role and goal, reinforcing coherence and alignment throughout the prompt.
Finish with Content: Lastly, furnish any content that is to be included, used, or built upon in the task. Separate this clearly using delimiters or labels—I often use three hashtags.
Remember, the anatomy of a prompt is not just about dissecting it into parts, but also about synthesizing these parts in a harmonious whole. The coherence between the context, task, and content is crucial to crafting prompts that are not only clear and focused but also conducive to generating highly tailored and precise outputs.
So you want to be an AI whisperer? No problem.
Master these structured approaches and watch as the magic unfolds within in the creative interaction between your human intellect and artificial intelligence!
What kind of prompts would you like to dissect? Come on over to this page in Substack and leave on in the comments.
The Substack app is amazing if you haven’t checked it out, yet.
This is a succinct approach to building any prompt. I like it!
Makes sense to me, Lance. Love the sequential nature of the process. Looking forward to the white paper.