<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gyorgy Bakocs on Medium]]></title>
        <description><![CDATA[Stories by Gyorgy Bakocs on Medium]]></description>
        <link>https://medium.com/@gyorgy.bakocs?source=rss-9013e842039c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1lGS5v3nluh6-SnL</url>
            <title>Stories by Gyorgy Bakocs on Medium</title>
            <link>https://medium.com/@gyorgy.bakocs?source=rss-9013e842039c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 12:12:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gyorgy.bakocs/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Developing Personas in AI Part I: Defining the Role and Identity]]></title>
            <link>https://medium.com/@gyorgy.bakocs/developing-personas-in-ai-part-i-defining-the-role-and-identity-5fb2993ad113?source=rss-9013e842039c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fb2993ad113</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <dc:creator><![CDATA[Gyorgy Bakocs]]></dc:creator>
            <pubDate>Sun, 20 Aug 2023 15:15:28 GMT</pubDate>
            <atom:updated>2023-08-20T15:15:28.200Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/0*Rm_e7k5CPs54C90K" /></figure><p>In my previous article, (<a href="https://medium.com/@gyorgy.bakocs/anatomy-of-the-prompt-49e606cfb5cb">Anatomy of the Prompt</a>), we talked about the basic structure of a prompt. We all already know that a prompt is more than just a question or a command; it is a complex request made up of several important parts. Among them, the term “persona” stands out as a crucial component.</p><p>A persona is a set of characteristics and guidelines that tell an AI system, what role it needs to play during a conversation. It includes the identity, how it acts, and what it knows, allowing it to respond in a manner that aligns with a specific character or role. This is the common definition of the persona, you can find everywhere on the internet.</p><p>I’m sure you have read a lot of articles and maybe even taken a few courses about prompt engineering. In all these articles and courses they introduce interesting and useful prompting techniques, explaining how to do it, but they rarely talk about why it should be done this way. You probably know the “persona pattern” and you already know how to use it. But have you ever thought about what a persona is? Why is it important to define it? What are its components, and how are they interconnected with each other, and with the rest of the prompt? These are things that other articles do not cover in detail, although a well-written persona is one of the most crucial elements of the prompt.</p><p>The persona is not just a simple, isolated element. It exists within a context, and it is a vital part of the prompt. Context provides the surrounding information, previous interactions, and environmental factors that shape how the persona acts and responds. Together, persona and context form a relationship that helps AI systems talk more naturally, with more empathy, and more effectively.</p><p>In the following sections, we will delve deeper into the importance of persona, exploring its multifaceted applications, and the art of crafting it. The era of one-dimensional AI communication is behind us, now we can use personas to make AI talk to us in a more human way.</p><p>In the first article of this series, we will focus specifically on the “role” and “identity” parts of the persona, laying the groundwork for a comprehensive understanding of how personas function in AI conversations. Stay tuned as we unfold the intricacies of these fundamental aspects.</p><h3>Table of Content</h3><p>1. Main Parts of the Persona</p><ul><li>1.1 Role</li><li>1.2 Identity</li><li>1.3 Personality</li><li>1.4 Background</li><li>1.5 Communication Style</li><li>1.6 Lifestyle</li><li>1.7 Relationships</li><li>1.8 Motivations and Goals</li></ul><p>2. Role</p><ul><li>2.1 Types of Role</li></ul><p>— 2.1.1 Professional Roles</p><p>— 2.1.2 Relationship-Based Roles</p><p>— 2.1.3 Hybrid Roles</p><p>— 2.1.4 Others</p><ul><li>2.2 Detailed Example of Role</li></ul><p>3. Identity</p><ul><li>3.1 Name</li><li>3.2 Age or Age Range</li><li>3.3 Gender</li><li>3.4 Location</li><li>3.5 Education</li><li>3.6 Family Status</li><li>3.7 Occupation</li></ul><p>— 3.7.1 Example of Occupation</p><p>4. Final Example</p><h3>1. Main Parts of the Persona</h3><p>A persona, within the context of conversational AI, is a perfectly constructed character that implements specific attributes and behaviours. A persona is a fictional entity that encapsulates a role or archetype, often mirroring a segment of the target audience or user base. It includes aspects such as age, gender, occupation, interests, values, and background. These elements are not isolated, they interplay to form a coherent identity, mirroring the complexity of human personality.</p><p>Putting together a persona is a tricky mix of art and science. It affects not only what AI says but also how it says it, adjusting to the context, emotions, and objectives of the interaction. The anatomy of a persona is a complex framework that makes technology more human. Understanding this anatomy is a big step toward making AI not just interactive but also really communicative.</p><p>Here’s a brief overview of the various facets that contribute to crafting a persona. Some parts are indispensable; without them, the ChatGPT’s default persona takes over control, while others are optional, and their use just refines the persona’s behaviour.</p><h3>1.1 Role</h3><p>The role of a persona defines the function or position that the AI is to assume within the context of the interaction. This role acts as a guide or framework that instructs the AI on how to respond, behave, and engage with the user. It may influence the tone, language, level of formality, and even the content of the conversation.</p><p>By defining the role, the designer of the AI system provides a clear and directed path for the interaction, ensuring that the conversation aligns with specific goals or use cases.</p><h3>1.2 Identity</h3><p>The identity of a persona refers to the collection of attributes and characteristics that define and humanize the AI system within the context of a conversation. It involves specific details that might include aspects such as a name, age, gender, occupation, or any other features that can personify the AI system.</p><p>Unlike the role, which guides behaviour and purpose, the identity adds depth and relatability to the persona. It allows the AI to engage with users in a way that resonates more closely with human-to-human interaction. By providing an identity, the AI is no longer a faceless machine but takes on characteristics that can be recognized and related to it.</p><p>The crafting of identity within a persona is a delicate process. It must align with the overall goals of the interaction, ensuring that the persona’s identity is appropriate for the intended audience and use case.</p><h3>1.3 Personality</h3><p>The personality of a persona is the element that brings the character to life by infusing it with specific traits, emotions, attitudes, and behaviours. It goes beyond the static attributes of identity and role by adding dynamism and vibrancy to the AI’s interactions with the user.</p><p>Personality can encompass various aspects such as temperament, preferences, values, and even quirks or idiosyncrasies. It’s what makes the conversation feel genuine, authentic, and engaging, as the AI is able to respond in ways that reflect particular human-like characteristics.</p><h3>1.4 Background</h3><p>The background of a persona in conversational AI is a complex and multifaceted concept that paints a complete picture of the character’s history, culture, experiences, and life context. It encompasses everything from family dynamics and upbringing, reflecting the relationships, roles, and experiences that shape early life, to cultural background, which includes ethnicity, nationality, traditions, values, and norms that influence the persona’s worldview.</p><p>By weaving together these aspects, the background creates a nuanced and complex character that helps explain why the persona thinks, acts, and responds in specific ways. It provides a richer context for the persona’s interactions, contributing to more authentic and engaging communication. Background knowledge is an essential tool in conversational AI design, adding layers of complexity and realism, supporting the role, identity, and personality of the persona, and grounding them in a believable and relatable context.</p><h3>1.5 Communication Style</h3><p>The communication style of a persona is a vital element that shapes the way an AI system talks to users. It is influenced by various factors, including the persona’s role, identity, personality, and background. It encapsulates the choice of words, the formality or informality of language, the use of jargon or colloquialisms, and the emotional tone conveyed. It can be warm and friendly, formal and professional, casual and conversational, or any other style that aligns with the character being portrayed.</p><p>The design of the communication style must consider the target audience, the context of the interaction, and the overall goals of the AI system. It’s about finding the right balance between being understandable while staying true to the character’s traits and the interaction’s purpose.</p><h3>1.6 Lifestyle</h3><p>In the context of conversational AI and persona design, the lifestyle of the persona represents the habits, behaviours, preferences, and day-to-day activities that characterize the persona’s way of living. It is an abstract concept that encompasses various dimensions.</p><p>Crafting the lifestyle aspect of a persona requires a deep understanding of the character’s role, identity, personality, background, and communication style. It must be consistent with these other elements, reflecting a cohesive and well-rounded character.</p><h3>1.7 Relationships</h3><p>The relationships aspect of a persona in conversational AI refers to the connections, interactions, and bonds the persona has with others. Relationships can be multifaceted, encompassing connections with family members, friends, colleagues, mentors, and even rivals or adversaries. These relationships can have different natures, ranging from close and supportive to distant or conflicting.</p><h3>1.8 Motivations and Goals</h3><p>The motivations and goals of a persona in conversational AI represent the underlying drivers that guide the persona’s actions, decisions, behaviours, and attitudes. This aspect of the persona defines what the character seeks to achieve, what drives them, and what they value. The motivations and goals of a persona are not isolated elements; they interact with other parts of the persona, such as the role, identity, personality, background, lifestyle, relationships, and communication style. They help explain why the persona behaves in certain ways, reacts to specific situations, or makes particular choices.</p><h3>2 Role</h3><p>In conversational AI, the role acts as the skeleton of a persona. A well-defined role guides the AI in behaving and responding as though it were a human in that specific position. The role’s significance cannot be overstated. Without a clear role, a conversation with AI can become a bland, mechanical exchange. With a role, it becomes an experience.</p><p>Structuring the role is a blend of art and science. It’s not merely defining a function but shaping a character with a unique voice and manner. The structure must encompass the functionality, demeanour, and also limitations. The crafting of the role must be done with finesse. It’s about achieving a delicate balance that resonates with the user, stays true to the function, and adheres to ethical and practical boundaries.</p><p>The role is one facet of the persona, and it must seamlessly integrate with the other parts. While the role outlines the function and behaviour, the identity gives it a name and face. The personality infuses it with traits like humour or empathy, while the background might include fictional or real qualifications and experiences.</p><h3>2.1 Types of Role</h3><p>The type of role chosen can dramatically affect the interaction’s nature, guiding the AI’s language, tone, content, and even the structure of the conversation. Selecting or crafting the right role is a critical step in designing a conversational experience that is both engaging and aligned with the goals of the interaction.</p><p><strong>2.1.1 Professional Roles</strong></p><p>A persona might have the role of a “Software Engineer” or a “Customer Support Representative”. This role implies specific expertise, responsibilities, and likely daily tasks. It will affect their language use (e.g., technical jargon), problem-solving approach, and perhaps even values (e.g., valuing innovation and efficiency).</p><p><strong>2.1.2 Relationship-Based Roles</strong></p><p>Consider a persona as a “Grandmother” or a “Friendly Neighbour”. This role implies a certain age range, possible generational values, and likely a nurturing or wisdom-sharing function within the family dynamic. Her interactions, language, and concerns would be shaped by this role.</p><p><strong>2.1.3 Hybrid Roles</strong></p><p>Sometimes, roles can combine different aspects, such as a “Fitness Coach and Nutrition Guide” or “Parenting Advisor and Child Psychologist.” These hybrid roles create a multifaceted persona that can engage users on multiple levels.</p><p><strong>2.1.4 Others</strong></p><p>There are several different role types, but most of these groups can be classified into the “professional” type. For example, we can classify “Language Tutor” as a professional role or an educational role, and a Stand-up Comedian can be in entertainment roles and in professional roles, too”.</p><h3>2.2 Detailed Example of Role</h3><p>I would like to demonstrate the importance of the persona’s role. Let’s take a look at the next example of the behaviour of different personas.</p><p>If we ask ChatGPT without providing a persona, the answer will be quite common and lacks originality. The tone is informative and neutral, aiming to provide the reader with a clear understanding of the subject without interjecting personal opinion or bias. Structurally, the answer is well-organized, moving from general to specific. In terms of language complexity, the writing is clear and concise and the technical jargon is avoided. In this case, ChatGPT uses the default persona. The OpenAI team has fine-tuned this so that it works well for everyone, but as a result, the default setting for ChatGPT is a little bit dull.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OstLShhcTo-Pc88f" /><figcaption>Without persona, ChatGPT uses the default one</figcaption></figure><p>In the next example, we will create three personas which slightly different roles. We are going to compare the given answers, evaluating the similarities and differences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UCiSFQG8AP9Iv6D5" /><figcaption>Different personas, different answers</figcaption></figure><p>The three answers from the different personas illustrate how distinct roles and specializations within the IT sector can lead to varied perspectives on the same subject, in this case, Artificial Intelligence. The traditional IT Engineer, provides a reserved and concise view, treating AI as a supplementary part of his work. In contrast, the engineer, with a specialization in AI, communicates with enthusiasm and expertise, showcasing AI as a revolutionary field. Finally, the third one, balancing roles in IT and Sales, bridges the technical and commercial aspects, providing a more integrative perspective. The differences in tone, vocabulary, style, and logic across these responses reflect the unique lens through which each persona sees and interacts with AI, demonstrating the multifaceted nature of the technology and how it resonates differently depending on one’s role and specialization.</p><h3>3. Identity</h3><p>In the context of conversational AI and prompt design, the concept of “identity” refers to the unique and individual characteristics that define the persona’s existence. Unlike the “role,” which emphasizes the function or occupation, the “identity” component adds nuances that make a persona distinct, human-like, and relatable.</p><p>The identity of a persona is not just a list of attributes but a coherent and engaging character sketch that brings an AI to life. The identity adds depth to a persona, allowing it to go beyond mere functionality. A well-defined identity ensures that the AI’s responses are coherent and consistent across various scenarios, enhancing the believability of the persona.</p><h3>3.1 Name</h3><p>The name of a persona is a significant aspect of its identity, serving as a unique identifier and often the first point of contact between the user and the AI. The name is not only a label but a powerful tool that introduces the persona, sets expectations, and builds relationships. Giving a name to the persona makes it more relatable and human-like. Sometimes, only the name sets a tone of professionalism and academic achievement. (using Dr, PHD — and so on — in the name)</p><h3>3.2 Age or Age Range</h3><p>“Age” or “Age Range” is a crucial aspect of defining a persona for a prompt. It helps in tailoring the language, tone, perspective, and content of the responses. By specifying a particular age or age range, you guide the model to respond in a way that aligns with the attributes, experiences, and viewpoints associated with that age or life stage.</p><p>Age can set certain expectations about knowledge, attitude, and behaviour. For example, a younger persona might be perceived as more tech-savvy, while an older one might be seen as wise or experienced.</p><p>Age can affect the way a persona communicates, influencing its choice of words, slang, formality, and reference points.</p><p>In many cases, users may feel more comfortable with a persona of a similar age or one that fits a particular context or service. For instance, a younger persona might be suitable for a trendy fashion app, while an older persona might be fitting for a historical tour guide.</p><p>Representing age requires care and sensitivity, as it can inadvertently lead to stereotypes or biases. Understanding the target audience and their preferences can help in selecting an age that fits with them and it should align with the purpose of the AI system.</p><h3>3.3 Gender</h3><p>Gender plays a critical role in shaping the identity of a persona in AI systems. Its importance lies in how it can influence user perception, engagement, and overall experience. The choice of gender, or lack thereof, often aligns with a brand’s voice, target audience, or societal values.</p><p>An option might be to go for a gender-neutral persona, avoiding potential biases. However, if a specific gender is defined, maintaining consistency across interactions and avoiding stereotypes will contribute to a more respectful and believable representation.</p><h3>3.4 Location</h3><p>The “location” refers to the geographical place where the persona resides, has lived, works, or has significant connections. Different locations carry unique cultures, values, and norms. Location can influence the way a persona speaks, including accents, slang, or regional terms.</p><h3>3.5 Education</h3><p>The “education” aspect of a persona’s “identity” is a multifaceted component that often plays a crucial role in defining a character within a prompt. It refers to the formal and informal learning experiences that have shaped the persona’s knowledge, skills, beliefs, values, and attitudes. It includes not just formal schooling but also self-education, vocational training, and lifelong learning.</p><p>Education provides insight into a persona’s intellectual background, thinking style and often correlates with socioeconomic status and can impact a persona’s job, income, social circle, and opportunities. It can shape values and worldviews, influencing opinions on politics, religion, science, arts, etc. Finally, education level can influence language usage, argumentation skills, and general communication style.</p><h3>3.6 Family Status</h3><p>The “family status” is an influential element that contributes to the complexity and authenticity of a character within a prompt. It encompasses the persona’s relationships and roles within their family structure. It includes factors such as marital status, children, relationships with parents, siblings, cousins, etc.</p><p>Family status often influences behaviour, priorities, values, and decision-making processes. It provides context for social interactions, revealing potential support networks, obligations, and more.</p><h3>3.7 Occupation</h3><p>This information can be specific (e.g., neurosurgeon, high school math teacher) or more general (e.g., healthcare professional, educator). It provides context for the persona’s background, expertise, and the likely way they would approach or respond to various topics. This attribute in a persona serves as a crucial anchor for understanding the persona’s expertise, interests, and communication style.</p><p>The job title shapes the expertise, authority, and possibly the daily life of the persona. Different job titles bring different responsibilities and might influence the persona’s stress levels, happiness, or social status.</p><p>The industry the persona works in will affect their knowledge, terminology, and possibly their values and interests.</p><p><strong>3.7.1 Example of Occupation</strong></p><p>If you remember, the example of the role was “IT Engineer”. In some cases, the role and the occupation might align. However, the distinction lies in the broader, situational nature of the role, versus the more specific and career-oriented nature of the occupation. In this context, we can define a more sophisticated role by adding some extra information. While “Principal IT Engineer” emphasizes leadership, coordination, and project management, “Junior IT Engineer” highlights areas such as weaker technical skills, problem-solving, and hands-on work. Moreover, when defining the occupation, we can specify the company, thereby providing new opportunities for a more precise characterization of the persona’s attributes. After all, it makes a huge difference whether an engineer works for a market-leading IT company or a small startup.</p><p>In the first example, we are going to change only the role, not the occupation, and analyze the responses using ChatGPT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a4V1fSbQgWq9_Avw" /><figcaption>Different roles, different answers. The occupation is the same.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/0*wuJPlmqTz9aO-YO1" /><figcaption>the analysis of the result</figcaption></figure><p>The three personas — Mark Johnson, John Markson, and Marky Mark — each provide a unique perspective on AI, reflecting their individual roles and personalities. Mark Johnson, the IT engineer, offers a professional and practical viewpoint, focusing on efficiency and problem-solving. John Markson, the principal IT engineer, takes an authoritative and strategic stance, emphasizing leadership and the big-picture impact of AI on the organization. In contrast, Marky Mark, the junior IT engineer, approaches the subject with youthful enthusiasm, informal language, and a personal connection to the topic.</p><p>The second example will show what happens when we change the occupation. The role of the personas will remain the same complex one that we used in the previous example. As we did earlier, we will analyze the responses using ChatGPT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gODzSyXeUb7EyGsl" /><figcaption>Different identities (different occupations), different answers. The role is the same.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/0*k8dczKFIVoZ137Np" /><figcaption>The analysis of the result</figcaption></figure><p>The responses from an engineer at IBM and an engineer at a small start-up illustrate distinct perspectives shaped by their respective professional environments. Mark’s communication is formal and corporate, filled with technical jargon and complex sentence structures that emphasize innovation and industry leadership. It’s a style fitting for a multinational corporation that’s at the forefront of technology. In contrast, John’s response is imbued with a more entrepreneurial spirit, characterized by a casual tone, conversational vocabulary, and a focus on practicality and adaptability. His simpler and more direct approach resonates with the agile and dynamic nature of start-up culture.</p><h3>4. Final Example</h3><p>Rather than providing a brief summary, I’ll give one last example of the immense impact that a well-defined personality of persona has on ChatGPT’s communication. In this example, we will create four different personas with the same role. We will build the identities of the first three step by step and observe how the responses improve. The identity of the fourth one will be absolutely different, to emphasize the changes in the response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*j7VXkRakOu8bgqs6" /><figcaption>Four personas with the same role, different identities, different responses</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/0*bLvnp6eBUU4qrGtH" /><figcaption>The analysis of the first three answers</figcaption></figure><p>The creation of the personas Mark Johnson, John Markson, and Mark Markson illustrates a thoughtful and progressive approach to character development. Starting with Mark Johnson, we made a basic profile of a Principal IT Engineer by focusing on their professional knowledge of AI and not getting into their personal lives. With John Markson, we added layers of complexity by introducing his location in New York and education, enabling a more educated and societal view of AI. Lastly, with Mark Markson, we added more details about him, such as his family and his job at IBM, to make the persona more realistic. This step-by-step process made it possible for different answers, each reflecting a unique blend of professional expertise and personal characteristics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/0*-GhQ7eO791DivOWQ" /><figcaption>The analysis of the last two answers where we had complete identity of the persona</figcaption></figure><p>In the comparison between the personas of Mark Markson and John Johnson, we uncover notable differences in their perspectives on AI’s impact, shaped by their unique life situations. Mark Markson’s casual and reflective tone, utilizing conversational vocabulary, highlights a seamless integration of professional experiences at IBM with his personal life as a divorced man in New York. His focus lies on the practical and anecdotal impact of AI. John Johnson, on the other hand, projects a youthful and excited approach, emphasizing the connection between AI, his family life, and his specialized job role. His perspective is practical and relatable, filled with enthusiasm for technology’s influence on his daily life. These contrasts between Mark’s reflection and John’s excitement illustrate the multifaceted nature of AI, demonstrating how different personal and professional contexts can shape one’s understanding and appreciation of this transformative technology.</p><p>In this article, we have dissected two fundamental components: the role and the identity. The role serves as the functional part that defines the persona’s position or purpose within a given context, outlining their responsibilities and guiding their behaviour. Meanwhile, the identity adds depth and humanity, including aspects such as name, age, gender, occupation, location, education, and family status. Together, these elements construct a lifelike and multidimensional character, transforming AI communication from static exchanges into dynamic, engaging, and relatable interactions. This investigation lays the groundwork for a more extensive examination of other components of the persona. But this is already a different story.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fb2993ad113" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Anatomy of the Prompt]]></title>
            <link>https://medium.com/@gyorgy.bakocs/anatomy-of-the-prompt-49e606cfb5cb?source=rss-9013e842039c------2</link>
            <guid isPermaLink="false">https://medium.com/p/49e606cfb5cb</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <dc:creator><![CDATA[Gyorgy Bakocs]]></dc:creator>
            <pubDate>Wed, 09 Aug 2023 18:26:07 GMT</pubDate>
            <atom:updated>2023-08-09T18:26:07.658Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/0*WYpHodvQRFZ9qXTD" /></figure><p>When we talk to each other, we use questions and statements to start a conversation. In the world of artificial intelligence, we do something similar with what’s called a “prompt.” A prompt is like a question or a command that we give to a computer program to get a response. Think of it as a starting point for a conversation with a machine.</p><p>Prompts help us tell the computer exactly what we want to know or do. Whether we’re asking for the weather forecast, seeking help with homework, or even telling a joke, prompts guide the computer in understanding and answering our requests. In this article, we’ll explore the different parts of a prompt, breaking it down to understand how it works, but we do not want to dive into details. (Writing a prompt is a different thing than knowing its parts.)</p><h4>1. Task Definition</h4><p>The only mandatory part of the prompt is the “task definition.” It’s the heart of the prompt, the core instruction that tells the computer program exactly what you want it to do. The task definition can be a question, a command, or a request. The task definition sets the scope and direction for the AI’s response. A good prompt is carefully crafted to be clear and specific, so the AI knows exactly what’s expected.</p><p>What if the prompt does not contain a task definition? Without it, the interaction can become directionless, ambiguous, and AI will not know what it should do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*P4MUlwJWIH8WPjlk" /><figcaption>useless prompt</figcaption></figure><p>The main task categories:</p><ul><li>Explain</li><li>Describe</li><li>Create (Write)</li><li>Update (Rewrite)</li><li>Translate</li><li>Summarize</li><li>Role-play</li><li>Predict</li><li>Advise</li></ul><h4>2. Persona/Context</h4><p>I believe this should be a mandatory part of the prompt, even though it currently isn’t. Let’s see why it is important, and why it is a problem if it is missing from the prompt. Persona/Context is a crucial component of a prompt. It provides the AI with a reference, which can significantly influence the nature and quality of the AI’s responses. Let’s break it down:</p><ul><li>Persona: This refers to the role that the AI is expected to play in the interaction. For example, the AI could be asked to act as a historian, a scientist, a teacher, a doctor and so on. By defining the persona, you’re essentially instructing the AI to generate responses that are consistent with how that persona would typically communicate and the kind of knowledge they would have.</li><li>Context: This refers to the specific situation, environment, or background information that the AI should consider when generating responses. The context could be a specific event, a particular time period, a certain location, or any other relevant circumstances.</li></ul><p>A picture is worth a thousand words, so here are some different prompts to demonstrate the power of the context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*J8v0SKKwcab1lc4c" /><figcaption>when the persona is a storyteller</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*9tDpOVGYZONTyOzY" /><figcaption>when the persona is an AI expert</figcaption></figure><p>For simple questions or tasks, where the desired response is straightforward and doesn’t require a specific tone or perspective, omitting the persona/context can lead to quicker and more direct answers. For example, if you ask, “What’s the capital of France?”, you don’t really need a persona or context. But if you’re looking for a more nuanced or tailored response, providing a persona or context can be very beneficial.</p><p>If the Persona/Context is not explicitly defined in a prompt, the AI will use a default persona and a generalist context. This is the standard behaviour of models like GPT-4. In this default mode, the AI doesn’t adopt a specific role or persona. The AI will attempt to understand the context from the prompt itself and any other information provided in the conversation.</p><ul><li>Without a defined persona, the AI’s responses may lack the specificity or expert tone that might be desired in certain situations.</li><li>Without a defined context, the AI might not match the tone you’re expecting.</li><li>In some cases, the lack of persona or context might lead to misunderstandings or confusion. If the task is complex and relies on understanding a specific situation or role, the AI might not generate the desired response without that guidance.</li></ul><h4>3. Examples</h4><p>This part of a prompt is an optional but often highly valuable component. Providing examples can help guide the AI’s response. Examples act as a bridge between the human’s intent and the AI’s understanding, providing a clear path for the AI to follow.</p><p>Why do we use examples?</p><ul><li>Examples can clarify ambiguous or complex tasks by showing the AI exactly what you want.</li><li>If you need the AI to follow a specific format, providing an example can be the most straightforward way to communicate that requirement.</li><li>The examples, you’re essentially giving the AI a mini-training session on the specific task you want it to perform. This can help the AI adapt to your specific needs.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*U_ECnwEL_h_zyZRe" /><figcaption>one-shot prompt</figcaption></figure><p>While examples can be highly effective, there are some limitations and considerations to keep in mind. If you provide too many examples that are too specific, the AI might overfit to those examples and struggle to generalize to new inputs. So, too many examples might confuse the AI, while too few might not provide enough guidance.</p><h4>4. expected behaviour/constraints</h4><p>This part of the prompt outlines the specific rules, limitations, or guidelines that the AI should follow when generating a response. It helps to shape the AI’s behaviour to align with particular requirements or expectations.</p><p>The use of Expected Behaviour/Constraints in a prompt serves several vital purposes. Firstly, it provides a level of control over the AI’s output. By clearly defining the expected behaviour or constraints, you can tailor the AI’s responses to align with specific needs or preferences. Secondly, the definition of constraints can act as a form of Quality Assurance. By setting specific standards or criteria that the AI must follow, you can ensure that its responses meet certain quality benchmarks. Finally, safety is an essential consideration, especially in contexts where there might be risks associated with the AI’s output. By constraining the AI’s behaviour, you can prevent it from generating content that might be harmful, inappropriate, or misleading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*zGBUiqowZL-7Ubuf" /><figcaption>using constraints gives us control</figcaption></figure><h4>5. definition of the good response</h4><p>The definition of a good response is essentially a set of criteria or guidelines that describe what an ideal answer to the prompt would look like. It’s not merely about correctness; it encompasses various dimensions such as relevance, completeness, coherence, and adherence to specific instructions or constraints.</p><p>Defining what constitutes a good response is like setting a target for the AI to aim for. Without this definition, the AI might generate responses that are technically correct but miss the mark in terms of what’s actually desired or needed.</p><p>For example, if you ask the AI to summarize a complex scientific paper, a good response might not only be concise and accurate but also accessible to a non-expert audience. Without specifying that this accessibility is part of what makes a response “good”, the AI might generate a summary that’s correct but still too technical for the intended readers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*UA3G_IHJut13p4Rh" /><figcaption>the definition of “good” is a set of criteria or guidelines</figcaption></figure><h4>6. expected steps towards the goal</h4><p>Defining the expected steps can be particularly important in situations where — without clear guidance — the AI might generate an incorrect or suboptimal response, or we really want to see all steps for any reason. This component serves as a roadmap, outlining the process or sequence of steps that the AI should follow to reach the desired outcome.</p><p>In some tasks, the path to the correct answer is as important as the answer itself. Without clear guidance on the expected steps towards the goal, the AI might take shortcuts, make incorrect assumptions, or overlook important nuances, leading to a wrong or inadequate response.</p><p>For example, if you ask the AI to solve a complex mathematical problem (Please never do that! 🤣), merely providing the final answer might not be sufficient. You might also want the AI to show the step-by-step process it followed to reach that answer. Without specifying these expected steps, the AI might skip directly to the final result, missing the opportunity to demonstrate understanding or provide insight into the underlying logic. In other cases, the final result can be wrong, and checking the steps one by one can help to get the correct response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*h0MdI7XZI7VRhgji" /><figcaption>sometimes you would like to check the logic</figcaption></figure><h4>7. Conclusion</h4><p>Prompt engineering is both an art and a science, a delicate balance of defining the task, setting the context, providing examples, outlining expected behaviour, clarifying what constitutes a good response, and delineating the expected steps towards the goal. Each of these components plays a unique role in guiding the AI to generate responses that are not only accurate but also relevant, engaging, and aligned with specific needs and expectations.</p><p>The first step on the long journey to becoming a prompt engineer is to understand the structure of a prompt. I hope this short article clarified a few things and helped you take this step.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49e606cfb5cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>