Skip to main content
Some documents do not chunk well. A GAV, a pension reglement, a cantonal ordinance — these are long, deeply hierarchical, and full of cross-references, and the answer to “what notice period applies to a part-time employee in their fourth year?” lives in the structure, not in a paragraph that happens to be lexically similar to the question. Document intelligence takes a different approach: it builds a table-of-contents tree of the document and reasons down it to a cited section. This is ADR-008 — a TypeScript port of PageIndex (VectifyAI, MIT).

Why not chunk-and-embed

For a 200-page reglement where “Art. 14 applies subject to Art. 9 para. 2”, the second column is the one that gives a defensible answer.

How it works

1

Build the tree

The document is parsed into a hierarchical outline — parts, chapters, articles, paragraphs — with each node summarised by what it covers.
2

Assemble

Nodes are assembled into a navigable tree that can be rendered as an outline.
3

Search by reasoning

A query walks the tree: at each level the model decides which branch could contain the answer, and descends. The result is a node path, not a similarity score.
4

Answer with a citation

The answer names the section it came from, so it can be checked.

Current scope

Document intelligence shipped as an evaluation spike. Tree construction and reasoning-based search are implemented and tested; persistence, access control and i18n are MVP follow-ups, and there is no API route or UI surface yet. Treat it as a building block, not as an end-user feature.

Suitable documents

  • Collective labour agreements (GAV / CCT)
  • Pension fund reglements
  • Cantonal and federal ordinances
  • Long employment contracts and their annexes
  • Internal policy handbooks
For short documents — a single contract, a certificate — ordinary semantic search is the better tool.

Provider

Claude, through the platform’s central model configuration (document-intelligence.tree), which is Opus-class by default because the quality of the structural reasoning is the whole feature.