Writing prompts is an art form because, well, it’s writing. You have to iterate on your prompts to get the highest quality artifact, so it takes edit after edit to get there just like any writing process. That’s OK because that’s how you learn. Iterating to make something better is part of the learning process.
The best way I learn from writing prompts is by working through my thought process about an overall structure and tweaking it until I get the result I need — and there’s always a lot of tweaking. Large language models are about defining language, so it’s best to find a format that works for you and use that.
Below are the approaches and structure I use to create effective prompts. You can change the order any way you want, but by including these key elements, you’ll get strong results. In many cases, you may not need to refine at all.
Approaches to Prompting
One of the benefits of the user experience field is that we have frameworks that can be leveraged in many different ways. Constructing prompts is no exception. The latest framework that applies directly to Generative AI and user experience is Jakob Nielsen’s Diamond Prompting. You may even notice its similarities to the double diamond design process model.
Diamond prompting conceptual example
I like Diamond Prompting so much that most of the book’s prompts scaffold you through learning prompt engineering this way. For example, you can get a list of suggested personas, and then add more detail to the persona you want to refine.
There are two distinct approaches to take when creating a prompt for AI: Exploratory and Detail-Refining. As each approach suggests, the exploratory approach helps with generating new ideas, brainstorming, and thinking beyond your own perspective. Whereas detail-refining is used when you have a clear idea of your next steps, but need some help in tidying up those thoughts.
In addition to selecting an exploratory or refining approach, the prompter has the choice to provide examples to the AI Assistant — sometimes referred to as “shots.” Think of this as providing inspiration or formatting guidance to ensure what is produced meets your expectations or criteria.
Exploratory Prompting
This approach leverages AI's ideation capabilities to broaden thinking about a current problem by exploring all possibilities, good and bad. Think of it as an activity where there is no bad idea like crazy eights. It begins as a very divergent activity, benefiting from the large amount of data that LLMs have to return a result that is especially useful during brainstorming sessions.
Examples
Requesting different user research plans with varying budgets and methods
Asking for a list of different tasks for a usability study
Detail-refining Prompts
This approach builds upon exploratory prompting for deeper exploration and refinement. You can ask the AI to elaborate on specific elements to converge on a concept. By focusing on chosen concepts, detail-refining prompting helps transform initial ideas into more fully developed and actionable plans.
Examples
Including features and tasks to problem statements
Refining the details of data included in a form
Single Shot Prompts
This approach is where a model is given one example of a task before being asked to perform it. This approach provides limited or no context through descriptions or maybe a single file added to the prompt. This might be used in combination with exploratory prompting to start a divergent exploration.
Examples
Asking for a user research plan without an example
Using examples to create more realistic data
Multiple Shot Prompts
Multiple shot prompts provide an AI model with several examples of input-output pairs before asking it to perform a task, or might combine previous prompts to refine an answer leveraging the prompt history. This context helps the model understand the desired format and process. By seeing multiple examples, the AI can better grasp patterns, leading to more accurate responses.
Examples
Adding multiple details about the users to enhance personas
Using structured examples to create more realistic data
Common Prompt Elements
The following elements work together to make an effective prompt. You may use some or all of the following elements when creating your prompts:
Identify the artifact you want to create
Set the domain within which you’re working
Include the user personas to consider
Narrow the focus to a specific product feature
Identify tasks a user may be completing
Specify the format of the artifact
List any constraints needed to focus your artifact
Note any specific tone you prefer
Let’s review what makes a strong prompt.
Artifact
Put simply, an artifact is the document you are seeking to create. User personas, wireframes, and user research plans are examples of artifacts. I find it valuable to use AI Assistants to return artifact types for user experience because they can align the output more closely with the user's needs by analyzing and identifying similarities across many examples.
Each artifact you seek to create will have a different format based on their unique intents and outcomes, but you can use AI Assistants to smooth over some of the seams to get there. I’ve done that quite a bit when experimenting, and based on my experience, it works.
Note that most artifacts listed below are articles in the series.
Artifact Examples
User Personas
User Journey Maps
Usability Testing Scripts
Competitive Analysis Reports
Domain
In the context of prompting, think of the domain as a particular topic, industry, or area of knowledge. Setting the domain is crucial because it establishes the initial context for the AI's responses. This focus ensures that the generated content is relevant and coherent, addressing the specific needs or interests of the user. By defining a topic, the prompt guides the AI to draw from a targeted subset of its vast knowledge base, enhancing the quality and accuracy of the information provided.
Setting the domain in the prompt also helps avoid receiving off-topic or generic responses, making the interaction more efficient and meaningful. For instance, specifying a domain like "UX design" ensures that the AI's suggestions are tailored to that field, providing insights and solutions pertinent to user experience professionals, rather than the hospitality industry, for instance. In essence, a well-defined topic focuses the AI's attention, leading to more precise and valuable outputs.
Domain Examples
B2B: Supply Chain Management, Customer Relationship Management, Enterprise Resource Planning, Human Resources Management Systems (HRMS), Business Intelligence and Analytics.
B2C: E-commerce Platforms, Social Media Networks, Online Banking Services, Streaming Entertainment Services, Mobile Health and Fitness Apps.
Product Features
By specifying a feature of your product or domain, you provide clear guidance and added context, helping the AI focus on the essential aspects of the domain in question. Adding features helps capture the nuances and specific requirements of a domain, reduces ambiguity, and improves the precision of the responses.
It also facilitates the generation of content that is contextually appropriate and practically applicable, thereby increasing its value and effectiveness.
Product Feature Examples
Customer Relationship Management: Tracking customer interactions, managing sales leads, automating follow-up emails, generating sales reports, analyzing customer data.
E-Commerce Platforms: Processing online payments, managing product inventory, offering personalized recommendations, handling customer reviews, running promotional campaigns.
User Personas
Adding user personas when writing a prompt is essential because it ensures the generated content is tailored to specific user needs and contexts. This provides a clear idea of the target audience, including their goals, preferences, and challenges.
What’s wonderful about this is that it can be supplied separately as a document to provide context for almost all the prompts you write during different activities.
User Persona Examples
Customer Relationship Management, Managing Accounts: Sales Representative, Customer Support Agent, Marketing Manager, Account Manager, Business Analyst.
E-Commerce Platforms: Online Shopper, Product Manager, Inventory Specialist, Customer Service Representative, Marketing Specialist.
Tasks
When writing your prompt, in addition to including user personas, it’s helpful to include the task a user is seeking to accomplish. Including tasks in a prompt is crucial because it provides actionable guidance that makes the AI-generated content more relevant and useful. This approach ensures the AI focuses on practical, real-world applications, leading to clearer, more precise responses tailored to user needs.
By outlining tasks, you improve the content's clarity, precision, and practical relevance, ultimately enhancing user satisfaction and achieving desired outcomes.
Task Examples
Customer Relationship Management, Managing Accounts: Track customer interactions, update contact details, log support tickets, schedule follow-up calls, analyze purchase history.
E-Commerce Platforms, Managing Inventory: Add product line, add to product inventory, view inventory reports.
Formatting
Whether it’s a list, table, plain text, or bullet points, different formats help organize and present information in a way that is easily digestible and actionable. Having AI Assistants return responses in different formats significantly adds value by converting them to the most suitable form for how you are communicating with stakeholders.
Additionally, you can combine formats for compound prompts. If you want one set of results to be in a table and another to be in a list, it’s easy to do if you separate the sections of the artifact.
And there is a lot of flexibility here. Here are formats I have used so you can see for yourself.
Formatting Examples
Plain text: Simple sentences or paragraphs providing explanations, summaries, or descriptions. This is great for blog posts and written summaries.
Bulleted or numbered lists: Ordered or unordered lists of items, steps, or points. This works well for processes or structured details like site maps.
Tables: Organized data presented in rows and columns, useful for comparisons and structured information. I love this format for creating fake data and other elements.
Dialogues: Simulated conversations or scripts between two or more parties. You can use this to simulate a research conversation, but in my experience, it varies quite a bit unless you add additional context.
URLs: Hyperlinks to external resources or references. I use this as part of a table or a bulleted list.
Flowcharts: Steps or processes described to create a visual flowchart.
Constraints
Including constraints within your prompt is somewhat like putting a leash on your AI Assistant. Constraints are valuable to ensure the AI Assistant provides a document that is easy to read for the audience and for giving relevant content responses that are concise and to the point. This is particularly important in contexts where users need quick answers or where brevity is essential.
Here are examples below, and it’s good to keep experimenting to get to a form that you can be consistent with.
Constraint Examples
Word length: 100 words or less
Display format: 3 paragraphs
Detail level: High detail, medium detail, low detail
Tone
Tone refers to the style or attitude conveyed in writing, and it plays a crucial role in how a message is received by the audience. When crafting prompts, specifying the tone helps ensure that the generated content aligns with the intended communication style, making it more appropriate and effective for the target audience.
By defining the tone, you guide the AI to adapt its responses to ensure that the communication resonates with the audience’s expectations and the appropriate context of the interaction.
Tone Examples
Formal tone: Corporate communication and legal documentation.
Casual tone: Social media posts and blog intros.
Technical tone: Software documentation and product specifications.
Persuasive tone: Marketing campaigns and calls to action.
Final Prompt Structure
Put together these elements, and you’ll have a prompt structure that provides clear, detailed guidance to ensure the content is relevant and on point. By specifying the artifact, domain, user personas, features, tasks, formatting, and tone, users receive responses perfectly tailored to their needs.
The prompt structure is also flexible across different use cases — what you want to return for one artifact is different from what you would want from a different one. You can easily add to or subtract from the prompt, especially once you grasp the function of each of the prompt elements.
Note that the applications are so flexible that you can write them in your own formats and experiment. Like writing, there are many ways to design your own adventure.
Final Prompt Structure Example
Create a [Artifact] for the [Domain] domain with [User Personas] as user personas. Target [Feature] as the use case and consider [Tasks]. Return the result in [Formatting] format. Write the result in [Constraint] with a [Tone] tone.User Research Plan Example
Create a user research plan for the customer relationship management domain with business development representatives and sales managers as user personas. Target account management as the use case and consider managing accounts as the tasks. Return the result in the recommended format. Write the result in 1000 words with a business casual tone.Usability Testing Plan Example
Create a usability testing plan for the customer relationship management domain with business development representatives and sales managers as user personas. Target account management as the use case and consider managing accounts as the tasks. Return the result in a list format. Write the result in 2000 words with a very casual tone.
