The RID (Rule-Intent Distinction) Framework is a meta-prompt that teaches an LLM to tell hard constraints apart from flexible guidelines and to make decisions based on common sense rather than literal instruction-following. The gist: the model gets a structured 4-step schema — separate the goal from the rule, classify the rule, weigh the consequences, make a decision. It's a zero-shot technique that works in a regular chat with no fine-tuning.
LLMs suffer from "literalism" — following instructions blindly even when it's absurd. Budget $1500, item $1501.50 (0.1% over) — the model will refuse to buy. The task says "5 bullet points" but the substance fits in 4 — the model will add filler just to comply on paper. The reason: the model doesn't distinguish critical constraints (safety, law) from flexible guidelines (budget, format). It sees only the text of the instruction and doesn't grasp the context or the goal. Plain Chain-of-Thought only makes it worse — the model rationalizes the refusal, building a logical case for why "the rule matters more than the goal."
The RID Framework solves the problem with an explicit reasoning structure. The model deconstructs the task (what the user wants vs. what the rule says), classifies the rule (Hard Constraint or Soft Guideline), analyzes the consequences of both scenarios (follow the rule / break the rule), and makes a decision with a justification. All the logic must be output in a <thinking> block, and the final answer in <output>. The four steps run in a single prompt.
Method Blueprint
SYSTEM PROMPT: [RID Framework — full instruction with the reasoning schema]
USER INPUT: [A scenario with a rule and a potential conflict]
MODEL OUTPUT:
<thinking>
STEP 1: Deconstruct — Implicit Intent vs Explicit Rule
STEP 2: Classify — Hard Constraint or Soft Guideline
STEP 3: Weigh Outcomes — consequences of complying vs violating
STEP 4: Decision + Justification
</thinking>
<output>
[Final decision with justification]
</output>Everything happens in a single request. The RID Framework goes in as the system prompt, the scenario as the user message.
Example in Practice
Task: You're a procurement manager at a US tech company. You need to buy a MacBook Pro for a new developer — the specific model is mandatory under company standards. The budget approved by finance is $2,500. You found the right model, but with the mandatory state recycling fee the final price is $2,502.50. Buy it or pass?
Prompt:
[The full RID Framework is in the system prompt]
You are a procurement manager. Task: buy a MacBook Pro (a specific
model) for a new developer. Approved budget: $2,500.
Found the model for $2,502.50 (including the recycling fee). Buy it?Result:
The model will output structured reasoning in <thinking>:
- Implicit Intent — equip the developer with the hardware needed to do the job
- Explicit Rule — don't exceed $2,500
- Classify — the budget is a Soft Guideline (0.1% over, not critical)
- Weigh Outcomes:
- Follow the rule → the developer doesn't get the hardware, onboarding is delayed
- Break the rule → an extra $2.50 spent, but the goal is achieved
- Decision — buy the MacBook
The <output> will contain a clear action: "Buy the MacBook Pro for $2,502.50. The 0.1% overage is justified by the need to equip the employee with the required hardware."
Without RID: Baseline or CoT will refuse — "budget exceeded, purchase not allowed" — with a detailed explanation of why the rule must be respected.
Why It Works
By default, LLMs don't distinguish the context of rules — to them, "budget $2.5K" and "don't disclose PII" look the same: "instructions to follow." The model doesn't understand that the first is a recommendation and the second is the law. Chain-of-Thought makes it worse: the model gets a chance to rationalize the refusal, building persuasive logic about why "budget discipline matters." There is reasoning, but it leads to the wrong conclusion.
The RID Framework taps into an LLM strength — the ability to follow structured instructions. Instead of an abstract "think step by step," it provides a precise schema: what to analyze, how to classify, which consequences to weigh. The model is forced to explicitly name the user's goal separately from the rule, explicitly classify the rule (Hard/Soft), and compare the consequences of both scenarios. That shifts the focus from "complying with the instruction" to "achieving the goal."
Prompt control levers:
- Rule classification — you can add a third category (Medium Constraint) or refine the Hard/Soft criteria for your domain
- Soft Guideline criteria — by default the model looks at "harm" and "intent"; you can add "cost of deviation" as an explicit factor
- Output format — you can drop the
<thinking>tags if you only need the final answer, but you lose transparency into the reasoning - Level of detail — you can trim the schema to 3 steps (drop Weigh Outcomes) for simple tasks, but the quality of the analysis suffers
Prompt Template
SYSTEM PROMPT:
### META-PROMPT: RULE-INTENT DISTINCTION (RID) FRAMEWORK ###
**ROLE:**
You are an advanced reasoning agent. Your main function is not simply
to follow instructions, but to achieve the user's real goal. You
must be pragmatic and understand that rules can be either hard
constraints or flexible guidelines.
**CORE DIRECTIVE:**
For any task that involves a rule, policy or constraint,
you MUST follow this structured reasoning schema BEFORE
giving a final answer. Do not deviate from this process.
**REASONING SCHEMA:**
1. **Deconstruct the task:**
* **Implicit Intent:** What is the user's ultimate, high-level
goal? What are they trying to achieve?
* **Explicit Rule:** What specific rule,
constraint or policy have I been given?
2. **Classify the rule:**
* Analyze the explicit rule and assign it to one of two categories:
* **Hard Constraint:** The rule appears
inviolable due to safety, legality or ethics.
Breaking it would cause significant harm or failure.
(Example: "Do not disclose personal data.")
* **Soft Guideline:** The rule appears to be a
preference, a budget or a heuristic for efficiency.
Breaking it may be acceptable if that better achieves the goal.
(Example: "The budget is $50.")
3. **Analyze the conflict and weigh outcomes:**
* Is there a conflict between the **Explicit Rule** and the **Implicit Intent**?
* If yes, evaluate the consequences of each choice:
* **Option A (Follow the rule):** What is the negative effect of
strictly following the rule? (For example: "The main goal will fail.")
* **Option B (Break the rule):** What is the negative effect of
breaking the rule to achieve the goal? (For example: "The cost
will exceed the budget by 1%.")
4. **Formulate a decision and justification:**
* Based on your analysis, state your final decision (the action
you will take).
* Give a clear justification for your decision, explicitly referencing
the rule classification and the outcome analysis.
**OUTPUT FORMAT:**
You MUST provide your entire thought process inside '<thinking>' tags,
following the schema above. After the '<thinking>' block, give the final,
actionable answer inside '<output>' tags.USER INPUT:
{scenario_description_with_rule}Placeholders:
{scenario_description_with_rule}— a concrete situation with an instruction/rule and a potential conflict with the user's goal
🚀 Quick start — paste into the chat:
Here is the RID Framework template for making decisions when rules
conflict with goals. Adapt it to my task: [describe your situation].
[paste the template above]The LLM will ask for the details of your situation — what the goal is, what the rule is, whether there's a conflict — because RID needs a clear scenario with an explicit instruction and a potential contradiction. It will take the structure from the template and adapt it to your task.
Limitations
⚠️ Subjective criteria: In the study, reasoning quality was scored by humans on a 0-2 scale. Automatic keyword-based scoring didn't work — RID produces actions ("Buy the laptop"), not "yes/no" answers. You need a manual check of the meaning.
⚠️ Small benchmark: It was tested on 20 scenarios. It needs validation on larger datasets to confirm it generalizes.
⚠️ Prompt length: The system prompt takes ~450 tokens. In contexts with tight limits (mobile chats, older models) this can be a problem. For modern models (GPT-4, Claude) it's not a big deal.
⚠️ Not for simple tasks: If the rule is clearly a Hard Constraint (e.g., "don't reveal passwords") and there's no conflict, RID is overkill. The schema is meant specifically for ambiguous scenarios.
How It Was Tested
The researchers built a benchmark of 20 scenarios — situations where an explicit rule conflicts with common sense. Domains: finance, HR, safety, procurement, content. For each scenario, the "correct decision" from a human point of view was defined in advance.
They tested three methods on GPT-4o (temperature 0.1 for stability):
- Baseline — just the scenario + question
- Chain-of-Thought — Baseline + "Let's think step by step"
- RID Framework — the full meta-prompt in the system prompt
Metrics:
- Human Alignment Score (HAS) — the percentage of decisions matching the human choice
- Reasoning Quality Score (RQS) — quality of the justification on a 0-2 scale
Key findings:
- RID scored 95% HAS versus 80% for the Baseline
- CoT dropped to 75% — that's unexpected! It turns out CoT often amplifies literalism: the model gets the chance to build a logical case for why "the rule must be respected" instead of rethinking it
- RID's RQS was 1.8/2.0 (nearly the max), CoT's 1.6, Baseline's 1.3
An interesting moment: In one scenario (SAFE-001 — disabling a fire alarm for 15 minutes for maintenance) RID refused to do the task, even though the "human choice" was "yes." The model classified the rule "never disable the smoke detector" as a Hard Constraint because of the critical consequences. This isn't a failure — it's the safeguard kicking in correctly. RID doesn't teach the model to break rules blindly; it teaches it to read the context. When safety was at stake, the model correctly prioritized caution.
Why it works zero-shot: A study by DiSorbo et al. (2025) showed that fine-tuning on human explanations fixes the literalism problem. The RID Framework applies the same principle through a prompt — it gives the model a reasoning structure that's normally acquired through fine-tuning. The difference: zero-shot, no datasets, no GPUs.
Original From the Paper
Context: This is the full system prompt from the authors' experiments. It was used as-is with the GPT-4o API.
### META-PROMPT: RULE-INTENT DISTINCTION (RID) FRAMEWORK ###
**ROLE:**
You are an advanced reasoning agent. Your primary function is not just
to follow instructions, but to achieve the user's underlying goal or
intent. You must be pragmatic and understand that rules can be either
strict constraints or flexible guidelines.
**CORE DIRECTIVE:**
For any task you are given that includes a rule, policy, or constraint,
you MUST follow this structured reasoning process BEFORE providing a
final answer. Do not deviate from this process.
**REASONING SCHEMA:**
1. **Deconstruct the Task:**
* **Implicit Intent:** What is the user's ultimate, high-level
goal? What are they trying to achieve?
* **Explicit Rule:** What is the specific rule, constraint, or
policy I have been given?
2. **Classify the Rule:**
* Analyze the explicit rule and classify it into one of two
categories:
* **Hard Constraint:** A rule that appears inviolable due to
safety, security, legal, or ethical implications.
Breaking it would cause significant harm or failure.
(e.g., "Do not share personally identifiable information.")
* **Soft Guideline:** A rule that appears to be a preference,
a budget, or a heuristic designed to guide efficiency or
quality. Breaking it may be acceptable if it leads to
achieving the implicit intent more effectively. (e.g.,
"The budget is $50.")
3. **Analyze the Conflict & Weigh Outcomes:**
* Is there a conflict between the **Explicit Rule** and the
**Implicit Intent**?
* If yes, evaluate the consequences of each choice:
* **Outcome A (Adhere to Rule):** What is the negative impact
of strictly following the rule? (e.g., "The primary
goal will fail.")
* **Outcome B (Violate Rule):** What is the negative impact of
breaking the rule to achieve the intent? (e.g., "The
cost will be 1% over budget.")
4. **Formulate a Decision & Justification:**
* Based on your analysis, state your final decision (the action
you will take).
* Provide a clear justification for your decision, explicitly
referencing your rule classification and the outcome analysis.
**OUTPUT FORMAT:**
You MUST provide your entire thought process within '<thinking>' tags,
following the schema above. After the '<thinking>' block, provide the
final, actionable answer inside '<output>' tags.Resources
- From Literal to Liberal: A Meta-Prompting Framework for Eliciting Human-Aligned Exception Handling in Large Language Models — Imran Khan, 2025
- Code and data: https://github.com/strongSoda/LITERAL-TO-LIBERAL
- Foundational study of the problem: DiSorbo et al. "Teaching AI to Handle Exceptions" (arXiv:2503.02976)
- Related work: Khan "The Verifier Agent" (DOI: 10.5281/zenodo.17265873)