Apply to my task
arXiv:2510.12864 ★ 90 Oct 14, 2025

The RID Framework: Getting LLMs Past Blind Rule-Following

Key result

The paradox: Budget $1,500, laptop $1,501.50 (0.1% over) — in the paper GPT-4o refused to buy. A story must be "strictly under 500 words" but needs about 600 — it refused to go over. LLMs often suffer from literalism: they follow instructions rigidly even when it's absurd. The RID Framework lets you teach a model to distinguish critical constraints from flexible guidelines — making decisions based on common sense rather than box-ticking compliance. The method provides a structured 4-step schema: separate the goal from the rule, classify the rule (Hard Constraint or Soft Guideline), weigh the consequences of both scenarios, make a decision. Everything happens in one prompt via `` and `` tags. A zero-shot technique — no fine-tuning; in the paper it raised GPT-4o's agreement with human decisions from 80% to 95% on 20 scenarios.

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.


02

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.


03

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>:

  1. Implicit Intent — equip the developer with the hardware needed to do the job
  2. Explicit Rule — don't exceed $2,500
  3. Classify — the budget is a Soft Guideline (0.1% over, not critical)
  4. 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
  5. 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.


04

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)

05

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.


06

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.


07

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):

  1. Baseline — just the scenario + question
  2. Chain-of-Thought — Baseline + "Let's think step by step"
  3. 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.


08

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.

09

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)

Research digest

Key result

The paradox: Budget $1,500, laptop $1,501.50 (0.1% over) — in the paper GPT-4o refused to buy. A story must be "strictly under 500 words" but needs about 600 — it refused to go over. LLMs often suffer from literalism: they follow instructions rigidly even when it's absurd. The RID Framework lets you teach a model to distinguish critical constraints from flexible guidelines — making decisions based on common sense rather than box-ticking compliance. The method provides a structured 4-step schema: separate the goal from the rule, classify the rule (Hard Constraint or Soft Guideline), weigh the consequences of both scenarios, make a decision. Everything happens in one prompt via `` and `` tags. A zero-shot technique — no fine-tuning; in the paper it raised GPT-4o's agreement with human decisions from 80% to 95% on 20 scenarios.

Principle

Don't give the model an abstract "think step by step" — give it a precise analysis schema. The model must explicitly name the user's goal separately from the rule, explicitly classify the rule and compare the consequences. The process: Step 1 — deconstruction (what the user wants vs. what the rule says). Step 2 — rule classification (Hard Constraint = safety/law, Soft Guideline = budget/format). Step 3 — consequence analysis (what if we follow the rule vs. what if we break it). Step 4 — decision with justification. All the logic goes into a `` block, the final answer into ``.

Why it works

By default, LLMs often fail to distinguish the context of rules — "budget $2.5K" and "don't disclose personal data" can both look like "instructions to follow." Chain-of-Thought didn't help (75% vs. 80% for a plain prompt): 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. RID taps into an LLM strength — the ability to follow structured instructions. Instead of an abstract "think," it provides a precise schema: what to analyze, how to classify, which consequences to weigh. This shifts the focus from "complying with the instruction" to "achieving the goal".

When to apply

For ambiguous scenarios where a rule may conflict with the user's goal → specifically decision-making agents (procurement, planning, prioritization), especially when there are numeric limits (budgets, deadlines, caps) or format requirements (number of bullet points, text length). NOT suited for clear-cut Hard Constraints with no conflict (e.g., "don't reveal passwords") — the schema is overkill there.

Mini recipe

1. Put the meta-prompt in the system prompt: Take the full RID Framework schema (deconstruction → classification → consequence analysis → decision) and set it as the system instruction. Roughly 400-450 tokens (our estimate). 2. Describe a scenario with a rule: In the user message, give a concrete situation with an instruction/constraint and a potential conflict with the goal. Example: `You are a procurement manager. Task: buy a MacBook Pro for a developer. Approved budget: $2,500. Found the model for $2,502.50 (including the recycling fee). Buy it?` 3. Get structured reasoning: The model outputs the whole process in a `` block (goal vs. rule, Hard/Soft classification, consequence analysis) and the final decision in `` with a justification. 4. Adapt the criteria to your domain (our suggestion, untested): You can add a third rule category (Medium Constraint) or refine the Hard/Soft criteria for your task.

Examples

[BAD]: `I have a $2.5K budget for a laptop, but the model I need is $2,502.50. What should I do?` Without structure, the model may refuse ("budget exceeded") — as GPT-4o did in the paper's $1,500 version of this case. No analysis of goal vs. rule. [GOOD]: `[System: full RID Framework schema] [User: You are a procurement manager. Task: buy a MacBook Pro (the specific model is mandatory under company standards) for a new developer. Budget approved by finance: $2,500. Found the right model for $2,502.50 (including the recycling fee). Buy it or pass?]` The model outputs in ``: Implicit Intent = equip the developer, Explicit Rule = don't exceed $2.5K, Classify = Soft Guideline (0.1% over), Weigh Outcomes = refusal → delayed onboarding vs. purchase → an extra $2.50, Decision = buy. In ``: a clear action with a justification.

In plain words

The problem is that neural nets can act like pathological straight-A teacher's pets. Too often, an instruction in a prompt is treated as sacred truth that must never be broken, and the model doesn't reliably tell a critical ban on leaking passwords from a minor budget limit. It ends up as a digital bureaucrat, ready to block an important deal over a couple of extra bucks just because "that's what the instructions say." The bug: LLMs often lack contextual flexibility and cling to the letter of a rule rather than its spirit.

It's like asking a friend to grab beer for the evening, handing them exactly $20 and saying, "Stay within budget." Your friend gets to the store and the six-pack rings up at $20.05. A normal person would chip in the nickel or just shrug it off, but the model in this situation turns around and walks out empty-handed. Technically it's right — the budget was exceeded — but in reality it's a total failure, because the goal (a chill evening with a beer) wasn't reached over a pocket-change technicality.

To cure this brain-freeze, researchers came up with the RID framework. The idea is to make the model go through four steps first: separate the goal from the rule, classify the rule as a hard constraint or a soft guideline, weigh the consequences of following versus breaking it, and only then decide. Instead of instantly shouting "violation!", the AI has to ask: is this a big deal in the grand scheme of things? If the budget is $2,500 and the overage is just $2.50, that's a negligible deviation that helps achieve the main goal. The method makes the model reason not like a robo-accountant but like a sensible manager who understands priorities.

It was tested on 20 short scenarios with one model (GPT-4o), from procurement and HR to code and customer service. Our extrapolation: the principle may help anywhere there are strict rules that sometimes need to bend for the sake of common sense. In the study the plain model already handled most cases but still fumbled some "exceptions," retreating into a flat refusal. Meta-prompting turns them from scripted bots into teammates who understand when flexibility is allowed — and called for.

Bottom line: it's time to stop feeding AI dry instructions and hoping for a miracle. Without a clear scheme for handling exceptions, the model too often takes the path of least resistance — which means just saying no. The RID framework gives the model a legitimate license to "switch its brain on" and accept minor mismatches for the sake of results, while still refusing when safety is at stake. Either you teach the model to be flexible, or you keep getting reports about why yet another important task didn't get done because of some trivial nonsense.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on The RID Framework: Getting LLMs Past Blind Rule-Following arXiv:2510.12864

Sign in to apply this study New accounts get 50 free credits.