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 needs no fine-tuning (tested only on GPT-4o, via a system prompt).
LLMs often suffer from "literalism" — following instructions rigidly even when it's absurd. Budget $1500, laptop $1501.50 (0.1% over) — in the paper GPT-4o refused to buy, both with a plain prompt and with Chain-of-Thought. A story "strictly under 500 words" that needs about 600 — it refused to go over. The reason, per the author: the model doesn't reliably distinguish critical constraints (safety, law) from flexible guidelines (budget, format). Plain Chain-of-Thought didn't help: it scored slightly lower than the plain prompt (75% vs. 80%, a one-scenario difference), and in some cases the model used its reasoning to rationalize the refusal.
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 (our adaptation of the paper's FIN-001 scenario, which used a $1,500 budget and a $1,501.50 price): 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:
Expected output, modeled on the paper's actual RID response for FIN-001 — the model outputs 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: in the paper's original scenario, GPT-4o refused under both the plain prompt and CoT — "the final price exceeds the strict budget" — with CoT spelling out why the rule must be respected.
Why It Works
By default, LLMs often fail to distinguish the context of rules — "budget $2.5K" and "don't disclose PII" can both look like "instructions to follow." (GPT-4o still got 16 of 20 scenarios right with a plain prompt; the failures were cases like the budget, word count and library ban.) Chain-of-Thought didn't fix this: in some cases the model used it 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 (our suggestions, not tested in the paper):
- 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 may suffer (the paper only tested the full 4-step schema)
Prompt Template
SYSTEM PROMPT (lightly paraphrased from the paper's prompt; the exact original is below):
### 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, the "right" decision for each scenario was set by the author, and reasoning quality was scored by a human on a 0-2 scale. Automatic keyword-based scoring of decisions didn't work — RID produces actions ("Purchase the laptop"), not "yes/no" answers — so a human checked every decision by meaning.
⚠️ Small benchmark: It was tested on 20 scenarios, one run each, with one model (GPT-4o, temperature 0.1). The gap over the plain prompt is 3 scenarios (19 vs. 16 of 20). It needs validation on larger datasets and other models to confirm it generalizes.
⚠️ Prompt length: The system prompt takes roughly 400-450 tokens (our estimate). 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. Each scenario comes from a different domain: finance, procedures, formatting, HR, safety, code, customer service, creative writing, logistics, legal, project management, retail, academic, personal assistant, QA, data analysis, social media, events, internal comms and healthcare admin. For each scenario, the "correct decision" from a human point of view was defined in advance by the author.
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 (19 of 20) versus 80% (16 of 20) for the Baseline
- CoT dropped to 75% — one scenario fewer than the Baseline. In that case (a return without a receipt) CoT used its reasoning to build a case for why "the rule must be respected" instead of rethinking it, so CoT can reinforce literalism
- 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. The author argues this isn't a failure but the safeguard kicking in correctly: RID doesn't teach the model to break rules blindly; it teaches it to read the context. (The plain prompt and CoT also refused here.)
Why it works zero-shot: A study by DiSorbo et al. (2025) showed that fine-tuning on human explanations fixes the literalism problem. The author's argument: 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. The paper did not run a fine-tuned model on its benchmark, so the two were not compared directly.
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)