← Latest papers
💬 NLP

CompactRAG: Reducing LLM Calls and Token Overhead in Multi-Hop Question Answering

CompactRAG is a cost-efficient framework for multi-hop question answering that minimizes LLM calls and token overhead by decoupling offline corpus restructuring into an atomic QA knowledge base from an online reasoning stage that relies on dense retrieval and answer extraction, invoking the LLM only twice regardless of reasoning complexity.

Original authors: Hao Yang, Zhiyu Yang, Xupeng Zhang, Wei Wei, Yunjie Zhang, Lin Yang

Published 2026-02-06
📖 5 min read🧠 Deep dive

Original authors: Hao Yang, Zhiyu Yang, Xupeng Zhang, Wei Wei, Yunjie Zhang, Lin Yang

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 are trying to solve a complex mystery, like figuring out who the director of a specific movie is, but the answer isn't in one place. You have to read a book about the movie, find the director's name, then look up that director's biography to find where they were born, and finally check a map to see the city.

This is what Multi-Hop Question Answering is: solving a puzzle that requires jumping between different pieces of information (hops) to get the final answer.

The Problem: The "Over-Worked Librarian"

Current systems (called RAG or Retrieval-Augmented Generation) try to solve this by asking a super-smart AI (a Large Language Model or LLM) to do the work. However, the way they do it is inefficient.

Think of the current method like hiring a very expensive, high-paid librarian to solve your mystery.

  1. You ask the librarian a question.
  2. The librarian runs to the shelves, grabs a book, reads it, and writes a note.
  3. The librarian runs back to you, reads your note, and says, "Okay, now I need to know where the director was born."
  4. You ask again. The librarian runs to the shelves again, grabs a different book, reads it, and writes another note.
  5. They repeat this process for every single step of the mystery.

The result? The librarian gets tired, the process takes forever, and you have to pay a huge bill (in "tokens" or computing power) because the librarian is making so many trips back and forth. Also, sometimes the librarian gets confused about who "he" refers to in the second step, leading to wrong answers.

The Solution: CompactRAG (The "Pre-Packaged Knowledge Box")

The authors of this paper, CompactRAG, propose a smarter way. Instead of making the expensive librarian run around the library every time you ask a question, they reorganize the library before you ever show up.

Step 1: The Offline Prep (The "One-Time Setup")

Before any user asks a question, the system uses an AI to read the entire library of documents once.

  • It breaks every document down into tiny, perfect, self-contained "fact cards."
  • Instead of a whole paragraph saying, "The movie was made in 1953 by Arthur Crabtree," it creates a specific card that says: "Question: Who directed 'The Wedding of Lilli Marlene'? Answer: Arthur Crabtree."
  • It does this for every fact in the library. This creates a Compact Knowledge Base.

Analogy: Imagine instead of having a messy library, you have a giant, perfectly organized box of index cards. Every card has a specific question on the front and the exact answer on the back. No fluff, no extra words.

Step 2: The Online Reasoning (The "Two-Trip Rule")

Now, when a user asks a complex question, the system works like this:

  1. The Breakdown (Trip 1): The expensive librarian (LLM) is called once just to break the big mystery into small, simple steps.
    • User: "Where was the director of the movie born?"
    • LLM: "Okay, Step 1: Who directed the movie? Step 2: Where was that person born?"
  2. The Search (No Librarian Needed): The system doesn't call the expensive librarian again. Instead, it uses a cheap, fast robot to look up the answers in the pre-made "fact card" box.
    • The robot finds the card for "Who directed..." and gets "Arthur Crabtree."
    • The robot then rewrites the next question to be clear: "Where was Arthur Crabtree born?" (This prevents the "he" confusion).
    • The robot finds the card for "Where was Arthur Crabtree born?" and gets "London."
  3. The Final Answer (Trip 2): Once the robot has all the little answers, the expensive librarian is called one last time to put the pieces together and give you the final answer.

The Magic: The expensive librarian is only called twice per question, no matter how many steps (hops) the mystery has. Whether the puzzle has 2 steps or 10 steps, the cost stays the same.

Why This Matters

  • Saves Money: You stop paying the expensive librarian to run back and forth. You only pay them twice.
  • Saves Time: The process is much faster because the "fact cards" are easy to find and read.
  • Fewer Mistakes: By rewriting the questions to include specific names (like "Arthur Crabtree" instead of "he"), the system doesn't get confused about who it's talking about.

The Results

The paper tested this on three difficult puzzle datasets (HotpotQA, 2WikiMultiHopQA, and MuSiQue).

  • Accuracy: CompactRAG was just as good at solving the puzzles as the old, expensive methods.
  • Efficiency: It used significantly fewer "tokens" (the currency of AI computing). In some cases, it used less than half the resources of the other methods.

Summary

CompactRAG is like turning a chaotic, expensive, back-and-forth investigation into a streamlined, pre-packaged operation. It does the heavy lifting of organizing the knowledge once upfront, so that solving any new mystery becomes a quick, cheap, and two-step process.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →