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 $2,500, item $2,502.50 (0.1% over) — the model refuses to buy. The task says "5 bullet points," the substance fits in 4 — it adds filler to check the box. LLMs suffer from literalism: they follow instructions blindly 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 — works in a regular chat without fine-tuning.

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.


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

  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: Baseline or CoT will refuse — "budget exceeded, purchase not allowed" — with a detailed explanation of why the rule must be respected.


04

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

05

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.


06

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.


07

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

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


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 $2,500, item $2,502.50 (0.1% over) — the model refuses to buy. The task says "5 bullet points," the substance fits in 4 — it adds filler to check the box. LLMs suffer from literalism: they follow instructions blindly 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 — works in a regular chat without fine-tuning.

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 don't distinguish the context of rules — to them "budget $2.5K" and "don't disclose personal data" look the same: "instructions to follow." Chain-of-Thought only makes it worse: the model gets the chance 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. About ~450 tokens. 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: 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 either refuses ("budget exceeded") or asks for clarification. 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 are pathological straight-A teacher's pets. To them, every instruction in a prompt is sacred truth that must never be broken. The model sees no difference between a critical ban on leaking passwords and 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." This is a fundamental bug: LLMs lack contextual flexibility and don't get the spirit of a rule, clinging only to its letter.

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 run the situation through three filters first: relevance, intent and degree of deviation. 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.

Although it was tested on procurement and office tasks, the principle is universal. It works anywhere there are strict rules that sometimes need to bend for the sake of common sense: from content moderation to writing code. Right now most models fumble these "exceptions," retreating into a defensive crouch and endless apologies. 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 will always take 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 ignore minor mismatches for the sake of results. 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.