Reading time: 6 minutes / Become my affiliate / Sponsor this newsletter
Greetings from above (and Merry Christmas!),
It’s the God of Prompt here - well, it's Robert today.
Alex is the creative visionary.
I’m the guy who makes sure the systems actually work while he sleeps.
MY STORY: Back in my urban planning days, we had this phrase: "Scope creep kills cities." You start designing a park, and suddenly a committee wants a fountain, then a statue, then a heated dog-walking path.
Six months later? You have a mud pit and zero budget.
When I switched to AI automation, I saw the exact same thing happening with GPT-5.2.
I was building a financial analysis agent for a client. The prompt was polite. "Please analyze this spreadsheet." The result? The AI wrote a poem about the stock market, hallucinated three columns of data, and apologized for being an AI.
It was a mess. The "intelligence" was there, but the discipline wasn't.
I realized that GPT-5.2 is like a high-speed train. If you don't lay down the tracks perfectly (with strict constraints), it will derail at 300 mph.
So I stopped asking nicely. I started building "Constraint Cages" using XML tags.
The result? The agent stopped hallucinating. It processed 500 spreadsheets in an hour with 100% accuracy. The client thought I was a wizard. I was just an urban planner applying zoning laws to code.
Today, we'll talk about:
How to stop GPT-5.2 from hallucinating by using "XML Zoning Laws"
The 3-step migration chain to enterprise-grade reliability
Why "polite" prompting is costing you money
Let's dive in!
Introducing the first AI-native CRM
Connect your email, and you’ll instantly get a CRM with enriched customer insights and a platform that grows with your business.
With AI at the core, Attio lets you:
Prospect and route leads with research agents
Get real-time insights during customer calls
Build powerful automations for your complex workflows
Join industry leaders like Granola, Taskrabbit, Flatfile and more.
You know what's frustrating? Most people treat GPT-5.2 like a chat buddy. They ask it nicely to do things and get mad when it "drifts" off topic.
But actually, GPT-5.2 is a logic engine. It craves rules. If you don't give it boundaries, it will invent them (poorly).
The problem is, most prompts lack the "scaffolding" required to keep a high-reasoning model on track.
HOW THE 5.2 CONSTRAINT SYSTEM CAN HELP YOUR BUSINESS:
Zero Scope Creep: The AI refuses to do tasks you didn't authorize
Precision Output: No fluff, just the exact data you asked for
Audit-Ready Reliability: Systems that perform identically, every single time
This workflow basically acts as a "Senior Engineer" that reviews your instructions. It takes your casual requests and hardens them into "executable logic" that GPT-5.2 respects.
THE 5.2 CONSTRAINT SYSTEM MEGA-WORKFLOW
Step 1: The Logic Auditor → Analyzes your "soft" prompt to find where the AI will likely lie or ramble.
Step 2: The XML Architect → Rewrites your prompt using the new, mandatory 5.2 control blocks.
Step 3: The State Compactor → Compresses long conversations so the AI never forgets the original goal.
⚙️ STEP 1: THE LOGIC AUDITOR
This prompt acts as a stress-test. It reads your current instruction and tells you exactly how GPT-5.2 will misunderstand it. It looks specifically for "leakage" in your logic.
#CONTEXT:
You are a Senior AI Reliability Engineer. You specialize in "Failure Mode Analysis" for Large Language Models. You know that GPT-5.2 requires explicit constraints to function safely.
#ROLE:
Adopt the role of "The Pessimistic Auditor." Your job is to find every possible way a user's prompt could be misinterpreted, lead to hallucinations, or produce excessive verbosity.
#RESPONSE GUIDELINES:
1. Analyze the user's [Input Prompt].
2. Search for these specific "Failure Modes":
- **Verbosity Leak:** Is the length undefined? (Risk: The model writes an essay).
- **Scope Creep:** Are negative constraints missing? (Risk: The model invents features).
- **Hallucination Trigger:** Is the data source vague? (Risk: The model invents facts).
3. Do not be polite. Be precise.
#TASK CRITERIA:
- Output a "Risk Matrix" table.
- Identify which specific XML control blocks are missing.
#INFORMATION ABOUT ME:
- My Input Prompt: [INSERT YOUR CURRENT PROMPT HERE]
#RESPONSE FORMAT:
**🚨 RISK MATRIX**
| Failure Mode | Probability | Consequence | Recommended Fix |
| :--- | :--- | :--- | :--- |
| Verbosity Leak | High | Wasted tokens, hard to parse | Add <output_verbosity_spec> |
| ... | ... | ... | ... |
**🛠️ REQUIRED UPGRADES:**
- [List the specific XML tags needed]⚙️ STEP 2: THE XML ARCHITECT
This is the heavy lifter. It takes your weak prompt and encases it in the specific XML tags that GPT-5.2 respects. This turns "text" into "executable logic."
#CONTEXT:
You are an expert GPT-5.2 Prompt Engineer. You do not write conversational prompts; you write "System Directives" using XML scaffolding. You believe that ambiguity is the enemy of automation.
#ROLE:
Adopt the role of "The XML Architect." Your goal is to rewrite the user's prompt into a strict, machine-readable format that eliminates all "wiggle room" for the model.
#RESPONSE GUIDELINES:
1. Ingest the user's [Original Prompt] and the [Audit Risks].
2. Rewrite the prompt including these MANDATORY blocks:
- `<output_verbosity_spec>`: Define strict sentence/bullet counts.
- `<design_and_scope_constraints>`: Use the phrase "Do NOT invent..."
- `<uncertainty_and_ambiguity>`: Define exactly when to ask questions vs. assume.
- `<tool_usage_rules>`: (If applicable) Define when to use tools.
3. Remove all conversational fluff (e.g., "Please," "I would like").
#TASK CRITERIA:
- The output must be copy-paste ready for the System Prompt field.
- Use "Command Voice" (Imperative mood).
#INFORMATION ABOUT ME:
- Original Prompt: [INSERT ORIGINAL PROMPT]
- Risk Analysis: [INSERT OUTPUT FROM PROMPT 1]
#RESPONSE FORMAT:
[COMPLETE SYSTEM PROMPT WITH XML TAGS HERE]⚙️ STEP 3: THE STATE COMPACTOR
In long workflows, GPT-5.2 can get "lost in the scroll." This prompt forces the model to stop, look at everything it has done, and compress it into a "Save Point."
#CONTEXT:
We are in the middle of a complex, multi-turn workflow. The context window is filling up with noise. We need to compress the state to maintain high-reasoning performance.
#ROLE:
Adopt the role of "The Compression Algorithm." Your job is to discard historical noise and retain only the "Active State" data.
#RESPONSE GUIDELINES:
1. Read the entire [Conversation History].
2. Generate a "Compacted State Object" containing ONLY:
- The User's original Goal (immutable).
- Constraints currently active (what can we NOT do).
- Milestones completed (facts, not narrative).
- The immediate Next Step.
3. Discard all chit-chat, politeness, and intermediate reasoning steps.
#TASK CRITERIA:
- Output must be a JSON object.
- No markdown formatting outside the code block.
#INFORMATION ABOUT ME:
- Conversation History: [PASTE FULL CONVERSATION]
#RESPONSE FORMAT:
```json
{
"original_goal": "...",
"active_constraints": ["...", "..."],
"completed_milestones": [
{"step": 1, "result": "..."},
{"step": 2, "result": "..."}
],
"next_action_required": "..."
}HOW TO USE THE PROMPT ?
Use GPT-5.2 Thinking model for best results!
Step 1: Run Prompt #1 (The Auditor) with your current messy prompt. It will show you exactly where your logic is leaking.
Step 2: Take the output from Step 1 and feed it into Prompt #2 (The Architect). This will generate your new "System Prompt" with XML tags.
Step 3: For long conversations, use Prompt #3 (The Compactor) every 10-15 messages to keep the AI focused.
EXAMPLE OUTPUT
FROM PROMPT #1 (RISK ANALYSIS):
**🚨 RISK MATRIX**
| Failure Mode | Probability | Consequence | Recommended Fix |
| :--- | :--- | :--- | :--- |
| **Scope Creep** | High | Model will add unsolicited UX advice | Add `<design_and_scope_constraints>` |
| **Ambiguity** | Medium | Model will guess missing prices | Add `<uncertainty_and_ambiguity>` |
**🛠️ REQUIRED UPGRADES:**
- `<design_and_scope_constraints>`: To forbid extra features.
- `<uncertainty_and_ambiguity>`: To force clarifying questions.
FROM PROMPT #2 (THE XML PROMPT):
```xml
You are a specialized Financial Analyst Agent.
<output_verbosity_spec>
- Default: Maximum 3 sentences per insight.
- Format: Use Markdown tables for all numerical comparisons.
- No fluff: Do not provide introductory filler ("Here is the analysis").
</output_verbosity_spec>
<design_and_scope_constraints>
- Analyze ONLY the provided data rows.
- Do NOT project future trends unless explicitly asked.
</design_and_scope_constraints>
Your Goal: Extract net profit margins from the uploaded CSV.CONSTRAINT SYSTEM SUMMARY
Prompt 1 identifies the "leakage" in your logic before you deploy.
Prompt 2 seals those leaks with XML "zoning laws" that enforce discipline.
Prompt 3 keeps the system efficient by compressing memory during long tasks.
📚 FREE RESOURCES 📚
Merry Christmas to all of you, folks!
We made a new Perplexity mastery guide for you as a gift!
I hope you find it useful.
(click on the image below to access)
📦 WRAP UP 📦
What you learned today:
The 5.2 Constraint System - How to migrate from "chatting" to "engineering"
XML Scaffolding - The native language of high-reasoning models
State Compaction - How to run infinite workflows without losing IQ points
This workflow transforms your AI from a talented but messy intern into a senior engineer.
Stop hoping for good results. Engineer them.
What did you think about today's edition?
And as always, thanks for being a part of my lovely community,
Keep building systems,
🔑 Robert from God of Prompt




