SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.07612 · 2026

KohakuRAG: A simple RAG framework with hierarchical document indexing

Shih-Ying Yeh, Ko-Wei Huang, Yueh-Feng Ku, Buu-Khang Tu

arXiv · PDF · Open in the Atlas

Code that ran

15 of 18 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (7 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 8 have no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2603.07612.json · badge: /api/ran/2603.07612.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
KohakuBlueleaf/KohakuRAG community
Papers with Code archive
15 ran · 3 no recorded run
FunctionStatusWhere it lives
DocumentPayload Ran
ran on a synthesized input · constructed an object; no result was computed
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("46e8ab27730924a9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

JinaEmbeddingModel Ran
ran on a synthesized input · constructed an object; no result was computed
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("320e151285bf8507")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ParagraphPayload Ran
ran on a synthesized input · constructed an object; no result was computed
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("aea7e26e65d857e5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

SectionPayload Ran
ran on a synthesized input · constructed an object; no result was computed
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("6a3228ba6030b84c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

SentencePayload Ran
ran on a synthesized input · constructed an object; no result was computed
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("069158d689ff80d8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

StoredNode Ran
ran on a synthesized input · constructed an object; no result was computed
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("15c952712553def5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

TreeNode Ran
ran on a synthesized input · constructed an object; no result was computed
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("500778942c83248c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

_detect_device Ran
ran on a synthesized input
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("e08819c54ed28b5a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

_normalize Ran
ran, violated the contract we drafted
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("01bc94c373659103")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

average_embeddings Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("1bb38824b3bd6c48")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

paragraph_payload_from_text Ran
ran; our contract draft was wrong, not the code
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("0287add59cf39750")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

sections_from_text Ran
ran; our contract draft was wrong, not the code
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("f087c84a8cc6ed08")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

sentence_payloads_from_text Ran
ran; our contract draft was wrong, not the code
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("aebc0efc1e03e644")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

split_paragraphs Ran
ran; our contract draft was wrong, not the code
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("80f1ea2827f23418")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

split_sentences Ran
ran; our contract draft was wrong, not the code
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("7d740ec94a7e44e8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

DocumentIndexer Not yet run
unverified (harvested, no recorded run)
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("c3d5d1849212a614")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

EmbeddingModel Not yet run
unverified (harvested, no recorded run)
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("1d1accc5bae7d216")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

NodeKind Not yet run
unverified (harvested, no recorded run)
KohakuBlueleaf/KohakuRAG/src/kohakurag/indexer.py
pointer only (licence: NONE) · get_code("1bf84862f6855b5b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KohakuBlueleaf/KohakuRAG when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 18 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Retrieval-augmented generation (RAG) systems that answer questions from document collections face compounding difficulties when high-precision citations are required: flat chunking strategies sacrifice document structure, single-query formulations miss relevant passages through vocabulary mismatch, and single-pass inference produces stochastic answers that vary in both content and citation selection. We present KohakuRAG, a hierarchical RAG framework that preserves document structure through a four-level tree representation (document → section → paragraph → sentence) with bottom-up embedding aggregation, improves retrieval coverage through an LLM-powered query planner with cross-query reranking, and stabilizes answers through ensemble inference with abstention-aware voting. We evaluate on the WattBot 2025 Challenge, a benchmark requiring systems to answer technical questions from 32 documents with ±0.1% numeric tolerance and exact source attribution. KohakuRAG achieves first place on both public and private leaderboards (final score 0.861), as the only team to maintain the top position across both evaluation partitions. Ablation studies reveal that prompt ordering (+80% relative), retry mechanisms (+69%), and ensemble voting with blank filtering (+1.2pp) each contribute substantially, while hierarchical dense retrieval alone matches hybrid sparse-dense approaches (BM25 adds only +3.1pp). We release KohakuRAG as open-source software at https://github.com/KohakuBlueleaf/KohakuRAG.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2603.07612")
get_code_for_paper("2603.07612")
have("2603.07612")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2603.07612.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2603.07612.svg)](https://syntology.ai/paper/2603.07612)

Connect an agent — have() is free.