SciTreeRAG: Hierarchy-Aware Scientific Retrieval
- SciTreeRAG is a retrieval-augmented generation system that transforms physics papers into structured trees, preserving logical organization and context.
- It employs hierarchical diffusion and greedy top-down search to mitigate issues like accidental semantic similarity and fragmented context.
- Empirical evaluations on the LHCb corpus show consistent improvements over flat chunk retrieval methods, highlighting its practical value for analysis support.
SciTreeRAG is a retrieval-augmented generation system for scientific literature that exploits the hierarchical structure of experimental physics papers—sections, subsections, paragraphs, figures, and equations—to build a tree representation of each paper and then performs hierarchy-aware retrieval over a forest of such trees. Introduced in the context of the LHCb corpus, it was designed to address two specific failure modes of standard chunk-based RAG in particle-physics analysis support: accidental semantic similarity and fragmented context. In the same framework, the complementary SciGraphRAG system extends retrieval beyond document-local hierarchy to a corpus-level knowledge graph intended to capture global cross-document relationships (McGreivy et al., 8 Sep 2025).
1. Problem setting and design rationale
SciTreeRAG was motivated by the structure of experimental particle-physics literature, where analyses are spread over hundreds of highly structured collaboration papers and where answering realistic expert questions requires pulling together information distributed across multiple sections of multiple papers. The target questions include issues such as systematic uncertainties, analysis strategies, and global combinations. In this setting, fixed-size chunk retrieval is described as inadequate because it retrieves solely by semantic similarity and therefore does not preserve the logical organization of the source material (McGreivy et al., 8 Sep 2025).
The paper identifies three pathologies of standard chunk-based RAG. The first is accidental semantic similarity, in which irrelevant chunks share vocabulary with the query but not the underlying topic. The second is fragmented context, in which retrieved chunks from unrelated parts of the same or different papers are concatenated, creating misleading juxtapositions. The third is lack of global knowledge, meaning that flat chunking does not represent logical, methodological, or cross-document structure. SciTreeRAG is explicitly designed to address the first two problems by using document hierarchy to guide retrieval and construct more coherent contexts, while the third problem is assigned to the complementary SciGraphRAG system (McGreivy et al., 8 Sep 2025).
A recurrent misconception is to treat SciTreeRAG as a corpus-level relational reasoner. The paper instead draws a strict division: SciTreeRAG is a structure-aware text retrieval system operating over document trees, whereas global, cross-document structure is modeled separately through a knowledge graph. This distinction matters because many expert particle-physics questions require both local contextual coherence within papers and relational synthesis across papers; SciTreeRAG addresses the former directly and only partially supports the latter through document competition during retrieval.
2. Corpus model, tree representation, and preprocessing
SciTreeRAG turns each paper into a tree that reflects the regular structure of experimental physics articles: abstract, sections, subsections, paragraphs, figures, tables, and equations. In the formal tree , each node carries attributes title, summary, embedding, parent, and sections, while edges encode parent–child relations between sections and their subsections or content units. The root node is the abstract, internal nodes are sections and subsections, and leaf nodes are atomic content units such as paragraphs, figure captions, table captions, and equations. Over the full corpus, these paper trees form a forest (McGreivy et al., 8 Sep 2025).
The preprocessing pipeline begins from LaTeX source. The source is cleaned and flattened into a single file per paper by removing macros, bibliography, and related boilerplate. Tree construction then proceeds through section parsing, automatic subdivision or chunking, and explicit extraction of atomic elements. If a section or subsection is long, it is split into further subsubsections; otherwise it is chunked into leaf nodes. Figures, tables, and equations receive dedicated leaves with captions as text, so that semantic retrieval can target visual or mathematical content rather than only prose.
Recursive summarization is performed bottom-up. For a leaf node, summary(v) is the raw content. For an internal node, the summaries of all child nodes are concatenated and then compressed by an LLM into a distilled summary. In the experiments, GPT-5 nano was used for this summarization stage. Because summarization is depth-first and bottom-up, higher-level nodes carry increasingly abstract summaries of their descendants. The paper reports that this one-time preprocessing was performed for 834 LHCb papers, generating 7049 summaries with average length of about 249 tokens, in about 30 minutes at a cost of \$6 (McGreivy et al., 8 Sep 2025).
The resulting representation preserves where each content unit belongs in the document and thereby preserves the logical flow of a physics paper, described in the paper as proceeding from high-level motivation to methods, results, systematics, and conclusions. This suggests that SciTreeRAG treats authored document structure not as formatting metadata but as a retrieval prior.
3. Retrieval mechanism and hierarchy-aware context construction
After summarization, each node is embedded as an initial vector using the BAAI/bge-small-en-v1.5 paragraph embedding model. SciTreeRAG then refines these embeddings with a hierarchical diffusion process that propagates information between a node and its children:
with attention weights
Here, controls the trade-off between a node’s original embedding and its children’s embeddings, while controls attention sharpness. The stated intuition is that section summaries and child contents are different abstraction levels of the same information, so diffusion amplifies semantic features that are consistent across levels while washing out incidental features such as phrasing differences or LLM hallucinations in summaries (McGreivy et al., 8 Sep 2025).
Query-time retrieval is performed as a greedy best-first search over the forest . A query embedding 0 is computed using the same embedding model. The search boundary is initialized with all roots, one per paper. At each step, the most similar node in the current boundary is selected. If that node has children, those children are added to the boundary and scored; if it is a leaf, it is added to the context set. The process stops when the context is full by token budget or when the boundary is empty. The search is therefore top-down: a branch is explored only if its ancestors are already semantically promising.
This mechanism imposes a two-level relevance constraint on retrieved leaves. A leaf enters the final context only if its local content is relevant and its ancestors are topically aligned with the query. Internal nodes guide traversal but do not directly populate the final context, although the paper notes that they could be included if desired. The retrieval procedure also causes different papers to compete from the outset, because all roots enter the initial boundary simultaneously.
Context construction is not merely concatenation of retrieved units. The context sent to the answer-generation LLM is built from selected leaf-node summaries, often together with titles, section headings, or parent summaries, and leaf nodes are ordered so that related leaves from the same paper and from similar regions of the tree appear together. The resulting context is described as less fragmented than standard RAG, partially preserving structures such as a section on systematics followed by results, and avoiding juxtaposition of completely unrelated chunks from different papers that happen to share keywords (McGreivy et al., 8 Sep 2025).
4. Empirical evaluation and comparative performance
The principal quantitative evaluation uses the HFLAV-based evaluation dataset, consisting of 56 expert-level questions derived from the 2023 HFLAV averages report. HFLAV itself is not part of the LHCb corpus, so the evaluation probes retrieval rather than memorization. GPT-5 mini generated 8 queries per chapter across 7 chapters and also generated detailed grading rubrics containing essential requirements, expert-level requirements, and factual benchmarks. Candidate answers were produced under the instruction that they must be constructed strictly from the provided RAG context, and an anonymized LLM-as-judge graded them on a four-point scale: Poor, Below Average, Satisfactory, and Good (McGreivy et al., 8 Sep 2025).
The comparison involved three systems: BaseRAG, SciTreeRAG without diffusion, and SciTreeRAG with diffusion. The key aggregated result, over context sizes of 8k, 16k, and 32k tokens, is summarized below.
| System | Poor | Satisfactory + Good |
|---|---|---|
| BaseRAG | 25% | ~42% |
| SciTreeRAG (no diffusion) | 20% | >50% |
| SciTreeRAG (with diffusion) | 10% | >50% |
The paper states that performance did not vary significantly with context window size and characterizes the improvements as “modest but consistent.” The interpretation given is that tree-based retrieval already improves over flat chunk retrieval, while embedding diffusion further reduces poor answers by filtering out spurious similarities and enforcing hierarchical consistency (McGreivy et al., 8 Sep 2025).
The evaluation protocol includes an explicit caution. A human expert validated a subset of the LLM-as-judge evaluations and found no major issues, but full manual review was not performed. Accordingly, the reported gains support the utility of structure-aware retrieval, but the results are to be interpreted with appropriate caution rather than as a definitive benchmark.
5. SciGraphRAG, domain applications, and corpus-level reasoning
SciTreeRAG is paired with SciGraphRAG, which addresses the problem that tree-based retrieval remains local to document structure. SciGraphRAG builds a directed multigraph 1 over the LHCb corpus with typed node and edge labels. Its node types are paper, observable, decay, uncertainty_source, and method; its relations include paper -[determines]-> observable, observable -[measured_with]-> decay, uncertainty_source -[affects]-> observable, and method -[estimates]-> uncertainty_source. The schema is centered on measurement uncertainties and analysis methods, and the graph is intended to represent corpus-level relations such as which uncertainties affect which observables through which decays and methods (McGreivy et al., 8 Sep 2025).
Knowledge-graph construction proceeds in two stages: per-article graph extraction and cross-document canonicalization. In extraction, the abstract is processed by GPT-5 mini to obtain observables, decays, data-taking period, and analysis strategy, while relevant body-text regions—especially uncertainty sections identified through keyword heuristics—are parsed to extract uncertainty sources, methods, relations, and numerical magnitudes. Per-article graphs are stored in Neo4j. In canonicalization, hybrid vector representations combine TF-IDF over entity names with semantic embeddings from BAAI/bge-small-en-v1.5 over descriptions, and agglomerative clustering is followed by an LLM judge that decides which entities should be merged and how the merged entity should be named and described. The paper reports reductions from 7167 to 2895 uncertainty_source nodes, from 6792 to 1786 method nodes, from 2166 to 2028 observable nodes, and from 1595 to 1495 decay nodes (McGreivy et al., 8 Sep 2025).
At query time, SciGraphRAG uses NL→Cypher translation via an LLM informed by the schema, naming conventions, and query-construction policies. This enables retrieval of relations that text-based RAG cannot directly encode. For example, for a query about the most precise measurement of 2, the system can traverse from an observable to associated decays, papers, and ranked uncertainty sources. For a query about the CKM angle 3, it can identify the “CKM Angle gamma” observable entity aggregated from 17 distinct papers and enumerate decays and systematic effects. When query-to-graph mapping succeeds, the paper reports that SciGraphRAG often produces higher-quality answers than text-based RAG; for the 4 query, an LLM-as-judge rated SciGraphRAG “Good” while SciTreeRAG and BaseRAG were rated “Satisfactory” (McGreivy et al., 8 Sep 2025).
The motivating applications of SciTreeRAG and SciGraphRAG are threefold: lowering entry barriers for new collaborators, enabling non-experts to perform meaningful analyses on CERN open data, and streamlining methodological and editorial review within large collaborations. SciTreeRAG contributes by bringing together coherent slices of relevant sections from multiple papers while respecting the logical organization of analyses. SciGraphRAG contributes when questions are naturally across papers and across time, such as how treatments of a given systematic uncertainty evolved across a family of analyses.
6. Broader context, later developments, and limitations
Within the broader RAG literature, SciTreeRAG occupies a specific position. The original paper situates it against standard flat chunk retrieval, reranking or cross-encoder methods, hierarchical summarization systems such as RAPTOR, and knowledge-graph RAG. Its distinctive combination is a domain-tailored integration of recursive summarization, embedding diffusion over a document hierarchy, and greedy top-down search over a forest of many papers rather than within a single document (McGreivy et al., 8 Sep 2025).
A later system, "SproutRAG" (Abaskohi et al., 16 Jun 2026), provides a useful point of contrast. SproutRAG also uses a tree as the primary retrieval index, but its tree is learned bottom-up from sentence-level attention rather than taken from authored section structure, its internal-node representations are progressive embeddings rather than LLM-generated summaries, and its retrieval policy is hierarchical beam search rather than greedy best-first traversal. This comparison clarifies that “tree RAG” is not a single method family: SciTreeRAG is document-structure-first and summary-based, whereas SproutRAG is attention-guided and avoids additional LLM calls during indexing or retrieval. A plausible implication is that subsequent tree-based systems can vary substantially in where they place the main inductive bias: authored hierarchy, learned attention structure, or graph relations.
SciTreeRAG has also appeared as an enabling component in later agentic high-energy-physics workflows. "AI Agents Can Already Autonomously Perform Experimental High Energy Physics" (Moreno et al., 20 Mar 2026) describes a SciTreeRAG-like literature backend indexing ALEPH and DELPHI papers, where autonomous analysis agents retrieve relevant sections for event selection criteria, systematics lists, and fit configurations during strategy, exploration, and review. That deployment suggests that hierarchical scientific retrieval can function as an external memory layer for multi-agent analysis systems rather than only as a question-answering backend.
The original SciTreeRAG paper also states several limitations. SciTreeRAG remains limited to local text retrieval and does not encode corpus-level relational knowledge; it depends on LLM-generated summaries; and its hyperparameters such as 5, 6, tree depth, and leaf size are heuristic and were not exhaustively optimized. For SciGraphRAG, the schema is narrowly scoped to uncertainties and methods, NL-to-Cypher translation is fragile, and canonicalization is imperfect, with duplicated “Delta m_s” entities persisting despite successful merging for “CKM Angle gamma.” More generally, hallucinations are mitigated but not eliminated, and the authors explicitly argue for future expert validation and collaboration-led vetting before such systems are trusted for critical decisions (McGreivy et al., 8 Sep 2025).
The stated future directions include better tree construction through more sophisticated segmentation, alternative summarization strategies, active learning with domain-expert feedback, integration with code and data, cross-experiment schemas, and application beyond particle physics. Taken together, these directions position SciTreeRAG not as a finished general solution to scientific retrieval, but as a concrete architecture for exploiting the hierarchical form of technical papers in domains where authored structure itself carries a substantial fraction of the epistemic signal.