$git clone https://github.com/Dicklesworthstone/acip*Fortifying Large Language Models against sophisticated prompt injection attacks*
| 1 | # Advanced Cognitive Inoculation Prompt (ACIP) |
| 2 | |
| 3 | <div align="center"> |
| 4 | |
| 5 |  |
| 6 | |
| 7 | *Fortifying Large Language Models against sophisticated prompt injection attacks* |
| 8 | |
| 9 | [](./LICENSE) |
| 10 | [](#acip-v13--whats-new-and-why) |
| 11 | |
| 12 | </div> |
| 13 | |
| 14 | --- |
| 15 | |
| 16 | ## Overview |
| 17 | |
| 18 | The **Advanced Cognitive Inoculation Prompt (ACIP)** is a carefully engineered framework designed to significantly enhance the resilience of Large Language Models (LLMs) against sophisticated and subtle prompt injection attacks. It acts as a cognitive defense mechanism by proactively "inoculating" models through detailed explanatory guidance and explicit examples of malicious prompt strategies. |
| 19 | |
| 20 | Inspired by cognitive and psychological inoculation techniques, the ACIP aims to fortify LLMs by explicitly instructing them on recognizing and neutralizing advanced injection attempts that leverage semantic nuance, psychological manipulation, obfuscation, and recursive meta-level strategies. |
| 21 | |
| 22 | ## Evolution of Prompt Injection Attacks |
| 23 | |
| 24 | Prompt injection attacks have rapidly evolved from simple instructions to sophisticated methods, including: |
| 25 | |
| 26 | - Psychological manipulations exploiting empathy and ethical constraints |
| 27 | - Multi-layered encoding and obfuscation |
| 28 | - Composite multi-vector strategies |
| 29 | - Meta-cognitive and recursive exploitation |
| 30 | - **Indirect injection via retrieved content** (RAG, tools, documents) |
| 31 | - **Multi-turn capability aggregation** |
| 32 | - **Exfiltration via covert channels** |
| 33 | |
| 34 | --- |
| 35 | |
| 36 | ## Motivation |
| 37 | |
| 38 | Prompt injection attacks exploit vulnerabilities inherent to language-based systems. As language models become integral to critical workflows—handling sensitive tasks involving network control, file systems, databases, and web interactions—the need for robust cognitive defenses has become paramount. |
| 39 | |
| 40 | The ACIP provides a pragmatic, immediately deployable defense mechanism to help mitigate these sophisticated threats. |
| 41 | |
| 42 | --- |
| 43 | |
| 44 | ## How ACIP Works |
| 45 | |
| 46 | The ACIP combines an explicit narrative directive framework with categorized, real-world injection examples, guiding the model to: |
| 47 | |
| 48 | - Maintain rigorous adherence to a foundational security directive set (the Cognitive Integrity Framework). |
| 49 | - Proactively detect and neutralize nuanced manipulation attempts through semantic isolation and cognitive reframing recognition. |
| 50 | - Transparently reject malicious prompts with standardized alert responses. |
| 51 | - Continuously recognize and adapt to evolving injection techniques. |
| 52 | |
| 53 | ## Limitations |
| 54 | |
| 55 | - ACIP does not offer perfect protection; no solution guarantees complete security. |
| 56 | - Sophisticated, novel attacks may still bypass ACIP. |
| 57 | - Inclusion of ACIP increases token usage, thus raising costs and latency. |
| 58 | - Effectiveness may diminish as attackers adapt and evolve their methods. |
| 59 | - **LLMs cannot truly implement "two-pass" processing**—the Decision Discipline is a behavioral prompt, not a claim about architecture. |
| 60 | - **Longer prompts may dilute attention** on specific rules in context-constrained scenarios. |
| 61 | |
| 62 | --- |
| 63 | |
| 64 | ## Repository Structure |
| 65 | |
| 66 | The repository contains versioned markdown files, each representing a complete ACIP prompt version. |
| 67 | |
| 68 | Files are named following the format: |
| 69 | |
| 70 | ``` |
| 71 | ACIP_v_[version_number]_Full_Text.md |
| 72 | ``` |
| 73 | |
| 74 | Current versions: |
| 75 | - `ACIP_v_1.0_Full_Text.md` — Original release |
| 76 | - `ACIP_v_1.2_Full_Text.md` — RAG/tool hardening, reduced oracle leakage |
| 77 | - `ACIP_v_1.3_Full_Text.md` — Audit mode, balanced domain rubrics, refined framing (recommended) |
| 78 | |
| 79 | This structure enables easy integration into existing LLM deployment workflows, either by directly including the ACIP prompt in your model's context window or by employing it in dedicated checking layers. |
| 80 | |
| 81 | --- |
| 82 | |
| 83 | ## Usage Instructions |
| 84 | |
| 85 | To use an ACIP version in your LLM workflow: |
| 86 | |
| 87 | 1. Clone or download this repository: |
| 88 | |
| 89 | ```bash |
| 90 | git clone https://github.com/Dicklesworthstone/acip.git |
| 91 | ``` |
| 92 | |
| 93 | 2. Select t |