Skip to Content

The art of Prompt Crafting – The Framework

Jeroen Egelmeers
Jan 22, 2024

In the introduction of this series, I explained why Prompt Engineering is valuable. Now that we’ve addressed the basics, let’s dive into the second challenge many organizations face: what should be in the prompt. Not only to guide people, but also to keep it consistent over the organization.
The “Crafting AI Prompts Framework” is a framework for effectively crafting prompts for advanced AI tools, for various tasks. The framework is vital for anyone looking to maximize the potential of AI-driven communication but also to keep it consistent within the organization. This will help to keep it more maintainable and sustainable. Again, I take ChatGPT as an example, but this does apply on many more tools and models.

Understanding the Framework: CRAFT, ING, AI

The framework is divided into three primary phases: CRAFT, ING, and AI, each focusing on different aspects of prompt crafting.

CRAFT (Crafting phase):

During the Crafting Phase we “craft” – write – the prompt. To write the prompt, we need to take a few building blocks into account:

Context: Providing specific details using natural language is crucial. The more precise your information, the better ChatGPT understands and responds.

Register (Writing Style): Specify the desired writing style, considering formality, tone, vocabulary, and grammar. This tailors ChatGPT’s language to your needs.

Acting Role: Choose the persona ChatGPT should assume for tailored responses. Be specific to guide ChatGPT towards the desired expertise or perspective.

Format: Clearly state any formatting requirements, such as bullet points or tables, to ensure the generated output meets your structural needs. A good example here is “user stories”. Of course, there are methods and ways to write a user story, but are you also following those practices at your company? If not; then specify clearly what format you’re expecting so you can simply copy and paste (or even automate) the output to your tools instead of going to rewrite it yourself to the desired output.

Task: Define the task clearly using words like “compose,” “create,” “summarize,” etc. Focus on one task per prompt for the best results.

ING (Validation Phase):

During the validation phase, we validate the prompt before sending it to the model. This ensures it’s interactive, compliant with guidelines, security, legal and GDPR, and ultimately goal-driven.

Interactive: Promote a back-and-forth dialogue for dynamic interaction. This helps refine inquiries and derive meaningful insights from ChatGPT. For instance, if you’re using a table format as output, ensure each row starts with a unique ID for easy reference in upcoming prompts.

Non-disclosure: Include legal, security, and privacy considerations to protect sensitive information and ensure compliance with guidelines such as GDPR. Avoid sharing any personal information.

Goal-driven: Define your goals clearly in prompts to guide ChatGPT to provide relevant and accurate answers.

AI (Enhancement Phase):

During the Enhancement Phase, we adapt and improve the output while ensuring validation. Many companies faced problems due to merely copying and pasting the output without proper adaptation.

Adapt and Improve: Stay proactive, validate responses, and refine prompts based on initial results. Continuous improvement maximizes AI tool potential.

Crafting Phase in Detail

Each aspect of the CRAFT component plays a significant role:

Context: Vital for ChatGPT to grasp the scope of your request.

Register: Helps maintain the appropriate language style.

Acting Role: Influences the perspective of ChatGPT’s responses.

Format: Ensures the response aligns with your expectations.

Task: Clarifies the exact action you want ChatGPT to perform.

Validation and Enhancement Phases

The ING phase involves an interactive approach, ensuring responses align with ethical and responsible practices. It also involves verifying the accuracy and factualness of the output, crucial in areas where precision is necessary.

The AI phase is about adapting and improving your strategy based on ChatGPT’s responses. This involves asking follow-up questions and refining your approach for better outcomes.

Conclusion

The Crafting AI Prompts Framework is a comprehensive guide for anyone looking to leverage the capabilities of ChatGPT effectively. By understanding and applying each component of this framework, users can enhance their interaction with Generative AI, ensuring that the responses are not only relevant and accurate but also ethically and responsibly generated. This framework is an essential tool for those seeking to become proficient prompt engineers, enabling them to unlock the full potential of AI in various writing and engagement tasks. But also, for organizations to specify how prompts should look like to make them more maintainable and sustainable.

In the third part of this blog series, we’ll delve into the interactive approach and (custom) acting roles.

About the author

Prompt Engineering Advocate & Trainer | Netherlands
Jeroen Egelmeers is a Prompt Engineering Advocate at Sogeti Netherlands. Jeroen also serves as a Software Engineer Trainer. 

    Leave a Reply

    Your email address will not be published. Required fields are marked *