← Latest papers
💬 NLP

Inject or Navigate? Token-Efficient Retrieval for LLM Analysis of Transactional Legal Documents

This paper demonstrates that replacing full-corpus injection with structured retrieval methods, particularly LLM navigation over a compact index (NAVINDEX), achieves comparable accuracy to baseline injection on transactional legal document benchmarks while significantly reducing token consumption, context size, and operational costs.

Original authors: Mahmoud Hany, Mourad ElSheraey, Mahmoud Said, Peter Naoum

Published 2026-07-08
📖 4 min read☕ Coffee break read

Original authors: Mahmoud Hany, Mourad ElSheraey, Mahmoud Said, Peter Naoum

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 a lawyer trying to solve a complex puzzle. You have a massive stack of legal documents (contracts, amendments, side letters) and a very smart but expensive assistant (an AI) who can read them.

The paper asks a simple question: What is the best way to give these documents to the AI so it can answer your questions accurately without wasting money or time?

Here is the breakdown of the three methods they tested, explained with everyday analogies.

The Problem: The "Whole Library" Approach

The Baseline (Inject):
Imagine you have a question about a specific clause in a contract. The simplest way to answer it is to hand the AI the entire library of documents every single time you ask a question.

  • Pros: The AI sees everything, so it can't miss anything.
  • Cons: It's incredibly expensive and slow. It's like hiring a librarian to read 500 books to you just to find the price of a single item on page 12 of Book #42. Also, if the library gets too big, the AI gets "confused" and forgets the middle parts of the story.

The Contenders: Two Smarter Ways to Search

The researchers tested two "smart retrieval" methods that try to find only the relevant pages before showing them to the AI.

1. The "Semantic Search" Method (NavEmbed)

The Analogy: The Keyword Index.
Instead of reading the whole book, the AI looks at your question, understands the meaning of the words, and searches a digital index to find the 10 most similar paragraphs.

  • How it works: It uses "vectors" (mathematical representations of meaning) to guess which pages are relevant.
  • The Result: This method was very good at saving money. It reduced the amount of text the AI had to read by 17 to 30 times compared to the "Whole Library" method.
  • The Catch: Sometimes, legal documents rely on specific structures (like "Section A refers to Section B"). Pure meaning-matching sometimes misses these structural links, leading to a few missed answers.

2. The "Structured Navigation" Method (NavIndex)

The Analogy: The Table of Contents with a Map.
This method doesn't just guess based on meaning. It builds a special map of the documents that explicitly notes: "This paragraph defines a term," "This clause refers to that schedule," and "This amendment overrides the original."

  • How it works: The AI scans this compact map (which is tiny compared to the full text), picks the right "node" (page), and then fetches only that specific page and the pages it explicitly links to.
  • The Result: This was the champion. It matched the "Whole Library" method perfectly on accuracy (getting 18/18 questions right) but cost 25% less and required the AI to read 56 times less text when formulating the answer.

The "Crossover" Rule: When to Use Which?

The paper discovered a mathematical tipping point for cost, which they call the Caching Crossover.

  • The Rule: If your document stack is small (less than about 10 times the size of the specific answer you are looking for), it is actually cheaper to just dump the whole stack into the AI's memory every time, because the "discount" for re-reading cached text makes it cheap.
  • The Reality: Legal deals are usually huge. Once the documents get bigger than that threshold, the "Whole Library" method becomes a money pit.
  • The Verdict: For small, one-off tasks, dump the whole thing in. For large, complex legal deals, use the "Structured Navigation" (NavIndex) method.

Key Takeaways (The "Lessons Learned")

  1. Don't be greedy: Limiting the AI to a maximum of 10 relevant pages saved money without hurting accuracy.
  2. Structure beats keywords: Mixing standard keyword searches (like Google) with meaning-search actually made things worse and more expensive because it pulled in too much irrelevant text.
  3. What matters most: It didn't matter which "search engine" (embedding model) they used; what mattered was what information was attached to the search results. Giving the AI a map of the document's structure was far more important than the search algorithm itself.

Summary

The paper proves that for analyzing complex legal documents, you don't need to feed the AI the entire book. By building a smart, structured map of the documents and letting the AI navigate that map, you can get perfect accuracy while paying significantly less and processing much less data.

  • Small documents: Feed the whole thing in (it's cheap enough).
  • Big documents: Use the smart map (NavIndex) to save money and keep the AI focused.

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 →