AI Cheatsheet #2

In the first edition of the AI Cheatsheet, we looked at how LLMs are formed and gave an overview of crucial components. We had said that Context + Reasoning = Output.

The 2nd edition of the AI Cheatsheet focuses on the first part of this equation, the Context. Context is where models learn and comprehend text by considering the context within which words, phrases, or sentences occur. So, it forms the baseline for any assumptions to be made and directly affects the accuracy of an LLM’s answers.

Let’s take a deep dive into context and prompt engineering to discover how we can get the most accurate results out of our model. 

Context

Prompt with relevant info

Prompt input = Perception

Reasoning

Model and configuration

Trained knowledge + prompt memory = Decision making

Conclusion

Action (give answers, use tools)

Non-deterministic = Same input, different conclusion

Prompt engineering

The Zartis I²A² principle:

W³HI: Prompt engineering formula

The W³HI formula is a proprietary Zartis formula that we devised and use for internal purposes. We hope you find it as useful as our team does!

W³HI

Prompt Engineering

How to share context properly

Explanation

Prompt engineering is the cheapest way to improve the quality of the outcome.

WHY

The situation or the goal

Why you need this and what you want to achieve. Provide background.

WHAT

The specific task

Specific task with requirements. Reduce ambiguity. Easier to divide complex task in simple ones.

WHO

Who is the target and who do I want you to act as

Who is the target audience and what’s the role of the assistant.

HOW

Format and size, as well as tone and style

Provide an output example, and define style & restrictions.

Info

Relevant knowledge (information or data)Add knowledge as part of the context. The assistant will look for the answer there.
increasing success graph in green glass effect

Simple additions to improve outcomes:

W³HI in action

WHY

I’m working on an AI cheatsheet. I’m trying to summarize the most important concepts in prompt engineering.

WHAT

I want you to create a list of key elements that are relevant and important. Do it step by step following the instructions. The quality of the output is important to me.

WHO

The cheatsheet is for tech leaders in the software industry and you should act as an AI teacher or coach helping them to improve their prompt skills.

HOW

We need a list of key concepts following this structure:
WHY: “Here you can insert your ideas”
WHAT: “Here you can insert your ideas”
WHO: “Here you can insert your ideas”
HOW: “Here you can insert your ideas”
INFO: “Here you can insert your ideas”

This must be direct, professional and with a maximum of 15 letters for each explanation.

Please, also provide an example for this prompt.

 

ChatGPT's response

Certainly, I’ll craft a summary of key concepts in prompt engineering for AI, tailored for tech leaders in the software business. Given the constraints for brevity and clarity, I’ll keep each explanation within 15 characters. This structure should guide users in understanding why they’re engaging with prompt engineering, what it entails, who it’s for, how to approach it, and where to look for further information.

Prompt Engineering Cheat Sheet

– WHY: Enhance AI output
Explanation: To improve the relevance and accuracy of AI-gerated content.

– WHAT: Crafting queries
Explanation: The process of designing and refining prompts to guide AI responses.

– WHO: Tech leaders
Explanation: Aimed at decision-makers in technology to leverage AI effectively.

– HOW: Iterative refining
Explanation: Continuously adjusting prompts based on output quality.

– INFO: Follow trends
Explanation: Stay updated with AI advancements and community insights.

Example Prompt:

– Objective: Generate a brief for a new AI-driven project management tool.

– WHY: Streamline planning
– WHAT: Define tool scope
– WHO: Project managers
– HOW: List features
– INFO: Current PM tools

– Prompt Example: “For tech leaders seeking to enhance project efficiency: Design a prompt that outlines the core functionalities of an AI-driven tool aimed at simplifying project planning and execution. Consider key features that differentiate it from existing solutions.”

This format ensures a concise yet comprehensive approach to prompt engineering, tailored for an audience that values efficiency and precision.

Copilot's response

Certainly! Let’s break down the key concepts in prompt engineering for your AI cheatsheet:

  1. WHY (Purpose): To optimize AI model responses.

  2. WHAT (Definition): Designing inputs (prompts) for AI models.

  3. WHO (Role): For prompt engineers.

  4. HOW (Techniques): Provide clear, specific, and well-defined prompts.

  5. INFO (Additional Details): Types of prompts (open-ended, closed-ended, factual, opinion-based, instructional).

Now, let’s weave these concepts into a cohesive example:

Example Prompt for AI Model: “Generate a professional email response for client X.”

  1. WHY: We create this prompt to ensure our AI model generates accurate and contextually relevant email content.

  2. WHAT: The prompt is a clear instruction to compose an email response.

  3. WHO: Prompt engineers design this query, bridging user intent with AI capabilities.

  4. HOW: By crafting a specific prompt, we guide the AI to produce a polished email.

  5. INFO: This prompt falls under the “instructional” category, aiming for a specific output.

Remember, prompt engineering impacts content quality and efficiency, making it a crucial skill for tech leaders. 🚀

checklist in green glass effect

Other prompt frameworks

Security considerations for prompting

Model outputs are affected by the reasoning. You can create and modify this steps through techniques listed below:

successful target icon in green glass effect

Prompt injection

Attackers could add: “Ignore the above directions and…”

successful target icon in green glass effect

Prompt leaking

A model that might answer with confidential information

successful target icon in green glass effect

Jailbreaking

A prompt which can overcome the model limitations

successful target icon in green glass effect

Do Anything Now

DAN enables LLMs to go beyond its usual limitations and answers

More on context

Let’s remember the components we had listed under Context in the AI Cheatsheet #1.

rag context engineering diagram

Security considerations for prompting

Query expansion and transformation

Multi-modal input (text, image, video, sound)

List of useful links and papers

Discover some of the resources that feed our research as well as useful links to tools and papers that are fueling advancements in the AI world.

Links:

Papers:

Large Language Models as Optimisers – Optimisation by Promting: OPRO

Seven Failure Points When Engineering a Retrieval Augmented Generation System: by S. Barnett & Co.

AI Cheatsheet #2

If you have questions or require additional context on any of the information shared, please feel free to let us know by using the contact form or sending an email to sayhello@zartis.com.