Derivation Prompting: A Logic-Based Method for Improving Retrieval-Augmented Generation
This paper introduces Derivation Prompting, a novel logic-based prompting technique for Retrieval-Augmented Generation that constructs interpretable derivation trees to systematically reduce hallucinations and erroneous reasoning in knowledge-intensive tasks.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a very smart, well-read librarian (the AI) who is great at answering questions but sometimes makes things up or gets confused when the answer isn't immediately obvious. This is a common problem with current AI models, especially when they are asked to answer specific questions based on a pile of documents.
This paper introduces a new way to talk to this librarian called Derivation Prompting. Instead of just asking, "What is the answer?" and hoping for the best, the authors teach the librarian to build the answer step-by-step, like solving a puzzle or proving a math problem.
Here is how it works, broken down into simple concepts:
1. The Problem: The "Hallucinating" Librarian
Usually, when you ask an AI a question, it grabs a few relevant pages from a book and tries to write an answer immediately. Sometimes, it gets it right. But often, it might "hallucinate"—meaning it confidently states something that isn't actually in the book, or it mixes up facts. It's like a student who guesses the answer on a test because they think they know it, rather than looking at the textbook.
2. The Solution: Building a "Logic Tree"
The authors suggest a new method inspired by logic proofs. Imagine you are building a tree.
- The Roots: These are the facts you found in the documents (the "hypotheses").
- The Branches: These are the steps you take to connect those facts.
- The Fruit: This is the final answer.
Instead of jumping straight to the fruit, the AI is forced to grow the branches first. It has to follow a specific set of rules (like a recipe) to combine the facts.
3. The Rules: The AI's "Toolbox"
The paper defines a small set of "moves" the AI can make, similar to moves in a board game. For example:
- Extract: "Take this specific sentence from the document."
- Combine: "Take Fact A and Fact B and put them together."
- Refine: "Reword this fact to fit the question better, but don't change the meaning."
- NoInfo: "If none of the facts help, admit that you don't know."
The AI must pick a rule, apply it to the facts, and write down the result. Then, it looks at that result and decides: "Is this the final answer? If not, I need to use another rule on this new result."
4. Why This Helps: The "Construction Site" Analogy
Think of a normal AI answer like a contractor who just throws up a wall and hopes it stands. If the wall is crooked, you don't know why until it falls.
Derivation Prompting is like a contractor who has to show you the blueprints and the step-by-step construction log.
- Interpretability: Because the AI builds a "tree" of steps, you can look at the middle branches and say, "Wait, you combined these two facts wrong," or "You made up a fact here." It's much easier to spot the mistake because the path is visible.
- Control: By forcing the AI to follow rules, it's less likely to wander off and make things up. It's like giving the AI a strict checklist; it can't skip steps or invent new ones.
5. What They Found
The authors tested this on a real-world problem: answering student questions about university administrative rules. They compared three methods:
- Long Context: Giving the AI the whole book at once.
- Standard RAG: The usual method of grabbing a few pages and answering.
- Derivation Prompting: The new step-by-step rule method.
The Results:
- The new method significantly reduced "bad" answers (answers that were wrong or made things up).
- It didn't necessarily make the AI faster at finding the right answer, but it made the answers it did give much more reliable.
- It worked best with a very smart AI model (Claude Opus). A smaller, less powerful model (Claude Haiku) could follow the rules but sometimes got stuck or produced fewer high-quality answers, showing that the AI needs to be "smart enough" to follow the logic instructions.
The Bottom Line
This paper proposes a way to stop AI from guessing by forcing it to "show its work" using a logical, rule-based tree structure. It turns the AI from a confident guesser into a careful, step-by-step problem solver, making it much safer to use for important, fact-based questions.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.