Designing Effective AI Prompts

Foundations / AI and Joule Design / Guidelines / Designing Effective AI Prompts

Intro

In the context of generative AI experiences, a prompt refers to the instruction given by a user to guide the output of a generative AI model.

A prompt can be:

Designing effective AI prompts is about helping users create quality input so they can get the best results.

In This Guideline

The sections below:

Design Principles

The following emerging design principles for generative AI are fundamental for shaping the user experience for instructing AI through prompts:

Empower and Inspire

Enhance human capabilities and improve outcomes with AI, without aiming to replace human intelligence. Facilitate empowering and inspiring interactions with AI that will improve human lives.

Allow users to ask the generative AI for prompting tips, or to write them a better prompt for their desired outcome.

Maintain Quality

Ensure high-quality input by providing AI support for user inputs, based on the user’s most likely needs in the moment. Help users understand, analyze, and validate the output generated by AI.

Allow users to provide feedback to the system for future improvements.

Types of Prompt Pattern

We distinguish between the following prompt types:

The sections below explain the use cases, pros and cons, and guidelines for each prompt type in more detail.

Quick Prompts

Quick prompts are predefined questions or actions provided by the system for the user to trigger with a single click. They are artfully crafted by prompt engineers, who specialize in giving successful direction to a generative AI feature.

Depending on the context and the nature of the task, one or several prompt options might be available.

Quick prompt button Image is shown for illustration purposes only

Quick prompts in a menu Image is shown for illustration purposes only

Quick prompts in Joule Image is shown for illustration purposes only

When to Use Quick Prompts

:icon-sys-enter-2Use:

  • When users are known to be using the generative AI feature for common requests
  • When users can only prompt the model about a limited set of use cases or queries
  • When there are a specific and limited number of actions that the system can assist with
  • When users are not subject matter experts
  • When it is important to minimize prompt-infused bias as much as possible
  • When you need to ensure and maintain a constant and predictable type of outcome

:icon-sys-cancel-2Don’t Use:

  • When users are subject matter experts and prefer flexibility
  • When we can’t predict a user’s intent

Guidelines for Quick Prompts

Avoid Bias

When using quick prompts, your team must purposefully craft the instructions for the AI system to avoid inadvertently producing biased results. Inadequate prompt design can perpetuate harm, just like biased training data.

As a designer, you can advocate for bringing together a diverse group of users and technical experts to invest in mindful prompt design, thoroughly evaluate user needs and results, and iterate to ensure that AI-generated content is free of bias.

Foster Optimal Outcomes

Your team must engineer high-quality prompts for the foundation models or large language models (LLMs), ensuring users achieve the desired result when using your AI feature with quick prompts.

Follow the best practices and, when needed, use advanced LLM techniques, such as embeddings and fine-tuning to get the best outcomes.

information
We will enhance this article with links to internal tools and relevant guidelines. In the meantime, check out Getting the best out of ChatGPT: Prompt engineering basics.

Guided Prompts

Guided prompts offer control and precision in generating outputs that align with user preferences, without requiring users to articulate their intent in natural language.

Users can write their prompts and adjust output settings such as style, length, and format. The intuitive interface, offering various controls, allows users to modify certain parameters, such as image size and resolution, data sources, language model, and even the persona the AI should embody when crafting responses.

Guided prompt in a popover Image is shown for illustration purposes only

Guided prompt in Joule Image is shown for illustration purposes only

When to Use Guided Prompts

:icon-sys-enter-2Use:

  • When there are a specific and limited number of queries the system can answer
  • When users are moderate subject matter experts
  • When users have no experience in writing prompts, or only intermediate experience
  • When users need to customize and personalize inputs for a more tailored experience
  • When users require more specific outputs, such as generating content with a particular tone, style, or topic focus
  • In scenarios like content customization, chatbot interactions, or generating recommendations

:icon-sys-cancel-2Don’t Use:

  • When the use case requires that generative AI performs only one or a few specific actions. Use quick prompts instead.
  • When there are limitless queries the system can answer. Use custom prompts instead.

Guidelines for Guided Prompts

Master Prompt Engineering

Like with quick prompts, you and your team must understand prompt engineering to guide users in crafting effective instructions for the AI system. Getting the best out of ChatGPT: Prompt engineering basics features a comprehensive list of learning resources.

Choosing the right prompt parameters depends on the situation and what users need. Consider these different parts of a prompt as a starting point:

Work with your team to determine which parts of a prompt are relevant for your user scenario and the quality of the AI response. Try different prompt structures and carefully evaluate the results.

Remember, the order of instructions in a prompt matters. Experiment with different guided prompt designs to see what works. If your product serves users with expert experience in writing prompts, you might let them change the order.

Less Is More

It’s not always necessary to reveal all the prompt parameters mentioned above to the user. You can conceal certain portions of the prompt, such as a base prompt with a designated role or persona that the AI should embody, or context information that applies universally to your product’s users. This approach helps streamline and enhance the user experience.

Hidden prompts and instructions provided by users work behind the scenes to guide the AI’s responses. These concealed elements are pivotal in shaping the AI’s output and contribute to creating an intuitive and user-friendly experience.

information
We will enhance this article with suggested labels and settings for common use cases contributed by our AI Design Patterns Community.
Familiar Building Blocks

When crafting the guided prompt user experience, utilizing familiar UI components for user input is key. Typically, these are buttons, input fields, selects, checkboxes, sliders, and so on.

These elements offer an intuitive way for users to design their prompts, ensuring a seamless experience that’s accessible by design. For a full list, check out the available input components for SAPUI5 or SAP Web Components.

Be precise when labeling different inputs and choose words carefully to minimize the chance of misinterpretation. Unless your use case requires different wording for greater clarity or newly emerging generative AI capabilities, try to adopt established labels.

Custom Prompts

Custom prompts are instructions that the user writes from scratch in natural language for the AI to follow when generating outputs.

Custom prompts allow users to explore a wide range of possibilities, engage with the AI as a collaborator, and generate diverse outputs far faster than humanly possible. They encourage creative freedom and can be valuable for writing, brainstorming, or generating ideas.

Custom prompt in Joule Image is shown for illustration purposes only

When to Use Custom Prompts

:icon-sys-enter-2Use:

  • When users want to explore and experiment with the generative AI feature to improve their work, generate new ideas, conduct desk research, or get insights from a specific subject matter expert, role, or persona
  • When there are limitless queries the system can answer
  • When users are subject matter experts
  • When users have intermediate to expert experience in writing prompts
  • When the desired output is flexible, and users can explore different concepts, styles, or ideas

:icon-sys-cancel-2Don’t Use:

  • When users have no experience in writing prompts, or very little experience
  • When users repeatedly ask a generative AI feature to answer a limited number of questions or perform a limited number of tasks
  • When a generative AI model frequently delivers hallucinations or low-quality results for subject matter that is important to your users
  • In high-stakes scenarios where guardrails and constraints are needed to ensure accuracy, safety, and privacy

Benefits and Challenges of Custom Prompts

Enabling users to write or speak prompts offers several benefits:

While custom prompts give users more control and flexibility and contribute to an engaging user experience, they come with several challenges:

To get the most out of custom prompts and mitigate the risks, follow the guidelines below.

Guidelines for Custom Prompts

Invite AI to Collaborate

You can leverage large language models (LLMs) to enhance the quality of user prompts significantly. Users can receive suggestions on how to improve their prompts or be provided with alternative wording by tapping into the AI’s language capabilities. AI suggestions help craft clearer instructions, detect input that might lead to biased results, improve AI responses, and make prompt creation easier.

Assist Users in Avoiding Errors

You can employ multiple strategies to assist users in writing error-free prompts:

Best Practices

Choose the right prompt interaction type for the use case

Balance flexibility and guidance

Narrow down the range of options

Continuously assist

Incorporate user feedback

Summary

Designing an effective user experience for prompting AI requires thoughtful consideration of the user’s context and needs, balancing flexibility and guidance, and incorporating user feedback to continuously improve outcomes.

By strategically employing custom, guided and quick prompts and following best practices, you can create intuitive and empowering experiences that harness the full potential of generative AI while mitigating the risks. An effectively designed prompt experience enhances user satisfaction and ensures that generated outputs are relevant, accurate, and valuable – ultimately elevating the overall user experience with generative AI systems.

Helpful Terms

Prompt engineering

The process of designing and refining instructions to guide the behavior and output of generative AI models.

Base prompt

A core set of instructions given to the large language model (LLM) that serves as a foundation for generating responses or completing tasks.

Hidden prompt

A hidden prompt is like a secret instruction guiding a language model—like the puppeteer behind the scenes!

Embeddings

Embeddings enhance prompts by searching a knowledge base for context, providing a semantic representation of relevant documents, and improving the LLM’s ability to find semantically similar information.

Fine-tuning

Fine-tuning LLMs is the resource-intensive process of customizing a pre-trained language model on specific tasks or datasets to make it more proficient and accurate in generating relevant text.

information
For more generative AI design terms, see our AI Design Glossary