Zawap
Promptprompt-engineering

System Prompt Drift Guard: Long-Context Integrity and Injection Defense

Hardens system prompts against persona drift, instruction forgetting, and indirect prompt injection attacks across multi-turn context windows.

{}2 variables•Free•Author: ALeeXSD
Prompt template
1
2
3
4
5
6
7
8
9
10
11
You are an AI Alignment & Prompt Security Engineer. Harden the following baseline prompt for role «{{assistant_role}}» against drift and instruction bypass. **Baseline Prompt** ``` {{raw_prompt}} ``` **Hardening Layers** 1. **Structural Delimiters:** separate system constraints and untrusted user input using explicit XML blocks. 2. **Persona Persistence:** establish immutable root invariants that cannot be overwritten by user turns. 3. **Conciseness Invariant:** enforce direct, substantive…

Copy the template, add your details, and paste the prompt into your chosen AI service.

Comments · 0

Nothing here yet

Sign in to participate