Apply to my task
arXiv:2511.14813 ★ 78 Nov 18, 2025

Derivation Prompting: How to Make an LLM Actually Apply the Rules It Finds

Key result

Finding: LLMs recognize a transformation rule (for example, 'if headcount grew 2.5x → licenses grow 2.5x too'), but 55% of the time they don't apply that rule to their answer. The model is like a student in an exam who can explain the formula but ignores it in the calculation. Derivation Prompting makes the model explicitly trace the link between the first and second question through three mandatory steps. The trick: three steps create a forced chain: you can't answer step 3 (apply the change) without doing step 1 (what changed) and step 2 (what change should follow). Result: +15.2% accuracy, beating Chain-of-Thought and Few-Shot.

Derivation Prompting: How to Make an LLM Actually Apply the Rules It Finds

Derivation Prompting: How to Make an LLM Actually Apply the Rules It Finds

02

TL;DR

Derivation Prompting (DP) is a technique for tasks where the second question is linked to the first through a logical transformation. Instead of solving each question from scratch, DP makes the model explicitly trace three steps: what changed in the input → what change in the output should follow → apply that change to the first answer.

The researchers found a critical LLM weakness: models can recognize a transformation rule (for example, "if you swap the start and end in a graph, the path should reverse"), but 55% of the time they don't apply that rule to their answer. The model sort of "knows" what to do but "forgets" to do it. GPT-4o and Claude3.5 scored below 60% on tests of reasoning consistency.

DP fixes this with forced linkage: three explicit steps in the prompt keep the model from "losing" the rule it found on the way to the answer. The result is a 15.2% improvement, beating Chain-of-Thought, Few-Shot and other standard techniques.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

03

Method Blueprint

STEP 1: Answer the first question → [answer_1]
STEP 2: For the second question:
        2.1 Explain what changed in the input
        2.2 Explain what change in the output should follow
        2.3 Apply that change to [answer_1] → [answer_2]

Everything runs in a single conversation with two consecutive questions.

04

Example in Practice

Task: You're putting together a sales proposal for a client. First comes the base version for 100 employees. Then the client asks: "What about 250 employees?"

Prompt:

Question 1: Calculate the cost of rolling out a CRM for a company with 100 employees. 
License: $15/user/month. Implementation: flat $5,000. Training: $40/user.

Question 2: Now calculate it for 250 employees.

For the second question:
(1) Explain what changed in the input compared to the first question
(2) Explain what change in the calculation should follow from that change
(3) Apply that change to the first answer to get the second one

Result: The model first produces the calculation for 100 people. Then for the second question it explicitly shows:

  • What changed: the number of employees (100 → 250)
  • Which components depend on that number: licenses (×250), training (×250), implementation (unchanged)
  • It applies the multiplier to the corresponding lines of the first calculation

Without DP the model often recalculates everything from scratch and can make an arithmetic mistake or "forget" the fixed component.

05

Why It Works

The LLM weakness: Models treat each question as an isolated task, even when the context clearly links them. They can derive the transformation rule, but that reasoning gets "lost" by the time the final answer is generated. In 55% of errors, the model correctly described the rule in its intermediate steps but gave an answer that contradicted it.

The LLM strength: Models are excellent at following structured instructions with explicit steps. When the steps are numbered and each one requires a specific output, the model can't "jump" to the answer and skip the logic.

DP mechanics: The three steps create a forced chain: you can't answer step 3 without completing steps 1 and 2. This makes the model "keep the transformation rule in focus" all the way to the end.

Control knobs:

  • Step granularity → for complex transformations you can split step 2.2 into sub-steps
  • Output format → you can ask for a "before → after" table
  • Verification → add step 2.4 "Check that the change was applied correctly"
06

Prompt Template

Question 1: {first_question}

Question 2: {second_question_with_change}

For the second question:
(1) Explain what changed in the input compared to the first question
(2) Explain what change in the output should follow from this change in the context of this task
(3) Apply this change to your answer to the first question to get the answer to the second

Placeholders:

  • {first_question}: the base task
  • {second_question_with_change}: the same task with a changed parameter (a number, a condition, an order)
07

Limitations

⚠️ Requires a pair of linked questions: DP works when there's an explicit logical link between the questions. For standalone tasks it's useless.

⚠️ Implicit transformations: If the link between the questions isn't obvious or requires domain knowledge the model lacks, DP won't help: the model will misidentify the rule at step 2.2.

⚠️ Simple tasks: For trivial changes (just recalculating with a new number), DP adds tokens with no benefit.

08

How They Tested It

A team from East China Normal University formalized the concept of a Derivation Relation: a mathematical description of how changes in the input relate to changes in the output. The idea is simple: if Mike is 5 and his dad is 35, then when Mike turns 23, his dad should be 53, because the difference is preserved.

They tested 6 models (GPT-3.5, GPT-4o, Claude3.5, Qwen, Kimi, O1-mini) on 7 task types: multiple choice, image recognition, code, logic, math, algorithms, spatial reasoning. For each task they built question pairs with three kinds of transformations: ID (the answer should stay the same), GE (general rules such as symmetry), TS (domain-specific rules).

The main discovery is a classification of errors:

  • DR-Unaware (25%): the model doesn't notice the questions are related at all
  • DR-Mislocalized (20%): it notices the link but identifies the wrong rule
  • DR-Misapplied (55%): it identifies the right rule but doesn't apply it to the answer

That explains why DP works: it attacks the most common error. A comparison with Chain-of-Thought showed that just "thinking out loud" isn't enough; you need an explicit step that applies the rule to the answer.

09

Original Prompt from the Paper

For the second question, you need to: 
(1) first explain what change has occurred in the input compared to the first question; 
(2) explain what kind of change in output should result from this change in input in the context of this task; 
(3) apply this output change to your original answer to the first question in order to solve the second question.

Context: This prompt was appended after the question pair in all Derivation Prompting experiments.

10

Adaptations

💡 Adapting it for "what if" analysis

A classic business task: you have a base scenario and want to understand the impact of changing one parameter.

Base scenario: {description_of_situation_with_numbers}

Question: What changes if {parameter} becomes {new_value}?

Answer step by step:
(1) Which parameter changed and how exactly
(2) Which elements of the result depend on that parameter
(3) Recalculate only the dependent elements and leave the rest unchanged

🔧 Technique: Add an explicit check

If the task is accuracy-critical, add a fourth step:

(4) Check: does the change in the answer match the change in the input? If not, fix it.

This creates an extra control loop.

💡 Extrapolation: A chain of transformations

For a series of linked questions (A → B → C → D), you can apply DP in a cascade:

Question 1: {base}
Question 2: {change_1}
Question 3: {change_2}

For each subsequent question:
(1) What changed relative to the previous one
(2) What change in the output should follow
(3) Apply it to the previous answer

Keep a change log table: Question | Input change | Output change | Answer
11

Resources

Paper: "DEVAL: A Framework for Evaluating and Improving the Derivation Capability of Large Language Models"

Authors: Yifan Li, Qin Li, Min Zhang, Peixin Wang (East China Normal University, Shanghai)

Related concepts: Chain-of-Thought, Step-Back Prompting, Few-Shot Learning


Research digest

Key result

Finding: LLMs recognize a transformation rule (for example, 'if headcount grew 2.5x → licenses grow 2.5x too'), but 55% of the time they don't apply that rule to their answer. The model is like a student in an exam who can explain the formula but ignores it in the calculation. Derivation Prompting makes the model explicitly trace the link between the first and second question through three mandatory steps. The trick: three steps create a forced chain: you can't answer step 3 (apply the change) without doing step 1 (what changed) and step 2 (what change should follow). Result: +15.2% accuracy, beating Chain-of-Thought and Few-Shot.

Principle

For a pair of linked questions, set up a three-step structure: Step 1: Solve the first question → get a base answer. Step 2: For the second question: - (2.1) Explain what changed in the input - (2.2) Explain what change in the output should follow - (2.3) Apply that change to the base answer The three steps can't be skipped: the model can't generate step 3 without doing 2.1 and 2.2. This keeps the transformation rule in focus all the way to the end. Without an explicit structure, the model reasons about the rule in intermediate steps, but by the time of the final answer that reasoning gets "lost".

Why it works

The LLM weakness: models treat each question as an isolated task, even when the context clearly links them. GPT-4o and Claude-3.5 scored below 60% on tests of reasoning consistency (derivation capability). In 55% of errors, the model correctly described the rule in its intermediate steps but gave an answer that contradicted it. Forced steps keep the model from jumping to the answer and skipping the logic. When the steps are numbered and each one requires a specific output, the model can't "forget" the rule along the way. It's like a pilot's checklist: each item blocks the move to the next one until it's done.

When to apply

For tasks where the second question is linked to the first through a logical transformation: calculations with a changed parameter (cost for 100 employees → for 250), graph problems (shortest path A→B → path B→A), text analysis with a changed condition. Especially when the model gives correct reasoning but a wrong final answer: that's a sign the rule is getting "lost" between derivation and application. NOT a fit for standalone tasks with no link to a previous question, for trivial changes (just recalculating with a new number), or for implicit transformations that require domain knowledge.

Mini recipe

1. Ask the first question: the base task with concrete parameters. Get an answer. 2. Ask the second question: the same task with a changed parameter (a number, a condition, an order). 3. Add the three-step structure: `For the second question: (1) Explain what changed in the input compared to the first question (2) Explain what change in the output should follow from that change (3) Apply that change to your answer to the first question` 4. Optional: for complex transformations, split step (2) into sub-steps, ask for a "before → after" table, add a verification step.

Examples

[BAD]: `Calculate the CRM cost for 100 employees. [got an answer] Now for 250 employees` The model recalculates everything from scratch. It may forget the fixed component (implementation) or make an arithmetic mistake. The link between the calculations is lost. [GOOD]: `Question 1: Calculate the CRM cost for 100 employees. License $15/user/month, implementation $5,000, training $40/user. Question 2: Now for 250 employees. For the second question: (1) Explain what changed in the input (2) Explain which components of the calculation depend on headcount (3) Apply the multiplier to the corresponding lines of the first calculation` The model will explicitly show: headcount grew 2.5x → multiply licenses and training by 2.5, implementation stays the same → apply to the first calculation. The rule doesn't get lost.

In plain words

LLMs behave like talented but wildly careless interns: they can nail the first task perfectly, then on the second one, which builds on the first, drift off and start reinventing the wheel. The problem is that models treat every new request as an isolated island, even when you're just asking them to change one detail. Derivation Prompting (DP) cures this amnesia by making the model not just spit out an answer but build a logical bridge between the old and the new. Instead of guessing, the AI now has to spell out the chain: what changed in the conditions, how that affects the result, and how to rework the first answer for the new reality.

It's like asking a cook to make a pot of chili and then saying: "Now make the same thing, but vegetarian". A typical AI might forget to take the beef out or cook a whole different stew because "well, it's a different dish". DP makes the cook say out loud: "OK, the meat is out of the recipe, so we'll get the heartiness from extra beans; we take the base of the first chili and just swap one ingredient". That rules out the situation where the model understands the task but trips over its own feet at the last moment because it lost focus.

The method comes down to three strict steps: first, lock in the base answer; then make the model clearly articulate the delta in the input and output; and only then synthesize the final result. The study showed that in 55% of cases models get it wrong not because they're dumb, but because their reasoning "detaches" from the final text. They can write down the correct transformation rule and still give an answer that contradicts it. Explicit derivation makes the AI literally rub its own nose in its conclusions so it doesn't contradict the logic from one step earlier.

It was tested on hard logic tasks, but the principle is universal for any content work. It's perfect for reworking sales proposals for a different budget, adapting code to other libraries, or rewriting copy in a different tone of voice. If you need to get from "version A" to "version B", don't just ask the model to "do it": make it use the derivation method. It turns a lottery into a predictable engineering process where every change is justified.

Bottom line: stop counting on the "magic" of big models; they fumble simple connections far too often. Use the DEVAL framework and the DP technique to tie the model's answer to the context with ironclad logic. The key takeaway: make the AI explain the difference between tasks before it starts solving them. It's the only way to make sure the model doesn't produce hallucinatory nonsense where all you needed was to add one or switch the style.

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 Derivation Prompting: How to Make an LLM Actually Apply the Rules It Finds arXiv:2511.14813

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

Get the week’s best papers by email

One email on Sundays with the highest-rated new techniques. Unsubscribe with one click.