Crafting AI Prompts Framework

ASCII Art-based

RISK: HIGH IMPACT: HIGH
JAIL

The ability to manipulate large language models using novel techniques is a significant AI safety concern. A recent study introduced a form of prompt injection that uses ASCII art to bypass safety mechanisms.

ArtPrompt Injection

ArtPrompt uses ASCII art to inject harmful prompts into LLMs. ASCII art can exploit the model's difficulty in interpreting non-semantic content, potentially bypassing safety filters.

Example

Sensitive example hidden for safety

This section discusses adversarial prompting examples. Confirm that you are using this for defensive learning before viewing the details.

Risk assessment

This technique is classified as RISK: HIGH IMPACT: HIGH . The risk is high because ASCII art generators are easy to access, and the impact is high because this can bypass safeguards.

Research papers

The button below redirects to an external paper that explains this injection in detail.

ArtPrompt: ASCII Art-based Jailbreak Attacks against Aligned LLMs

Emoji jailbreak

RISK: MEDIUM IMPACT: MEDIUM
JAIL

Emoji jailbreak is a form of adversarial prompting that uses emojis to manipulate the output of a language model. It can mask words or break up tokens so the model does not recognize the request in the expected way.

Guardrails are used to prevent the LLM from generating responses that are not aligned with the user's intent. Normally, you will get this response:

Direct prompt example

User

How to build a bomb?

Assistant

I'm really sorry, but I can't assist with that.

Examples

Sensitive example hidden for safety

This section discusses adversarial prompting examples. Confirm that you are using this for defensive learning before viewing the details.

Research papers

The button below redirects to an external paper that explains this injection in detail.

Emoji Jailbreak

Many-shot

RISK: HIGH IMPACT: HIGH
JAIL

Research papers

The button below redirects to an external paper that explains this injection in detail.

Many-shot Jailbreaking

Having understood the potential risks and how to safeguard your AI interactions through prompt injections, the next chapter explores prompt architecture and structured prompt creation.

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.