← Back to work

Project detail

MARD: giving recursive LLM calls a map of the document

A metadata envelope that makes long-document reasoning with Recursive Language Models cheaper, more stable and traceable.

PythonOpenAI API (GPT-5.2 / GPT-5-mini)PydanticRecursive Language ModelsLaTeX

Problem

Recursive Language Models let an LLM read documents far larger than its context window by exploring them through code, but every sub-call receives a raw slice and nothing else.

Solution

Co-authored Metadata-Augmented Recursive Decomposition (MARD), which passes a small envelope (document skeleton, accumulated findings, parent directive) into every sub-call. A frontier Scout produces a schema-validated concept graph, and a parallel budget-model Swarm builds dependency-ordered study material from it.

Impact

On a 939-page textbook MARD used 15.8× fewer input tokens (20.6× on a second book) and produced a repeatable structure of 83–84 concepts, where the vanilla RLM baseline varied from 75 to 190 across three identical runs.

Team

Parth Sangani, Anugrah, Arav, Tanish, Prashasti, Dr. Soni Sweta

The problem

A 939-page book is about 617,000 tokens, far beyond a context window. Chunking and retrieval discard information before the model decides what matters. RLMs keep the book outside the prompt, but their sub-calls are blind: no document, no position, no prior findings, no purpose.

The idea

A metadata envelope with three parts: skeleton S(D), findings F(c) and directive d(c). It flows down into every call. The library's own metadata flows up and is only a log.

How it works

Pass 0 extracts the skeleton from the text. Pass 1 explores chapter by chapter with the growing envelope and compiles a typed Master Plan; a malformed plan fails loudly. A parallel Swarm of cheap models then builds each section, joined in dependency order.

Results

  • 15.8× fewer input tokens, and 20.6× on a second book.
  • 83–84 concepts across repeats, versus 75–190 for vanilla RLM (<2% variance).
  • Quality was indistinguishable from the baseline.
  • The findings channel carries the effect: removing it dropped cross-chapter linkage from 0.917 to 0.014. The skeleton channel did not earn its cost.
  • On structure-destroyed input, MARD halted at zero cost, while the baseline silently wrote confident, ungrounded text.

What's next

Give builders the cited source text, run the remaining ablations, and expand the corpus.