LEDGER: Scaling Agentic Document Editing with Dependency-aware Graph Retrieval
The paper introduces LEDGER, a framework that employs dependency-aware graph retrieval to efficiently guide agentic document editing, significantly improving consistency and reducing token usage across various models by explicitly modeling document structure and dependencies.
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 the editor-in-chief of a massive, 100-page instruction manual. Suddenly, your boss asks you to change a specific term in Chapter 3.
The Old Way (The "Full-Document" Problem):
In the past, to make that one small change, you had to read the entire 100-page book from start to finish every single time. Why? Because changing "Microsoft" to "MS" in Chapter 3 might accidentally break a reference in Chapter 80, or change the tone of a paragraph in Chapter 50 that you didn't even look at. It's slow, exhausting, and you might miss a tiny detail because you were overwhelmed by the sheer volume of text.
The New Way (LEDGER):
The paper introduces LEDGER, a smart system that acts like a super-organized librarian with a magical, living map of the document.
Here is how LEDGER works, using simple analogies:
1. The "Living Map" (Dependency Graph)
Instead of just seeing a pile of paper, LEDGER first builds a lightweight map of the document.
- Nodes: Every paragraph, figure, and section is a "stop" on the map.
- Edges (The Roads): LEDGER draws lines connecting these stops based on how they relate.
- Explicit Roads: "Figure 2" points directly to "The Linear Scaling Graph."
- Implicit Roads: "This result" points back to the experiment described three paragraphs ago.
- Semantic Roads: Two paragraphs discussing "climate change" are connected because they talk about the same topic, even if they don't mention each other directly.
This map is built once. It's like having a subway map of the document where you can instantly see which stops are connected, without having to read every station's announcement.
2. The "Smart Search" (Graph-Guided Retrieval)
When you ask the AI to "Update the tone of Section 4," LEDGER doesn't dump the whole 100-page book into the AI's brain.
- The Old Way: The AI tries to hold the whole book in its head at once. It gets confused, wastes energy, and might forget the important parts.
- The LEDGER Way: The system looks at the map. It sees that Section 4 is connected to Section 2 (because Section 4 references it) and Section 9 (because Section 9 depends on Section 4).
- The Result: It only grabs the specific "stops" (paragraphs) on the map that are connected to Section 4. It ignores the rest of the book. This is like telling a taxi driver, "I only need to go to the three stops connected to my current location," rather than driving the whole city.
3. The "Safety Check" (Consistency Verification)
After the AI makes the edit, LEDGER doesn't just walk away. It acts like a quality control inspector.
- It checks the map to make sure no "roads" are broken. Did the edit accidentally delete a reference? Did it change a word that makes a later paragraph confusing?
- If something looks wrong, it fixes it before you ever see the final document.
Why is this a big deal?
The paper tested this on 1,900 different editing tasks using six different AI models. Here is what they found:
- Better Accuracy: LEDGER kept the document consistent 76% of the time, compared to only 56% for the old method. It stopped the AI from making "silly mistakes" where it changed one thing and broke something else far away.
- Faster & Cheaper: Because LEDGER only reads the necessary parts (about 10-15% of the document), it uses 85% fewer "tokens" (the currency AI uses to process text). It's like reading a summary of the relevant chapters instead of the whole library.
- Smarter, Not Harder: Surprisingly, LEDGER worked so well that even a "dumb" AI (one with low reasoning effort) using the map performed better than a "smart" AI (high reasoning effort) trying to read the whole book. It proved that having a good map is often more important than having a super-brain.
The Bottom Line
LEDGER solves the problem of editing long documents by giving the AI a structured map of how everything connects. Instead of blindly guessing or reading the whole book, the AI knows exactly which pieces of the puzzle to look at, ensuring that when you change one piece, the whole picture stays perfect.
Note: The paper specifically mentions this works for structured documents like reports, manuals, and papers with clear sections. It notes that it might struggle with creative writing or messy, unformatted text where the "map" is hard to draw.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.