feat: refactor code structure for improved readability and maintainability

#1
.gitattributes CHANGED
@@ -33,3 +33,16 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ assets/00_cover.png filter=lfs diff=lfs merge=lfs -text
37
+ assets/01_hero_topk_vs_spectrag.gif filter=lfs diff=lfs merge=lfs -text
38
+ assets/02_six_signals_graph_build.gif filter=lfs diff=lfs merge=lfs -text
39
+ assets/03_spectral_coordinates.gif filter=lfs diff=lfs merge=lfs -text
40
+ assets/04_spectral_diffusion.gif filter=lfs diff=lfs merge=lfs -text
41
+ assets/05_token_budget_selection.gif filter=lfs diff=lfs merge=lfs -text
42
+ assets/06_by_the_numbers.gif filter=lfs diff=lfs merge=lfs -text
43
+ assets/chart_01_index_footprint.png filter=lfs diff=lfs merge=lfs -text
44
+ assets/chart_02_recall_by_depth.png filter=lfs diff=lfs merge=lfs -text
45
+ assets/chart_03_accuracy_by_question_type.png filter=lfs diff=lfs merge=lfs -text
46
+ assets/chart_04_diversity_win_rate.png filter=lfs diff=lfs merge=lfs -text
47
+ assets/online-offline-main-pipeline.png filter=lfs diff=lfs merge=lfs -text
48
+ assets/SpectRAG_explainer_voiceover.mp4 filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,12 +1,47 @@
1
  ---
2
  title: SpectRAG
3
- emoji: 🏃
4
  colorFrom: blue
5
- colorTo: gray
6
  sdk: static
7
- pinned: false
8
  license: mit
9
- short_description: Spectral graph-augmented retrieval for RAG systems
 
 
 
 
 
 
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: SpectRAG
3
+ emoji: 🐙
4
  colorFrom: blue
5
+ colorTo: indigo
6
  sdk: static
7
+ pinned: true
8
  license: mit
9
+ short_description: Weighted chunk graphs for multi-hop RAG context selection
10
+ tags:
11
+ - rag
12
+ - retrieval-augmented-generation
13
+ - graph
14
+ - spectral-graph-theory
15
+ - multi-hop-qa
16
  ---
17
 
18
+ # SpectRAG: Weighted Chunk Graphs for Token-Budgeted Context Selection in Multi-Hop RAG
19
+
20
+ An interactive, visual walkthrough of **SpectRAG**. SpectRAG is a retrieval framework that replaces independent top-k ranking with **context-set selection** over a weighted chunk graph and its Laplacian spectrum.
21
+
22
+ - 📄 Paper: [arXiv:2610.36991](https://arxiv.org/abs/2610.36991)
23
+ - 🤗 Paper page: [hf.co/papers/2610.36991](https://huggingface.co/papers/2610.36991)
24
+ - 💻 Code (MIT): [github.com/SightAndCite/SpectRAG](https://github.com/SightAndCite/SpectRAG)
25
+
26
+ ## Highlights (MultiHopRAG & UltraDomain)
27
+
28
+ | | |
29
+ |---|---|
30
+ | Overall gold-evidence recall | **91.8%** (next best 76.1%) |
31
+ | Exact match on inference questions | **95.1%** |
32
+ | Index size vs LightRAG | **46 MB vs 274 MB** (~6× smaller) |
33
+ | Diversity win rate (LLM judge) | **> 50% vs every baseline**, up to 72.5% |
34
+
35
+ ## Citation
36
+
37
+ ```bibtex
38
+ @misc{sahinoglu2026spectragweightedchunkgraphs,
39
+ title={SpectRAG: Weighted Chunk Graphs for Token-Budgeted Context Selection in Multi-Hop Retrieval-Augmented Generation},
40
+ author={Zafer Sahinoglu and Abdulazeez Mohammed and Buse Yaren Kazangirler and Cahit Berkay Kazangirler},
41
+ year={2026},
42
+ eprint={2610.36991},
43
+ archivePrefix={arXiv},
44
+ primaryClass={cs.AI},
45
+ url={https://arxiv.org/abs/2610.36991},
46
+ }
47
+ ```
assets/00_cover.png ADDED

Git LFS Details

  • SHA256: 3bed2412b444e8768ac8b43438c99bbf254834c00312659c00f419143a4903ce
  • Pointer size: 131 Bytes
  • Size of remote file: 520 kB
assets/01_hero_topk_vs_spectrag.gif ADDED

Git LFS Details

  • SHA256: 7a6e001f4d71f995669d2be5003869b4bdeb666f3d313048e124120cbad76a4c
  • Pointer size: 131 Bytes
  • Size of remote file: 498 kB
assets/02_six_signals_graph_build.gif ADDED

Git LFS Details

  • SHA256: f2e118dfd22eca5ea18e754dcb1eee8abab533b8324aef055dad277f1742b2ed
  • Pointer size: 132 Bytes
  • Size of remote file: 2.29 MB
assets/03_spectral_coordinates.gif ADDED

Git LFS Details

  • SHA256: d4befbad63e70f20f7b6e4a8be31de5e5c506e7bac5074fe6026ae1f5efe4dfb
  • Pointer size: 132 Bytes
  • Size of remote file: 4.5 MB
assets/04_spectral_diffusion.gif ADDED

Git LFS Details

  • SHA256: 41f37de41145e2851018b51d5b08b49fc2b86229328155cf247c139eed907433
  • Pointer size: 132 Bytes
  • Size of remote file: 1.78 MB
assets/05_token_budget_selection.gif ADDED

Git LFS Details

  • SHA256: 5ffd2f70cd9fc5c38b4c06d6da007e363c0307c77e8347f00e99ffbd4196b85e
  • Pointer size: 131 Bytes
  • Size of remote file: 668 kB
assets/06_by_the_numbers.gif ADDED

Git LFS Details

  • SHA256: 834b8acee87d359e808b7ea39852f8e6d4618165f495257ad5654fbd9031099b
  • Pointer size: 131 Bytes
  • Size of remote file: 489 kB
assets/SpectRAG_explainer_voiceover.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa2ddddb1d5c3ace8b8190e2aca9f22b9a33c18bdd43b045de38cc9c80b323b8
3
+ size 9709194
assets/SpectRAG_explainer_voiceover.vtt ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ WEBVTT
2
+
3
+ 1
4
+ 00:00:00.350 --> 00:00:01.409
5
+ Meet SpectRAG.
6
+
7
+ 2
8
+ 00:00:01.409 --> 00:00:05.114
9
+ Stop retrieving chunks, and start retrieving context.
10
+
11
+ 3
12
+ 00:00:06.014 --> 00:00:07.622
13
+ Ask a multi-hop question,
14
+
15
+ 4
16
+ 00:00:07.622 --> 00:00:12.044
17
+ and classic top-k retrieval grabs six near-duplicate chunks from one cluster.
18
+
19
+ 5
20
+ 00:00:12.044 --> 00:00:16.063
21
+ It finds only one of the three pieces of evidence.
22
+
23
+ 6
24
+ 00:00:16.063 --> 00:00:18.475
25
+ SpectRAG seeds, expands over the graph,
26
+
27
+ 7
28
+ 00:00:18.475 --> 00:00:21.690
29
+ diffuses relevance, and selects a diverse, connected set.
30
+
31
+ 8
32
+ 00:00:21.690 --> 00:00:23.298
33
+ Three out of three.
34
+
35
+ 9
36
+ 00:00:24.198 --> 00:00:27.605
37
+ Offline, every document is split into chunks.
38
+
39
+ 10
40
+ 00:00:27.605 --> 00:00:31.497
41
+ Then the chunks are connected by six signals:
42
+
43
+ 11
44
+ 00:00:31.497 --> 00:00:33.444
45
+ adjacency, sections, semantic similarity,
46
+
47
+ 12
48
+ 00:00:33.444 --> 00:00:36.363
49
+ shared entities, utility questions, and citations.
50
+
51
+ 13
52
+ 00:00:36.363 --> 00:00:39.770
53
+ Together, they form one weighted chunk graph.
54
+
55
+ 14
56
+ 00:00:40.670 --> 00:00:43.093
57
+ Now every chunk has two geometries.
58
+
59
+ 15
60
+ 00:00:43.093 --> 00:00:45.920
61
+ Its embedding captures what the chunk says.
62
+
63
+ 16
64
+ 00:00:45.920 --> 00:00:47.132
65
+ Its spectral coordinates,
66
+
67
+ 17
68
+ 00:00:47.132 --> 00:00:50.362
69
+ from the graph Laplacian, capture where it lives.
70
+
71
+ 18
72
+ 00:00:50.362 --> 00:00:52.786
73
+ Communities pull together, whatever their wording.
74
+
75
+ 19
76
+ 00:00:54.170 --> 00:00:56.826
77
+ At query time, relevance diffuses along the graph.
78
+
79
+ 20
80
+ 00:00:56.826 --> 00:01:00.147
81
+ Bridge chunks that never matched the query still light up.
82
+
83
+ 21
84
+ 00:01:00.147 --> 00:01:02.804
85
+ That is how SpectRAG finds the missing link.
86
+
87
+ 22
88
+ 00:01:06.170 --> 00:01:08.187
89
+ Instead of a fixed top-k,
90
+
91
+ 23
92
+ 00:01:08.187 --> 00:01:10.205
93
+ SpectRAG fills a twelve-thousand-token budget.
94
+
95
+ 24
96
+ 00:01:10.205 --> 00:01:14.644
97
+ A protected core comes first, then coverage-aware picks with no redundancy,
98
+
99
+ 25
100
+ 00:01:14.644 --> 00:01:18.276
101
+ and finally a backfill, so no space is wasted.
102
+
103
+ 26
104
+ 00:01:20.170 --> 00:01:21.136
105
+ The result:
106
+
107
+ 27
108
+ 00:01:21.136 --> 00:01:25.966
109
+ 91.8 percent gold-evidence recall, 95 percent accuracy on inference questions,
110
+
111
+ 28
112
+ 00:01:25.966 --> 00:01:29.830
113
+ and an index six times smaller than LightRAG.
114
+
115
+ 29
116
+ 00:01:30.730 --> 00:01:31.097
117
+ SpectRAG.
118
+
119
+ 30
120
+ 00:01:31.097 --> 00:01:34.776
121
+ Retrieve a context set, not a pile of similar chunks.
122
+
123
+ 31
124
+ 00:01:34.776 --> 00:01:37.350
125
+ Read the paper, and try the code.
126
+
assets/chart_01_index_footprint.png ADDED

Git LFS Details

  • SHA256: 6224858bdcaa425f10de18780ae9de15e100c41ad93dba0d3d6ff62a333cff09
  • Pointer size: 131 Bytes
  • Size of remote file: 109 kB
assets/chart_02_recall_by_depth.png ADDED

Git LFS Details

  • SHA256: 37a370eb010bd85e851e67e5c5bae2363049bc37a86dbdc2f6a3bd3ad8afb8a8
  • Pointer size: 131 Bytes
  • Size of remote file: 133 kB
assets/chart_03_accuracy_by_question_type.png ADDED

Git LFS Details

  • SHA256: f215b2f11d926c38eee77d7bc34283ef701ebe34c63bbb93f6ed4b86ddb8357e
  • Pointer size: 131 Bytes
  • Size of remote file: 102 kB
assets/chart_04_diversity_win_rate.png ADDED

Git LFS Details

  • SHA256: 9c3a1a9dee46c6e3e2bbfcfc6a204e976dbb26b8448fd7db0e66fc0748fd7d3d
  • Pointer size: 131 Bytes
  • Size of remote file: 104 kB
assets/chart_05_answer_accuracy.png ADDED
assets/online-offline-main-pipeline.png ADDED

Git LFS Details

  • SHA256: f39e157ba4205d43b4d1f0b9f302f9546b6ee68c2ea326eb524f12082d68751a
  • Pointer size: 131 Bytes
  • Size of remote file: 956 kB
index.html CHANGED
@@ -1,19 +1,179 @@
1
  <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
  <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>SpectRAG · Retrieve Context, Not Chunks</title>
7
+ <meta name="description" content="SpectRAG: weighted chunk graphs and spectral diffusion for token-budgeted context selection in multi-hop RAG.">
8
+ <meta property="og:title" content="SpectRAG · Retrieve context, not chunks">
9
+ <meta property="og:image" content="assets/00_cover.png">
10
+ <style>
11
+ :root {
12
+ --bg: #050B1A; --panel: #0A1630; --edge: #1C3466; --text: #E8F1FF; --muted: #93A5C8;
13
+ --cyan: #4FD1FF; --green: #3DDC97; --yellow: #FFD166; --radius: 14px;
14
+ }
15
+ * { box-sizing: border-box; }
16
+ html { scroll-behavior: smooth; }
17
+ body { margin: 0; background: var(--bg); color: var(--text);
18
+ font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; }
19
+ main { max-width: 980px; margin: 0 auto; padding: 0 16px 80px; }
20
+ a { color: var(--cyan); }
21
+ img, video { display: block; width: 100%; height: auto; border-radius: var(--radius);
22
+ border: 1px solid var(--edge); background: #000; }
23
+ header { text-align: center; padding: 56px 0 28px; }
24
+ .eyebrow { color: var(--cyan); letter-spacing: .14em; text-transform: uppercase; font-size: 13px; font-weight: 700; }
25
+ h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.08; margin: 10px 0 14px; letter-spacing: -.02em; }
26
+ h1 span { color: var(--cyan); }
27
+ .lede { color: var(--muted); font-size: clamp(16px, 2.2vw, 20px); max-width: 720px; margin: 0 auto; }
28
+ .authors { color: var(--muted); font-size: 14px; margin-top: 14px; }
29
+ .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
30
+ .btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
31
+ border: 1px solid var(--edge); background: var(--panel); color: var(--text); text-decoration: none;
32
+ font-weight: 600; font-size: 15px; transition: border-color .15s, transform .15s; }
33
+ .btn:hover { border-color: var(--cyan); transform: translateY(-1px); }
34
+ .btn.primary { background: var(--cyan); color: var(--bg); border-color: var(--cyan); }
35
+ section { margin-top: 64px; }
36
+ h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 6px; letter-spacing: -.01em; }
37
+ .sub { color: var(--muted); margin: 0 0 20px; }
38
+ figure { margin: 0; }
39
+ figcaption { color: var(--muted); font-size: 14px; text-align: center; margin-top: 10px; }
40
+ .quote { border-left: 3px solid var(--cyan); padding: 4px 0 4px 18px; font-size: 20px; margin: 28px 0 0; }
41
+ .steps { display: grid; gap: 40px; }
42
+ .step { display: grid; grid-template-columns: 1fr 1.35fr; gap: 24px; align-items: center; }
43
+ .step:nth-child(even) .txt { order: 2; }
44
+ .num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
45
+ background: var(--cyan); color: var(--bg); font-weight: 800; font-size: 15px; margin-bottom: 8px; }
46
+ .step h3 { margin: 0 0 6px; font-size: 21px; }
47
+ .step p { margin: 0; color: var(--muted); }
48
+ .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
49
+ .stat { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius); padding: 16px; }
50
+ .stat b { display: block; font-size: 30px; line-height: 1.1; color: var(--cyan); }
51
+ .stat span { color: var(--muted); font-size: 14px; }
52
+ .charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
53
+ .note { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius); padding: 18px 20px; }
54
+ .note ul { margin: 6px 0 0; padding-left: 20px; color: var(--muted); }
55
+ pre { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius); padding: 16px;
56
+ overflow-x: auto; font-size: 13px; line-height: 1.5; margin: 0; }
57
+ .copy { margin-top: 10px; }
58
+ footer { margin-top: 72px; text-align: center; color: var(--muted); font-size: 14px; }
59
+ @media (max-width: 760px) {
60
+ .step { grid-template-columns: 1fr; }
61
+ .step:nth-child(even) .txt { order: 0; }
62
+ .stats { grid-template-columns: 1fr 1fr; }
63
+ .charts { grid-template-columns: 1fr; }
64
+ }
65
+ </style>
66
+ </head>
67
+ <body>
68
+ <main>
69
+ <header>
70
+ <div class="eyebrow">Multi-hop RAG · arXiv 2610.36991</div>
71
+ <h1>Stop retrieving chunks.<br><span>Start retrieving context.</span></h1>
72
+ <p class="lede">SpectRAG builds a weighted chunk graph from six evidence signals and uses its Laplacian spectrum to select a context set that is <b>relevant, diverse and connected</b>, all under a fixed token budget.</p>
73
+ <p class="authors">Zafer Sahinoglu · Abdulazeez Mohammed · Buse Yaren Kazangirler · Cahit Berkay Kazangirler</p>
74
+ <div class="btns">
75
+ <a class="btn primary" href="https://arxiv.org/abs/2610.36991" target="_blank" rel="noopener">📄 Paper</a>
76
+ <a class="btn" href="https://github.com/SightAndCite/SpectRAG" target="_blank" rel="noopener">💻 Code</a>
77
+ <a class="btn" href="https://huggingface.co/papers/2610.36991" target="_blank" rel="noopener">🤗 Paper page</a>
78
+ <a class="btn" href="#video">🎬 Watch the explainer</a>
79
+ </div>
80
+ </header>
81
+
82
+ <figure>
83
+ <img src="assets/01_hero_topk_vs_spectrag.gif" alt="Animation: classic top-k retrieval picks six near-duplicate chunks and finds 1 of 3 gold passages; SpectRAG seeds, expands, diffuses and selects a diverse set that finds 3 of 3.">
84
+ <figcaption>Same question, same 6-chunk budget. Top-k finds 1/3 of the gold evidence; SpectRAG finds 3/3. (Illustrative toy corpus.)</figcaption>
85
+ </figure>
86
+
87
+ <p class="quote">Top-k ranks chunks one at a time. Multi-hop questions need a <b>set</b> of chunks that works together as evidence.</p>
88
+
89
+ <section id="how">
90
+ <h2>How it works</h2>
91
+ <p class="sub">An offline pass builds the graph once; a five-stage online pass selects context for each query.</p>
92
+ <div class="steps">
93
+ <div class="step">
94
+ <div class="txt"><div class="num">1</div><h3>A chunk graph built from six signals</h3>
95
+ <p>Semantic similarity, document adjacency, section hierarchy, shared entities, LLM-generated utility questions and citations are fused into one weighted edge.</p></div>
96
+ <img src="assets/02_six_signals_graph_build.gif" alt="Animation: chunks from five documents are connected signal by signal into a weighted chunk graph." loading="lazy">
97
+ </div>
98
+ <div class="step">
99
+ <div class="txt"><div class="num">2</div><h3>Two geometries for every chunk</h3>
100
+ <p>The dense embedding captures what a chunk says. The 32-d spectral coordinate from the normalized Laplacian captures where it lives in the corpus.</p></div>
101
+ <img src="assets/03_spectral_coordinates.gif" alt="Animation: points morph from an overlapping embedding layout into well-separated spectral communities." loading="lazy">
102
+ </div>
103
+ <div class="step">
104
+ <div class="txt"><div class="num">3</div><h3>Relevance diffuses along the graph</h3>
105
+ <p>Hybrid seeds (dense + BM25 + utility questions) are expanded two hops and re-scored with spectral closeness and Personalized PageRank, so bridge evidence surfaces.</p></div>
106
+ <img src="assets/04_spectral_diffusion.gif" alt="Animation: relevance heat spreads from three seed nodes across a graph." loading="lazy">
107
+ </div>
108
+ <div class="step">
109
+ <div class="txt"><div class="num">4</div><h3>Token-budgeted selection</h3>
110
+ <p>A protected core, a coverage-aware tail with a precision floor, and a backfill fill a ~12k-token window, adapting to 10–15 chunks per query.</p></div>
111
+ <img src="assets/05_token_budget_selection.gif" alt="Animation: candidate chunks fill a 12,000-token context window; redundant and low-precision chunks are skipped." loading="lazy">
112
+ </div>
113
+ </div>
114
+ <figure style="margin-top:40px">
115
+ <img src="assets/online-offline-main-pipeline.png" alt="Full SpectRAG pipeline diagram: offline indexing and online query-time retrieval." loading="lazy">
116
+ <figcaption>The full pipeline: offline corpus indexing and online query-time retrieval.</figcaption>
117
+ </figure>
118
+ </section>
119
+
120
+ <section id="video">
121
+ <h2>Explainer video</h2>
122
+ <p class="sub">A 98-second narrated walkthrough. Captions are available in the player.</p>
123
+ <video controls preload="metadata" poster="assets/00_cover.png">
124
+ <source src="assets/SpectRAG_explainer_voiceover.mp4" type="video/mp4">
125
+ <track kind="captions" src="assets/SpectRAG_explainer_voiceover.vtt" srclang="en" label="English" default>
126
+ </video>
127
+ </section>
128
+
129
+ <section id="results">
130
+ <h2>Results</h2>
131
+ <p class="sub">MultiHopRAG (2,556 gold-answer questions) and four UltraDomain corpora, against NaiveRAG, Hybrid, HyDE and LightRAG. Every system uses the same generator.</p>
132
+ <div class="stats">
133
+ <div class="stat"><b>91.8%</b><span>overall gold-evidence recall (next best 76.1%)</span></div>
134
+ <div class="stat"><b>95.1%</b><span>exact match on inference questions</span></div>
135
+ <div class="stat"><b>~6×</b><span>smaller index than LightRAG (46 vs 274 MB)</span></div>
136
+ <div class="stat"><b>&gt;50%</b><span>diversity win rate vs every baseline</span></div>
137
+ </div>
138
+ <div class="charts">
139
+ <img src="assets/chart_02_recall_by_depth.png" alt="Line chart: recall at 2, 5, 10 and overall for five systems; SpectRAG reaches 91.8% overall." loading="lazy">
140
+ <img src="assets/chart_01_index_footprint.png" alt="Bar charts: index size 46 MB vs 274 MB and node counts per corpus, SpectRAG vs LightRAG." loading="lazy">
141
+ <img src="assets/chart_03_accuracy_by_question_type.png" alt="Dot plot: exact match by question type; SpectRAG leads on inference at 95.1%." loading="lazy">
142
+ <img src="assets/chart_04_diversity_win_rate.png" alt="Bar chart: SpectRAG diversity win rate above 50% against all four baselines in both configurations." loading="lazy">
143
+ </div>
144
+ <div class="note" style="margin-top:20px">
145
+ <b>Honest trade-offs</b>
146
+ <ul>
147
+ <li>Hybrid retrieval leads at the very top of the ranking (Recall@2, Recall@5, MRR); SpectRAG wins on breadth.</li>
148
+ <li>End-to-end accuracy gains are narrow (EM 71.2 vs 70.6 for the next best): better retrieval saturates with short multi-hop answers.</li>
149
+ <li>On unanswerable (null) questions SpectRAG is behind the vector baselines, and signal weights can need per-corpus tuning.</li>
150
+ </ul>
151
+ </div>
152
+ </section>
153
+
154
+ <section id="cite">
155
+ <h2>Citation</h2>
156
+ <pre id="bib">@misc{sahinoglu2026spectragweightedchunkgraphs,
157
+ title={SpectRAG: Weighted Chunk Graphs for Token-Budgeted Context Selection in Multi-Hop Retrieval-Augmented Generation},
158
+ author={Zafer Sahinoglu and Abdulazeez Mohammed and Buse Yaren Kazangirler and Cahit Berkay Kazangirler},
159
+ year={2026},
160
+ eprint={2610.36991},
161
+ archivePrefix={arXiv},
162
+ primaryClass={cs.AI},
163
+ url={https://arxiv.org/abs/2610.36991},
164
+ }</pre>
165
+ <button class="btn copy" type="button" id="copyBib">Copy BibTeX</button>
166
+ </section>
167
+
168
+ <footer>SpectRAG is open source under the MIT license · <a href="https://github.com/SightAndCite/SpectRAG">GitHub</a></footer>
169
+ </main>
170
+ <script>
171
+ document.getElementById('copyBib').addEventListener('click', async (e) => {
172
+ try { await navigator.clipboard.writeText(document.getElementById('bib').textContent);
173
+ e.target.textContent = 'Copied ✓'; }
174
+ catch { e.target.textContent = 'Select the text above to copy'; }
175
+ setTimeout(() => { e.target.textContent = 'Copy BibTeX'; }, 2000);
176
+ });
177
+ </script>
178
+ </body>
179
  </html>