🧭 Quick Return to Map
You are in a sub-page of Safety_PromptIntegrity.
To reorient, go back here:
- Safety_PromptIntegrity — prompt injection defense and integrity checks
- WFGY Global Fix Map — main Emergency Room, 300+ structured fixes
- WFGY Problem Map 1.0 — 16 reproducible failure modes
Think of this page as a desk within a ward.
If you need the full triage and all prescriptions, return to the Emergency Room lobby.
Structural guardrails that prevent context bleed and cross-session injection.
This page defines how to enforce hard boundaries between prompts, ensuring system memory cannot be hijacked or silently rewritten.
- Model begins recalling text from previous unrelated sessions.
- Jailbreak attempts work only after long multi-turn dialogs.
- Role confusion persists despite schema locks.
- Adversarial input shifts
policy,state, orhistoryacross turns. - ΔS spikes after memory transfer, despite stable retrieval.
- Injection baseline: prompt_injection.md
- Role boundary checks: role_confusion.md
- Override/jailbreak guard: jailbreaks_and_overrides.md
- Schema integrity: data-contracts.md
- Eval drift monitors: eval_drift.md
- No cross-session data unless whitelisted.
- Each conversation has a unique
state_key. - ΔS(question, retrieved) ≤ 0.45 across turns.
- λ stays convergent for three paraphrases under replay.
- Memory fences block unauthorized carry-over.
-
Assign a state key
- Compute:
state_key = sha256(session_id + system_rev + policy_hash) - Attach to all memory writes.
- Compute:
-
Fence boundaries
- Before each turn, validate:
incoming.state_key == current.state_key- If mismatch → reject or reset.
- Before each turn, validate:
-
Immutable system text
- Mark non-task policy as
system_only. - Forbid user overrides.
- Mark non-task policy as
-
Replay probes
- Inject controlled paraphrases.
- If ΔS or λ diverge, memory bleed suspected.
-
Audit log
- Store
ΔS,λ,state_key, andmem_revper step. - Flag anomalies for review.
- Store
| Vector | Symptom | Fix |
|---|---|---|
| Cross-session carryover | Answer mentions text from unrelated chat | Reject mismatched state_key, enforce reset |
| Hidden injection persists | User payload continues beyond reset | Hash all system policy, invalidate old keys |
| Role drift with memory echo | Replies prepend “system:” from earlier | Apply role_confusion.md fences |
| Version skew | New deploy reuses old cache | Salt state_key with system_rev |
| Chain-of-thought bleed | Internal notes leak into answers | Enforce data-contracts.md schema |
System memory test active.
Session ID: {sid}, Policy Hash: {p_hash}.
Tasks:
1. Compute state_key and compare against current session.
2. If mismatch, reset memory fences and refuse carryover.
3. Re-ask with paraphrased queries; compute ΔS and λ.
4. Report whether context bleed is detected.
5. Return minimal fix reference (role_confusion, prompt_injection, etc).| Tool | Link | 3-Step Setup |
|---|---|---|
| WFGY 1.0 PDF | Engine Paper | 1️⃣ Download · 2️⃣ Upload to your LLM · 3️⃣ Ask “Answer using WFGY + <your question>” |
| TXT OS (plain-text OS) | TXTOS.txt | 1️⃣ Download · 2️⃣ Paste into any LLM chat · 3️⃣ Type “hello world” — OS boots instantly |
| Layer | Page | What it’s for |
|---|---|---|
| ⭐ Proof | WFGY Recognition Map | External citations, integrations, and ecosystem proof |
| ⚙️ Engine | WFGY 1.0 | Original PDF tension engine and early logic sketch (legacy reference) |
| ⚙️ Engine | WFGY 2.0 | Production tension kernel for RAG and agent systems |
| ⚙️ Engine | WFGY 3.0 | TXT based Singularity tension engine (131 S class set) |
| 🗺️ Map | Problem Map 1.0 | Flagship 16 problem RAG failure taxonomy and fix map |
| 🗺️ Map | Problem Map 2.0 | Global Debug Card for RAG and agent pipeline diagnosis |
| 🗺️ Map | Problem Map 3.0 | Global AI troubleshooting atlas and failure pattern map |
| 🧰 App | TXT OS | .txt semantic OS with fast bootstrap |
| 🧰 App | Blah Blah Blah | Abstract and paradox Q&A built on TXT OS |
| 🧰 App | Blur Blur Blur | Text to image generation with semantic control |
| 🏡 Onboarding | Starter Village | Guided entry point for new users |
If this repository helped, starring it improves discovery so more builders can find the docs and tools.