CRAFTING AI prompts framework IPE
The CRAFTING AI prompts framework is designed to empower users in effectively utilizing
various large language models (LLMs) like ChatGPT, Microsoft Copilot, and Gemini for diverse writing and engagement tasks while ensuring ethical and responsible use. It consists of three essential parts CRAFT, ING,
and AI.
Let's explore each component in detail:
CRAFT: The crafting phase focuses on providing specific details and context to enhance response quality. By framing prompts using natural language, the LLM better understands intentions, context, and nuances, resulting in a more conversational and human-like interaction. Additionally, specify writing style, acting roles, format requirements, and task objectives to guide the LLM accurately.
ING: The validation phase promotes interactive dialogue and integrates legal, security, and privacy considerations. Through fostering back-and-forth exchanges, refining inquiries, and collaborating with the LLM, you ensure that the generated responses align with ethical and responsible practices. By being mindful of non-disclosure agreements, data security, and privacy guidelines, your prompts maintain compliance, protect sensitive information, and establish clear goals. This approach enables you to derive meaningful insights while upholding confidentiality and achieving desired outcomes.
AI: The enhancement phase emphasizes staying proactive and embracing new possibilities. Adapt your approach by validating responses, making necessary adjustments, and refining prompts based on initial results. By continuously improving your prompts, you maximize the potential of AI tools and generate the best possible outcomes.
By adhering to the CRAFTING AI prompts framework, you can effectively utilize the capabilities of LLMs like ChatGPT, Microsoft Copilot, and Gemini to improve your writing and enhance your overall engagement.
Let's delve into each aspect of the framework to gain a deeper understanding.
Crafting phase
In the Crafting Phase, we will focus on writing the prompt (the message we send to the language model). To create an effective prompt, we need to consider a few key factors. First, define your goal: what do you want to achieve? It’s important to remember not to include any confidential or personal data. Also, it helps to build reference points in your prompt so you can navigate back and forth during your conversation.
Before you start, take time to plan your prompt carefully and clarify your objective. Ask yourself: What is the real goal here? For example, if a student is writing an essay for a course, is the true goal to write the essay, or simply to get a high grade (or worse, to mislead a teacher, especially if the use of AI is prohibited)? The way you define your goal will have a significant impact on the outcome.
We will validate this in the Validation Phase, but doing it correctly upfront will save time and effort later on.
When crafting your prompts, keep in mind that the tool or model you're using might be influenced by the country or region it's from. Some countries have strict guidelines to reduce bias, and may be more positive about certain topics than others. To get an overview of the tools and their data storage, check the tool page! This might influence how you want to structure your prompt.
Another factor to keep in mind is the language you choose for your prompt. While English is the most common choice—making prompts easy to share, standardize, and maintain—the language you prompt in subtly shapes how the model behaves and responds. Research from Anthropic shows that AI models often display distinct characteristics depending on the language used. For example, Claude leans more toward caution and depth in English, rigor in Russian, warmth in Hindi, and candor in Dutch. Depending on your objective, choosing your language deliberately can help align the model’s tone, perspective, and output with what you actually need.
C - Context
For LLMs to fully grasp the context, it is essential to provide specific details using natural language. The more precise and detailed your information, the better the response will be. It is crucial to have a clear understanding of the scope and effectively communicate it to the LLM. Framing prompts in natural language is vital for achieving a more conversational and human-like response. By using natural language, the LLM can better understand your intentions, context, and nuances. This facilitates a smoother and more intuitive interaction, creating a prompt that feels like a genuine conversation.
In addition to general context, it is important to provide clear descriptions of examples, keywords, deadlines, citations, quotes, arguments, or counterarguments that should be considered. If for example, specific laws need to be taken into account in the generated output, be sure to mention them in your prompt. This ensures that the LLM incorporates relevant information and contributes to high-quality responses. Providing such contextual details enhances the overall user experience and ensures that the LLM generates outputs aligned with your expectations.
If you are using a tool or environment where references to specific sources can be added, think about documents, books, articles, or web pages that should be specified, and clearly state why they are relevant to the context. For example, you can mention relevant scientific articles, books, or web pages that you believe should be taken into account when generating content. Or, if you are a programmer, you can mention specific classes, functions, or methods that you want the tool to be aware of when generating code. By providing such details, you ensure that the tool can generate responses informed by relevant sources and consider multiple perspectives.
-
A straightforward method for crafting your prompt is to begin with the task at hand and then include the context at the end. Additionally, studies suggest that enclosing the context within triple quotes """ or hash marks ### leads to more effective results.
Prompt with context on the enduser >Summarize the text below {acting role, format, register}
Text: """{Your context}"""An alternative method involves the utilization of XML. When referencing articles that are sourced from external platforms, a practical approach is to embed these articles within <article></article> tags. This technique not only structures the content effectively but also ensures a clear distinction between original and referenced material.
Prompt with componentsuser ><article>{The article}</article>
<article>{The article}</article> -
Multimodal AI models, which can process both text and images, offer a powerful way to enhance context through visual information. Instead of relying solely on textual descriptions, you can upload images to provide additional context for your prompts. This approach is particularly effective when:
- Describing complex visual elements or designs
- Analyzing specific details in documents or diagrams
- Providing real-world examples or references
- Explaining technical concepts with visual aids
For example, when planning dinner, you could take a picture of your refrigerator's contents and ask the LLM to suggest recipes based on the available ingredients. This practical approach helps generate personalized meal ideas while avoiding food waste. Similarly, you could photograph your pantry or specific ingredients to get tailored cooking instructions or alternative recipe suggestions.
To make the most of image-based context:
- Ensure your images are clear and focused on the relevant details
- Specify which aspects of the image the LLM should pay attention to
- Combine image context with clear textual instructions
This multimodal approach often leads to more precise and contextually aware responses, as the LLM can reference both visual and textual information in its analysis.
-
Incorporating examples into your context can significantly influence the outcome of your efforts. It's important to give thoughtful consideration to this approach. Techniques like zero-shot, single-shot, or few-shot prompting are essential for tailoring outputs to fit specific contexts. For instance, if your goal is to generate creative global ideas, zero-shot prompting can be particularly effective. Conversely, for obtaining detailed answers that build upon previously created content, few-shot prompting is the way to go. Learn more about these strategies in our blog post titled "Predictions and Prompting Techniques."
-
The term "context window" refers to the "current memory" of a language model like GPT, indicating how much of our ongoing conversation it can remember. It represents the volume of text that the model can use when formulating responses. Essentially, it's the working memory of the model, crucial for keeping the dialogue or text generation coherent and relevant to the context. In other words, the context window measures the amount of information a language model can access and consider for its response. A token, which is the smallest unit of text the model processes, could be a word or punctuation mark. Therefore, it's important to always check the context window of the model you're using to ensure you don't exceed it in any steps of your framework. This context window encompasses both your input and the model's generated output.
Context windows (token limit):
GPT 4o: 128.000 tokensGPT 4o mini: 128.000 tokensGPT 4: 8.192 tokensGPT 3.5: 4.096 tokens
Resources:
R - Register (Writing Style)
When formulating prompts, it is important to specify the desired writing style or register, taking into account factors such as formality, tone, vocabulary, and grammar. This is especially crucial when there are specific proficiency requirements or when attempting to mimic a particular writing style. For example, you can include phrases like "as a student with an English level [B1]" to inform the LLM about your language proficiency. It is also possible to provide writing samples or request considerations for language proficiency. Clearly indicate whether a formal or informal tone is preferred. Additionally, describe whether the use of specific terminologies or analogies is permitted or not, and specify the language in which the response should be provided. By providing such details, the LLM will generate responses accordingly.
Regarding readability, you have the option to request outputs in a conversational tone. Simply specify: "Write the output as if you're talking to a friend." This approach helps in achieving a more relatable and engaging delivery of information.
However, keep in mind that the register can be influenced by cultural differences present in the training data, which can impact the way communication is perceived. For example, the way you talk to a friend might differ significantly from someone in another country, where conversations could be much more animated due to cultural differences. Understanding the origin of the training data can provide insights into how detailed you should be when describing your preferred register. As always, the more details you provide, the better the generated responses will align with your expectations.
-
Beyond sharing your original content and instructing the LLM to replicate your writing style, a beneficial tactic is to submit your work to the LLM and seek its evaluation of your unique style. Following this, you have the option to either share this analysis as your standard writing register or, if it becomes your default style, incorporate it into your Custom Instructions.
-
If you're unsure about which register best suits your task, consider seeking suggestions from the model. You can request general advice, as illustrated in the next example, or specify particular requirements if you have something specific in mind.
Example Promptuser >Give me 20 registers I could use to write a LinkedIn post -
Creating comprehensive writing style guides allows you to maintain consistent communication across all outputs. These guides can define your or your organization's voice, tone, terminology, and formatting preferences. By incorporating these style guides into your prompts, you ensure that the LLM generates content that aligns perfectly with your brand's identity.
A style guide can include:
- Voice and tone characteristics
- Preferred terminology and phrases
- Grammar and punctuation preferences
- Formatting conventions
- Brand-specific guidelines
- and much more...
By storing your style guide as a "Register Component" (see Architecture section), you can easily share it across your organization, ensuring everyone maintains a consistent writing style in their prompts. This centralized approach makes it simple to update and distribute style guidelines while maintaining uniformity in all AI-generated content.
A - Acting Role
Decide on the persona or role you want the LLM to take on, tailored to your specific goal. For example, if you're crafting a LinkedIn post, ask the LLM to act as a LinkedIn content specialist who excels at writing compelling hooks on your topic. This kind of framing helps steer the LLM's responses in the right direction by focusing on the task, not on general popularity or experience levels.
Be mindful that descriptors like "years of expertise" or "large following" can influence the tone or style of the output — but they aren’t required. What matters most is clearly defining the kind of perspective or expertise needed to match your intent.
And again, it is important to consider the cultural influences present in the training data of the model. For example, if the model is predominantly trained on data from a specific country, such as the United States, the output may reflect cultural nuances from that region. ChatGPT, for instance, is primarily trained on American data, which can result in a tone that is highly enthusiastic and may not align with your personal style or objectives. To ensure the content is suitable for your intended audience, be explicit about the desired tone and cultural context. By acknowledging potential biases, you can provide clearer instructions to mitigate them and achieve more precise and effective results.
-
When you ask the LLM to "Write me a LinkedIn post about this new article to promote it, acting as a LinkedIn expert with 10 years of experience," it becomes unclear if the task is solely to write the post or to also post it on LinkedIn, adopting the persona of a LinkedIn expert. The previous instruction caused the LLM to adopt the identity of a LinkedIn expert who actively posts the content, as opposed to merely drafting it for your use. This might lead to responses like: "As a LinkedIn expert, I am thrilled to share my latest article...". To avoid such confusion, it's important to articulate your prompts with clarity and define your objectives explicitly (G - Goal-driven).
Hence, a more effective approach would be to direct the LLM to assume the role of a LinkedIn expert for the purpose of creating a LinkedIn post for you, which you can then publish yourself.
-
Using a persona (an imaginary character) in your prompts makes conversations with AI more engaging and creative. A persona is like a character with specific traits, experiences, and viewpoints. This helps you explore topics in new and interesting ways.
When you use personas, your conversations become more natural and meaningful. You can change personas based on what you need, which helps the AI give you better and more varied responses.
Teams can create and share personas to use them together. For example, when hiring new people, you can create a persona of your ideal employee. You can then use this persona to write better job descriptions and think of good interview questions. This makes the whole process easier and more effective.
Using Persona Promptsuser >Act as the <persona> below.
<persona>
YOUR PERSONA INPUT
</persona> -
Creating a useful persona is simple. Start by asking an AI tool to generate a basic persona based on a few key details you want. For example, you might ask for "a senior software developer with 10 years of experience in healthcare technology."
The real power comes from improving your personas over time. As you learn new information, add it to your persona. For instance, if you're working with a client, you can add their feedback, preferences, and needs to your persona of them. This helps the AI better understand and match their style in future conversations.
Think of personas as living documents that grow more helpful as you add more details. This approach is also your first step toward working with AI agents - more advanced AI tools that can handle complex tasks independently.
-
When working with interactive prompts, you have the option to create your own acting roles and refer to them throughout the conversation. For instance, in the Custom Instructions ChatGPT feature, you can define your own Acting Role and instruct ChatGPT accordingly. For example, if you're acting as yourself (let's say, using my name: Jeroen Egelmeers), you can predefine how ChatGPT should respond. This could include having an informal tone or making other adjustments to cater to your specific needs. By doing so, you can prompt more efficiently and effectively with the desired outcome.
By leveraging this capability, you can adapt ChatGPT to better suit your specific requirements, thereby optimizing your interactive prompts and making the most of this feature.
Additionally, with ChatGPT's "Custom Instructions" feature, you can predefine these roles. This means you set up the instructions just once, and they're always ready for use. No repeated configurations — they remain available indefinitely, streamlining your interactions with the platform.
You can further enhance the efficiency of using "custom acting roles" by writing functions/actions for quicker activation. For instance, you could include in your Custom Instructions that beginning your prompt with "!RWL" instructs ChatGPT to create a LinkedIn post using the context you provide following the action marker (e.g., "!RWL {your context}"). It's important to also specify in these instructions to note when this "action" is activated, ensuring clarity regardless of whether the action call precedes the prompt.
Custom Instructionssystem prompt >If I start my prompt with "!RWL", then create a LinkedIn post for me. Act as a [Acting role], use [register], and output in this [format] ... Mention on the top of the output that the !RWL custom instruction was triggered.user >!RWL [your context]Please be aware: Act carefully when using Custom Instructions in ChatGPT. They will be placed before your actual instruction and thus can take up much of your context window if not used effectively.
Note: Be cautious when using Custom Instructions without action markers (such as ! in front of them) to ensure they don't get triggered unintentionally throughout a prompt when using specific words instead of intentionally triggering the action.
F - Format
Clearly state any specific formatting requirements you have for the output. For instance, you can specify if you'd like the content to be organized in a table format, include hashtags, bullet points, graphs, templates, or emoticons. Providing specific formatting instructions will help ensure that the generated output meets your desired structure and readability preferences.
When you require specific outputs, such as files or code, providing clear instructions is crucial. For example, if you desire an interactive map of your country that highlights all your office locations in HTML, specify that you need it in interactive HTML format. Additionally, request a download link for convenient access. Also, clearly mention any specific colors or formatting requirements you want the model to incorporate.
Large Language Models (LLMs) are language-based systems designed to excel at understanding and generating human-like text, but they are not inherently optimized for precise numerical calculations and might fail due to their prediction-based nature. Therefore, it’s better to ask the model to generate (and execute) code in a programming language like Python, where it excels. By leveraging its strength in text-to-code generation, the LLM can create accurate scripts for calculations and return correct results. This approach combines the model’s linguistic capabilities with the computational precision of programming, ensuring both reliability and effectiveness in solving numerical tasks. Make sure to clearly specify the programming language you want the model to use in such cases.
It is also important to think about how you will reference parts of the generated output later on. For example, if you're using a table, start each row with a unique ID so you can easily refer back to those IDs in subsequent prompts. This will help ensure continuity and make the conversation smoother and more efficient.
Finally, utilizing parameters can be highly valuable as they enable customization of the generated output in the LLM. These adjustable settings allow you to fine-tune various aspects of the model's behavior. For example, you can leverage the "temp=" parameter to control the temperature and adjust the level of creativity in the output. Parameters provide the flexibility to tailor the characteristics of the generated responses to your specific needs. If you would like to explore the complete list of parameters available in the LLM, simply ask, "Which parameters does the LLM have?" It's important to note that while you can adjust these parameters when using OpenAI's API, there may be specific constraints or limitations depending on the platform or implementation you are using.
-
By explicitly identifying your target audience, you enable the LLM to optimize its responses more effectively. This approach ensures that the content, tone, and format of the output are specifically aligned with the audience's preferences and expectations, significantly enhancing the relevance and effectiveness of the communication.
-
By understanding the parameters, you can tailor your prompt to ensure the model generates responses that align with your specific needs. This can lead to more relevant and accurate results.
- Temperature: Controls the randomness of the generated text. Higher values (e.g., 0.8) make the output more creative and diverse, while lower values (e.g., 0.2) make it more focused and structured.
- Response format: Determines the format of the generated response. Common formats include text and JSON.
- Max tokens: Sets the maximum number of tokens (words) in the generated response. This can help control the length and complexity of the output.
- Top p: Controls the diversity of the generated tokens. Higher values (e.g., 0.9) make the output more diverse, while lower values (e.g., 0.2) make it more focused.
- Frequency penalty: Penalizes tokens that appear more frequently in the input text. This can help the model generate more creative and unique responses.
- Presence penalty: Penalizes tokens that appear in the input text. This can help the model generate more diverse and unique responses.
In the OpenAI playground you can find all parameters: https://platform.openai.com/playground.
-
Example-driven prompting lets you provide one or more examples (single-shot or few-shot prompting) to guide the model in generating responses. By giving sample responses, you can influence the model to mimic the style, structure, or tone you set. The more examples you provide (few-shot prompting), the more refined and aligned the output will be with your desired format.
Be aware that when using example-driven prompting, any specific phrases or structures in your example text may be reused in the output. This can be beneficial for maintaining consistency, but it may also introduce unintended focus. For instance, if "music" is frequently mentioned in your examples, the generated output may reflect that focus. When you use few-shot prompting, you’ll generally see more variety and creativity in the responses.
Note that if your examples do not follow the same exact structure, the model will have more freedom with the output layout, leading to creative formatting variations. If you need the model to strictly follow a particular format while also mirroring your style and tone, combining template-driven prompting with example-driven prompting can be an effective alternative.
-
If you have a particular format in mind, using template-driven prompting is highly effective. Simply provide the exact format you want to the model. This allows it to utilize the given structure and fill in the necessary details.
Template-driven promptinguser >....
Use this format for my LinkedIn post:
{strong hook}
{short description}
{key takeaways with emoticons as bullet points}
{call to action}
{hashtags}
...This way, the LLM will replace the sections between { } with the generated output.
-
You can organize your text using headers, bold and italics for emphasis, and lists for clarity. Use inline code and code blocks to display programming code, and blockquotes to highlight important information. Create horizontal rules for thematic breaks, add links for easy navigation, and structure data with tables. These formatting options make your interactions with ChatGPT more structured and readable.
Formatting TypeH1 Header# H1 HeaderH2 Header## H2 HeaderH3 Header### H3 HeaderBold**Bold**Italics*Italics*Bold and Italics***Bold and Italics***Unordered List- Item 1
- Item 2
- Subitem 1
- Subitem 2Ordered List1. First item
2. Second item
1. Subitem 1
2. Subitem 2Inline Code\`code\`Code Block\`\`\`python
def hello_world():
print("Hello, world!")
\`\`\`Blockquote> This is a blockquote.Horizontal Rule---Link[OpenAI](https://www.openai.com)Table| Header 1 | Header 2 |
|----------|----------|
| Row 1 | Data 1 |
| Row 2 | Data 2 |
You can always ask the model to give a complete list by just asking what formatting ChatGPT supports.
T - Task
Clearly state the task or purpose of the prompt. Use words such as "craft," "make," "compose," "create," "summarize," "translate," "generate," "revise," "review," or "(re)-write." For example, ask the LLM to compose a LinkedIn post on a specific topic or revise this article. Ask the LLM to summarize your PDF file and you can also provide a clear call to action. If you're facing a complex task with multiple components, consider dividing it into simpler, individual tasks. The best practice is to limit your prompt to one task at a time. This approach allows you to maintain focus and achieve high-quality results by addressing one aspect at a time. You can use the interactive (I) approach for your follow-up tasks.
In routing models, you can specify the level of reasoning the model should use to achieve better outcomes. Clearly define how far it should reason and where it should stop. Setting these boundaries will help you get more consistent results.
Also, please note that if Generative AI tools use tools (in the background), you can also trigger them via your prompt. Specify what the AI should do; for example: "First search the web" (or be even more specific regarding a tool-calling method if it is documented).
Best practice for the <task> component is to organize the different aspects within the component by structuring them in inner XML tags. For example if you want to set constraints you can setup the constaints within the task component like:
<task>
<constraints></constraints>
</task>
Constraints should always support a task. A task tells the model what to accomplish, while constraints guide how the task should be performed. Without a task, constraints have no purpose; without constraints, the task may be executed in an unintended way. Therefore, define constraints together with the task they apply to.
When coding, for example, best practice is to create a step-by-step process of what the model should perform using markdown ([ ]) so a model can "sign it off". <task></task>
[ ] First task item
[ ] Second task item
Structure this within the task component to ensure the model can follow each step. An expert strategy here is to add a validation step at the end of the task component. This validation should guide the model to verify that the task was performed correctly.
When using loops, make sure to always add an end statement. When should it stop?
Furthermore, if not already addressed in preceding instructions, take a moment to reflect on or specify your intended audience. Understanding who you are targeting is crucial for tailoring the content to meet their expectations and interests effectively. Additionally, if your prompt includes extensive context or additional information, make sure to clearly delineate the task. Specify it by starting with: "Your task is..." This clarity ensures that the main objective stands out, guiding the focus directly to what needs to be accomplished. Remember to align the task with your goal as specified in the goal-driven section. Clearly articulate how the task supports your intended outcome. This helps in targeting the model towards achieving the desired result.
If there are any restrictions relevant to the task, specify them clearly. For instance, if there are topics, styles, or perspectives that should be avoided or emphasized, make sure to exclude things that might not be of interest. However, keep these restrictions limited, and primarily focus on guiding the LLM on what it should do.
If you want the LLM to strictly adhere to your instructions without deviation, conclude your prompt with "Strictly follow these instructions." Conversely, if you wish to disregard any previous instructions, include the word "stop" followed by the action you want to halt. If you want to start with a clean slate and reset any previous instructions, simply prompt: "Reset previous instructions and start fresh." (or start a new chat). This will enable you to provide a new task or request without any carryover from prior instructions. To minimize the chance of fabricated responses, it's also important to prompt clearly. Include in your task "If you don't know the answer, respond with: 'I don't know the answer.'". And finally, if you want to break it up, use "Take a deep breath and work on it step by step."
-
Do you find yourself uncertain about the context or lacking sufficient details? Studies indicate that prompting models to inquire for additional information is effective. In such instances, the LLM will pose questions to you for clarification. Once you respond, it will then proceed to generate the output based on your input.
-
Many people struggle with choosing the right word for their tasks. Words like "review," "rewrite," and "revise" may seem similar, just as "craft," "make," and "generate" do. However, each word prompts the Large Language Model (LLM) to return a different type of output. To achieve your desired results, it's crucial to select the appropriate word for the task at hand. If you're unsure, ask for the definition of a word or consult the LLM on the best word to use to accomplish your goal. Being goal-driven (G) in your approach will lead to more effective and accurate outcomes.
-
Large language models are potentially capable of comprehending and reacting to emotional signals. Studies have shown that when emotional expressions are employed in interactions with AI chatbots, these models tend to generate better results. This approach is known as "Emotional Prompting," a method that enhances the effectiveness of the responses generated by your prompts.
-
Utilizing specific leading words or phrases in prompts can significantly improve the quality and precision of the LLM's responses. For example, instructing the model with phrases like 'Think step by step,' 'Elaborate in detail,' or 'Provide a comprehensive explanation,' guides the AI to adopt a more structured, thorough, and methodical approach in its responses. This technique is particularly useful in scenarios where in-depth analysis, clear breakdown of concepts, or step-wise instructions are required. By effectively directing the model's focus and manner of response, you can tailor the output to meet specific needs, whether it's for educational purposes, problem-solving, or detailed explanations. Additionally, incorporating phrases that encourage creativity or lateral thinking, such as 'Imagine if' or 'Explore alternatives,' can lead to more innovative and diverse responses, showcasing the model's capability to generate unique ideas and perspectives.
Additionally, if you want to begin your output in a specific format, it's helpful to set the tone using the first few words of that desired syntax. For example, you can start with: "In the world of AI..." This approach ensures that the response aligns with the intended style and structure from the very beginning.
-
AI models, including the LLM, can exhibit biases, stemming from the nature of their training data. These biases may manifest in answers that inadvertently reinforce stereotypes or offer skewed perspectives. However, research indicates that actively instructing the model to generate unbiased responses and to avoid reliance on stereotypes can mitigate this issue. It's crucial to be aware of potential biases and to actively seek balanced, fair, and inclusive outputs from the model.
Minimizing biasuser >.... Ensure that your output is unbiased and does not rely on stereotypes ...Please be aware that the training data may still contain biases, especially those related to culture, and that this approach may not completely eliminate them. However, by actively instructing the model to generate unbiased responses, you can reduce the impact of well-known biases and stereotypes.
Validation phase
During the Crafting Phase, we focused on writing the prompt. Now, in the Validation Phase, we will first evaluate the prompt itself. We will check if the prompt is interactive—does it include reference points? We’ll also ensure that no confidential data is shared and confirm that the prompt is goal-driven, ensuring it aligns with the objective we set at the beginning.
Once the prompt is validated, we will move on to evaluate the output. After confirming that the prompt is goal-driven, we’ll validate whether the output meets our desired goal and provides the results we expect.
I - Interactive
Crafting prompts that promote interactive dialogue is essential for fostering dynamic and engaging conversations with the LLM. This encourages a back-and-forth exchange and collaborative problem-solving, enabling you to explore ideas, seek clarification, and refine your inquiries. The interactive nature of prompts enhances the overall experience, helping derive meaningful insights from the LLM's responses, which becomes particularly valuable when dealing with large amounts of data. Reflection, a key aspect of this interactive approach, involves designing prompts that explicitly reference and build upon previous input or context. By incorporating reflection, you empower the LLM to respond coherently and contextually, demonstrating awareness of the conversation flow, addressing specific points, and generating interactive and dynamic responses. Leveraging reflection in prompts facilitates a more engaging experience, fostering deeper interaction and improving the quality of generated prompts.
-
Another instance involves organizing the output in a tabular format, with each row assigned a unique
ID. This approach allows you to seek clarification for specific entries by referencing their
corresponding IDs. Consequently, you can generate ideas and evaluate their suitability for your
requirements. If a particular idea aligns with your needs, you can inquire further to obtain
additional information about it. This method enhances the efficiency of communication with the LLM
and enables a more structured and targeted exchange of information.Working with unique ID's in tablesuser >... Format it in a table, starting each row with a unique ID ... -
In the realm of content creation, crafting an effective strategy is paramount. Among the myriad of techniques available, interactive prompting emerges as a particularly useful method. This approach is built on a foundational structure: initially present the context, followed by the task, especially when dealing with a substantial amount of data (context). Should it be possible to encapsulate everything within a single prompt, it's recommended to position the context at the bottom. In summary, the strategy to adopt is: Craft - Context → Strategy: Place the context at the end of your prompt.
Imagine you're about to embark on a writing journey. The initial step involves setting the stage with necessary background information. This could range from topics you wish to explore, to insights from articles or other sources that you plan to incorporate into your new piece.
Here's how it unfolds:
Initial Prompt (priming)user >Over the next few prompts, I'll be providing pieces of information. Please retain this information as we proceed. Once I've shared all relevant details, I'll transition to asking questions based on the provided context. A simple 'OK' from you will signal your understanding and readiness to move forward.Subsequent Prompts (2-x):
These prompts will contain the context—vital pieces of information or perspectives that will serve as the foundation for our discussion.
Final Prompt:
Now, with the context fully laid out, we turn to the task at hand. This is where your insights, based on the previously shared information, come into play. Also make sure to include all other components of the framework here.
This method ensures that the foundation of your writing is solid, informed by a comprehensive understanding of the subject matter. It's a strategic approach designed to enhance the depth and relevance of your content.
N - Non-disclosure
When crafting prompts, it is crucial to incorporate legal, security, and privacy considerations. Protect sensitive information and ensure compliance with non-disclosure agreements (NDAs). Specify any constraints or guidelines related to data security and privacy to maintain ethical practices. It's important to execute this validation step before submitting your prompt. Once you send it to an AI tool, it may be saved and exposed to the internet, so exercise caution and discretion. Safeguarding confidentiality is paramount in this process.
-
When generating output using the LLM you can use placeholder-based prompting to ensure that sensitive data such as personal information, or other confidential information is not shared with the LLM. The idea is to remove the sensitive parts of the prompt and replace them with placeholders, such as {placeholder}. This way, the LLM will also take the placeholder along and generate the output with the placeholder included. You can then inject the actual data after the output is generated.
Placeholder-based promptinguser >Send an e-mail about Prompt Engineering Discussion to {personaA} from {companyA}. Use <register>, <format> and <context>
<register>Formal</register>
<format>
{header to personA}
{sub header at companyA}
{paragraph}
{cta}
{myInfo}
</format>
<context>I want to organize a teams meeting on 12 february at 13:00h</context>assistantSubject: Invitation to Teams Meeting on February 12 at 13:00h
Dear {personaA},
Prompt Engineering Discussion at {companyA}
I hope this email finds you well. I would like to invite you to a discussion on Prompt Engineering, where we can explore its impact and best practices. The session is scheduled for February 12 at 13:00h via Microsoft Teams.
Please let me know if this time works for you or if any adjustments are needed. I look forward to your insights on this important topic.
Best regards,
[Your Name]
[Your Position]
[Your Contact Information]As you can see, the placeholders {personA} and {companyA} are used in the output, and we can inject the actual data when we want to actually use this data. This is a powerful way to ensure that sensitive data is not shared with the LLM and that you have full control over the output.
-
This also includes adhering to GDPR guidelines when interacting with Generative AI tools such as ChatGPT, Microsoft Copilot or Gemini. Under GDPR (General Data Protection Regulation), it's imperative not to share any personal information about individuals without their explicit consent. This regulation protects the privacy and personal data of individuals, ensuring that their information is handled responsibly and securely.
-
When using Generative AI tools such as ChatGPT, Microsoft Copilot, or Gemini, it's essential to comply with the AI Act. This regulation categorizes AI systems based on risk levels and mandates specific obligations, including transparency, data privacy, and the avoidance of harm.
Key guidelines to follow under the AI Act:
- Transparency: Clearly disclose when content is AI-generated to maintain honesty and user trust.
- Data Privacy: Ensure compliance with data protection laws like GDPR when handling personal data.
- Avoidance of Harm: Refrain from generating misleading, deceptive, or harmful content.
- Non-Discrimination: Prevent bias or discriminatory outcomes in AI-generated outputs.
- Human Oversight: Monitor and review AI outputs, ensuring responsible usage and intervention when necessary.
These measures are critical for aligning with the AI Act and promoting responsible AI usage in prompt engineering.
G - Goal-driven
Clearly defining your goals and objectives in your prompts is essential for guiding the LLM to provide accurate and relevant answers. By specifying your desired outcomes and indicating the specific information or insights you are seeking, the LLM can better align its responses to meet your expectations. This goal-driven approach ensures that the LLM understands your intent and focuses its responses to address your specific needs effectively.
When designing prompts, it’s vital to evaluate not only the structure of your prompts but also the underlying biases or cultural nuances embedded within the AI model or tool you are using. Models may have built-in guardrails, regulatory influences, or cultural framings that shape their responses. For example, specific models might emphasize certain perspectives or provide outputs aligned with the norms or priorities of the regions or organizations that developed them.
To ensure goal alignment, consider how these factors might influence the outcome and validate prompts by testing them across various contexts. This could involve analyzing the results for fairness, inclusivity, or alignment with your expectations. Additionally, consult with subject matter experts or explore alternative models if necessary to cross-check and mitigate these influences. A thoughtful approach ensures more accurate, reliable, and representative results.
Before sending the prompt, it’s important to first validate whether the prompt itself is structured in a way that will help you reach your goal. This involves checking if the prompt is clear, complete, and aligned with the desired outcome. Only after this validation of the input should you proceed with sending the prompt.
If you validated the prompt, you can send your prompt.
Once the prompt is sent, the next step is to validate whether the outcome meets the expected results (output). Ensure that the response aligns with your goal and provides accurate, factual information—especially when dealing with legal documents or other contexts where precision is crucial. Additionally, evaluate the response for ethical considerations, such as fairness, inclusivity, and the avoidance of harmful stereotypes or biases. If necessary, you can adjust formatting parameters (F) or reframe the prompt to further refine the output and improve its relevance, accuracy, and ethical alignment.
-
To boost the accuracy of AI-generated answers, try the "Chain of Thought (CoT)" technique. Similar to solving a math problem by showing each step, CoT involves breaking down complex queries into logical steps. This method doesn't just seek direct answers from the AI but guides it to explain its reasoning process towards a solution. It not only yields more precise responses but also mirrors a human-like, systematic approach to problem-solving, making it easier to validate the AI's output.
Enhancement phase
As AI tools evolve rapidly, it's important to adapt and improve your strategy and prompts. The "AI" aspect of the framework reminds you to refine your output by asking follow-up questions and adapting your approach based on the initial results.
AI - Adapt and Improve
If the output we validated during the Validation Phase is not correct, the next step is to iterate back to the Crafting Phase. Use the components from that phase (that are relevant to review) to refine and enhance the prompt, ensuring the output better aligns with your goal. This iterative process is key to improving the results.
If the output is correct, it's time to adapt and improve your overall strategy. Start by identifying any reusable components from the prompt that can be applied to future prompts or shared within your organization. Saving and sharing these components not only speeds up productivity but also fosters a more sustainable approach by reducing redundant work and streamlining processes across teams.
Continuously improving your prompts and embracing new possibilities is essential for generating optimal outcomes. Stay proactive and adaptable to ensure ongoing success when working with these powerful tools.
-
Are you feeling stuck with the outcomes you're getting? If you're curious to dive deeper into how AI predictions unfold, exploring the OpenAI Playground can be incredibly insightful. One useful feature to check out is "Show probabilities." When you enable this setting and input a prompt, the playground vividly demonstrates the inner workings of the prediction process. You can hover over each word to see the array of possible words considered by the AI and the specific choice it made. This interactive exploration can significantly enhance your understanding of how AI thinks and decides.
Please be aware that to enable this feature, you need to navigate to the "complete" (legacy) section within the playground area. This option is located adjacent to the "Playground" title and default set to "Chat" on the link provided below.
It is not necessary to format your prompt following each step individually, but it is important to include all the elements of the framework within your prompt. A valid prompt that encompasses all parts of the framework could be:
If you prefer using a template or employing them as components (refer to the architecture section), this approach is also viable and will yield the same results:
When working with more than one register, acting role, format, or task component, it is highly beneficial to organize and format them using XML-style tags. This method provides clarity, structure, and scalability, making it especially effective for complex or multi-layered tasks. This is our preferred approach.
Please note: for certain use cases, it may be better to place the 'context' at the end of your prompt. Refer to the strategies section for more information. The order of the components does not matter.
By incorporating these components in your prompt, you provide the LLM with the necessary instructions and guidance to generate a response that aligns with your specific requirements.
By following these expert techniques, you can craft prompts that elicit remarkable responses from the LLM, taking your writing and engagement to new heights. If you're looking for specific examples for each element in this framework, you can copy and paste the text describing the framework to the LLM and ask for examples directly from the AI. This way, you can explore and experience the examples firsthand, enabling you to understand how to apply the framework effectively. So go ahead, interact with the LLM and discover the power of this framework in generating remarkable responses!
Please be aware that this is an iterative process, which means that after the enhancement phase, you will return to the crafting phase. You can adapt and improve the generated output by writing another prompt , utilizing the interactive (i) approach to refine it towards your desired goal (g), while considering the non-disclosure (n) constraints. In your follow-up prompt, you can build upon the previous output without reiterating all of the CRAFT elements. Instead, concentrate on the elements that will improve and contribute to the output's enhancement (AI).
Released: May 22, 2023
CAIP 1 · IPE
Put your knowledge to the test
Earn a shareable certificate that demonstrates your skills.
Read more
The three phases
CRAFT
Craft (write) the prompt with the following elements: Context, Register, Acting Role, Format, and Task.
ING
Validate the prompt and ensure it maintains an interactive approach. Keep in mind the importance of non-disclosure and staying goal-driven throughout the process.
AI
Continuously assess and refine the output based on the prompts output to improve the overall quality.