Vectorless RAG (tree-index RAG): navigating a document by its outline
Vectorless RAG lets a model walk a document's outline, reading summaries level by level, instead of searching by vector similarity. Use it for long, well-structured documents where you want an explainable path to the answer.
Vectorless RAG in 60 seconds
- What: the document is stored as a tree of headings with short summaries, and a model chooses branches by reading them, one level at a time.
- Why: similarity search can miss answers that depend on where something sits in a document, or on the section the user means.
- Strengths: good for long, well-structured documents, and the path from question to passage can be shown to the user.
- Weaknesses: a model call per level, and results depend on good headings and good summaries.
- Name: this is a working name used on this site. Related research exists, but there is no single standard method.
Where this type fits
Vectorless RAG is in the structure or media family, with graph, multimodal and modular RAG. It is newer than the other types and less often named in the literature, so treat it as an emerging pattern rather than a settled category. See the overview of RAG types for the rest of the map.
The problem it solves
Vector search cuts a document into chunks and treats each chunk as an island. That loses the shape of the document. A 200-page policy has a section on 'Leave', and inside it a sub-section on 'Parental leave', and inside that a clause on 'Part-time staff'. A chunk from the last clause may say only 'the above applies pro rata'. On its own, that chunk does not mention parental leave at all, so a question about it may never find the chunk.
Similarity is also a poor fit for questions that name a place in the document. 'What does the appendix on data retention say about backups?' contains the structural clue 'appendix', which an embedding blends with everything else. A person would turn straight to the appendix. Another issue is explanation. When a vector system returns a wrong passage, the only reason it can give is 'the numbers were close', which is hard to debug and hard to trust.
Think of a lawyer opening a long contract. They do not run a similarity search. They read the contents page, jump to the relevant part, and read the headings in it until they find the clause. Vectorless RAG gives a model that same habit, and leaves a trail of the choices made along the way.
How it works
A related, well-known paper is Sarthi et al., 2024, RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval. RAPTOR builds a tree of summaries from the bottom up by clustering chunks and summarising each cluster. It still uses embeddings to search the tree. The vectorless designs described here differ in one respect: a model chooses branches by reading summaries, and no vector similarity is needed. The idea of a tree is shared. The way of searching it is not.
- Parse the structure: read the document's own outline, such as chapters, sections and sub-sections. If it has none, build one by grouping paragraphs under inferred headings.
- Summarise bottom-up: write a one or two sentence summary for each leaf passage, then for each section from its children's summaries, up to the whole document.
- Store the tree: save each node with its title, summary, children, parent and the exact text span or page range of its content.
- Navigate top-down: at query time, show the model the question and the list of top-level nodes with their summaries. It picks the most promising one or two.
- Descend: repeat with the children of the chosen nodes. Stop when the model reaches leaf passages or judges it has the right section.
- Read and answer: fetch the full text of the chosen leaves, answer from it, and cite the path, for example 'Section 4 > 4.2 > 4.2.3'.
Two ideas make this work. The first is that summaries stand in for subtrees. The model does not need to read a whole chapter to know whether it is relevant, only the short description of it. The second is that each decision is small: pick from three to eight options. Language models are good at that kind of choice, and the choice can be logged and checked.
The cost is that navigation is sequential. A tree five levels deep takes at least five model calls, plus the answer. Two things reduce this. Let the model pick more than one branch at the upper levels, since a wrong early choice is hard to recover from, and keep the tree shallow by merging sparse levels. Backtracking helps too: if a leaf does not answer the question, the model can return to the parent and try a sibling.
A worked example
Acme Group has a 180-page employee handbook with a clear outline. An employee asks: 'Do part-time staff get parental leave, and how is it calculated?'
- Level 1 (chapters): the model sees six chapter summaries: 'Working hours', 'Pay and benefits', 'Leave', 'Conduct', 'Health and safety', 'Appendices'. It chooses 'Leave'.
- Level 2 (sections): under 'Leave' it sees 'Annual leave', 'Sick leave', 'Parental leave', 'Carer leave'. It chooses 'Parental leave'.
- Level 3 (sub-sections): under 'Parental leave' it sees 'Eligibility', 'Amounts and duration', 'Part-time and fixed-term staff', 'How to apply'. It chooses two: 'Eligibility' and 'Part-time and fixed-term staff'.
- Read leaves: the system fetches the full text of both. The part-time clause says leave is paid pro rata to contracted hours, which is meaningless alone but clear in this path.
- Answer: 'Yes. Part-time staff are eligible after 26 weeks of service, and the paid amount is pro rata to contracted hours. Source: Handbook > Leave > Parental leave > Part-time and fixed-term staff.' The path is stored in the trace.
{
'node': {'id': '3.3', 'title': 'Parental leave', 'parent': '3',
'summary': 'Eligibility, amounts, duration, part-time rules and how to apply for parental leave.',
'children': ['3.3.1', '3.3.2', '3.3.3', '3.3.4'], 'pages': [88, 94]},
'choice': {'level': 2, 'options': ['3.1', '3.2', '3.3', '3.4'], 'picked': ['3.3'],
'reason': 'Question is about parental leave.'}
}Building it
The sketch below builds summaries bottom-up and navigates top-down with limits on depth, breadth and total model calls. The model and the document store are placeholders. Each choice and its reason go into a trace, which is the main benefit of the design.
MAX_DEPTH = 6 # trees should be shallow; deeper means more sequential model calls
MAX_PICKS = 2 # allow two branches per level so one wrong choice is not fatal
MAX_CALLS = 12 # hard budget for the whole navigation
# Placeholders: llm.generate, llm.generate_json and doc_store stand in for real components.
def summarise_tree(node):
if not node.children:
node.summary = llm.generate(leaf_prompt(node.text)).text
else:
for child in node.children:
summarise_tree(child)
# A parent summary is built from children summaries, so cost stays proportional to size.
node.summary = llm.generate(parent_prompt(node.title, [c.summary for c in node.children])).text
doc_store.save(node)
def navigate(question, root, user):
frontier, leaves, trace, calls = [root], [], [], 0
for depth in range(MAX_DEPTH):
next_frontier = []
for node in frontier:
if not node.children:
leaves.append(node)
continue
if calls >= MAX_CALLS:
break
# Only show children the user may read, so the path cannot leak restricted titles.
options = [c for c in node.children if doc_store.allowed(c.id, user)]
choice = llm.generate_json(pick_prompt(question, options, max_picks=MAX_PICKS))
calls += 1
picked = [c for c in options if c.id in choice['picked']][:MAX_PICKS]
trace.append({'at': node.id, 'picked': [c.id for c in picked], 'reason': choice['reason']})
next_frontier.extend(picked)
frontier = next_frontier
if not frontier:
break
leaves.extend(n for n in frontier if not n.children)
return leaves, trace
def answer(question, root, user):
leaves, trace = navigate(question, root, user)
if not leaves:
return {'answer': 'I could not find a relevant section.', 'trace': trace}
text = '\n\n'.join(f'[{n.path}]\n{doc_store.text(n.id)}' for n in leaves)
return {'answer': llm.generate(answer_prompt(question, text)).text, 'trace': trace}def infer_outline(paragraphs, group_size=8):
# For documents without headings: group neighbouring paragraphs and ask a model to title each group.
# Titles are only as good as the grouping, so review a sample before trusting the tree.
groups = [paragraphs[i:i + group_size] for i in range(0, len(paragraphs), group_size)]
return [{'title': llm.generate(title_prompt(g)).text, 'paragraphs': g} for g in groups]Design decisions
- Storage: a relational table or document store is enough: node id, parent id, title, summary, page range and text. No vector index is required, which simplifies operations. Add a keyword index on titles and summaries for a cheap first guess.
- Tree shape: aim for three to eight children per node and a depth of three to five. Wider nodes overload the choice step, and deeper trees add sequential delay.
- Latency: each level is one model call, so use a small, fast model for navigation and keep a larger one for the final answer. Cache the top-level choices for common questions.
- Cost: summaries are built once per document version, which is cheap compared with navigation at scale. Navigation cost grows with traffic, so set the call cap and watch the average.
- Updates and versioning: when a section changes, re-summarise that node and its ancestors only. Tag every summary with the document version so the path in a citation points to the right text.
- Access control: filter children by the user's permissions before the model sees their titles and summaries. A title can reveal as much as the text.
- Failure handling: allow backtracking to the parent when a leaf does not answer the question, and fall back to keyword search when the model is unsure. See indexing for why a second access path helps.
Measuring it
- Navigation accuracy: on questions with a known target section, the share where the final leaves include it. Also record the level at which wrong turns happen.
- Summary quality: have reviewers check a sample of node summaries for whether they would help a reader decide to open the node. Misleading summaries cause wrong turns.
- Answer correctness and faithfulness: the usual checks of answer against a reference and of claims against the cited text.
- Calls and latency per question: the average and the 95th percentile of navigation calls. Compare with a vector baseline on the same questions.
- Backtrack rate: the share of requests that needed to return to a parent. A high rate points to poor headings or summaries.
def navigation_accuracy(cases):
# cases: dicts with 'gold_node' and 'leaves' (ids returned by navigation).
hits = sum(1 for c in cases if c['gold_node'] in c['leaves'])
return hits / len(cases)When to use it, and when not to
| Situation | Use this type? | Why |
|---|---|---|
| Long manuals, handbooks, contracts or standards with clear headings | Yes | The outline carries meaning that chunking throws away. |
| Users who need to see why a passage was chosen | Yes | The path of choices is a readable explanation. |
| Many short, unrelated documents such as support tickets | No | There is no outline to follow, and vector or keyword search fits better. |
| High traffic with tight latency limits | Only with care | Several sequential model calls per question add delay and cost. |
| Questions that name a section, such as 'the appendix on retention' | Yes | The structure of the question matches the structure of the tree. |
| Documents with poor or inconsistent headings | No | Navigation depends on headings, so fix the structure first. |
Trade-offs
| Dimension | Effect | What to do about it |
|---|---|---|
| Quality | Strong where structure matters, weak where headings are poor or the answer spans distant sections | Allow two picks per level and add backtracking and a keyword fallback. |
| Latency | One model call per level, so several sequential calls | Use a small model for navigation, keep the tree shallow and cache common paths. |
| Cost | Cheap indexing, but a per-question navigation cost that grows with traffic | Cap calls per request and track the average. |
| Complexity | Simple storage, but prompts for summaries and choices need care | Version the prompts and test on questions with known target sections. |
| Failure modes | A wrong early turn, misleading summaries, restricted titles leaking | Multiple picks, summary review and permission filtering before the model sees titles. |
Compared with related types
Simple RAG searches chunks by similarity and is faster and cheaper per question. It works well across many documents, where vectorless RAG works best inside one long structured document. The two combine well: use vector or keyword search to pick the document, then navigate its tree to find the passage.
GraphRAG also builds structure ahead of time, but its structure is a graph of entities across a whole collection, built by extraction. Vectorless RAG uses the structure the author already wrote. Agentic RAG can use tree navigation as one of its tools, which suits questions that need several long documents.
What this means for your role
Common mistakes
Further reading
- RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval, related research on a tree of summaries that still searches with embeddings.
- Indexing, for the idea of a second access path alongside the main one.
Vectorless RAG trades similarity search for reading, and it works when a document has a good outline. It gives you a path you can show, check and fix.