{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/retrieval-augmented-generation-with-1","title":"Retrieval-Augmented Generation with Hierarchical Knowledge","arxiv_id":"2503.10150","date":"2025-03-13","proceeding":null,"authors":["Haoyu Huang","Yongfeng Huang","Junjie Yang","Zhenyu Pan","Yongqiang Chen","Kaili Ma","Hongzhi Chen","James Cheng"],"abstract":"Graph-based Retrieval-Augmented Generation (RAG) methods have significantly enhanced the performance of large language models (LLMs) in domain-specific tasks. However, existing RAG methods do not adequately utilize the naturally inherent hierarchical knowledge in human cognition, which limits the capabilities of RAG systems. In this paper, we introduce a new RAG approach, called HiRAG, which utilizes hierarchical knowledge to enhance the semantic understanding and structure capturing capabilities of RAG systems in the indexing and retrieval processes. Our extensive experiments demonstrate that HiRAG achieves significant performance improvements over the state-of-the-art baseline methods. The code of our proposed method is available at \\href{https://github.com/hhy-huang/HiRAG}{https://github.com/hhy-huang/HiRAG}.","url_abs":"https://arxiv.org/abs/2503.10150v1","url_pdf":"https://arxiv.org/pdf/2503.10150v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"retrieval-augmented-generation-with-1","repo_url":"https://github.com/hhy-huang/HiRAG","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"multi-hop-question-answering","task_name":"Multi-hop Question Answering"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"rag","task_name":"RAG"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"retrieval-augmented-generation","task_name":"Retrieval-augmented Generation"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bart","method_name":"BART"},{"method_slug":"bert","method_name":"BERT"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-linear-decay","method_name":"Linear Warmup With Linear Decay"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"rag","method_name":"RAG"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"},{"method_slug":"wordpiece","method_name":"WordPiece"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2503.10150","atlas_url":"https://app.syntology.ai/?focus=2503.10150","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2503.10150"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hhy-huang/HiRAG","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":9,"unverified":2},"by_repo_kind":{"official":{"samples":11,"ran":9,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"bf9f7cd0dbc8f53e","entry":"chunking_by_token_size","repo":"hhy-huang/HiRAG","repo_kind":"official","path":"hirag/_op.py","file_url":"https://github.com/hhy-huang/HiRAG/blob/HEAD/hirag/_op.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bf9f7cd0dbc8f53e"}},{"code_sha256_prefix":"e857b5e84512c1ad","entry":"extract_first_complete_json","repo":"hhy-huang/HiRAG","repo_kind":"official","path":"hirag/_utils.py","file_url":"https://github.com/hhy-huang/HiRAG/blob/HEAD/hirag/_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e857b5e84512c1ad"}},{"code_sha256_prefix":"aa2e19784362624e","entry":"extract_values_from_json","repo":"hhy-huang/HiRAG","repo_kind":"official","path":"hirag/_utils.py","file_url":"https://github.com/hhy-huang/HiRAG/blob/HEAD/hirag/_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aa2e19784362624e"}},{"code_sha256_prefix":"afc0b756a1dddef5","entry":"fit_gaussian_mixture","repo":"hhy-huang/HiRAG","repo_kind":"official","path":"hirag/_cluster_utils.py","file_url":"https://github.com/hhy-huang/HiRAG/blob/HEAD/hirag/_cluster_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"afc0b756a1dddef5"}},{"code_sha256_prefix":"1baae13108795150","entry":"gpt_35_turbo_complete","repo":"hhy-huang/HiRAG","repo_kind":"official","path":"hirag/_llm_backup.py","file_url":"https://github.com/hhy-huang/HiRAG/blob/HEAD/hirag/_llm_backup.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1baae13108795150"}},{"code_sha256_prefix":"bb6322730b978b13","entry":"gpt_4o_complete","repo":"hhy-huang/HiRAG","repo_kind":"official","path":"hirag/_llm_backup.py","file_url":"https://github.com/hhy-huang/HiRAG/blob/HEAD/hirag/_llm_backup.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bb6322730b978b13"}},{"code_sha256_prefix":"d0c42489d83e2ac7","entry":"make_path_idable","repo":"hhy-huang/HiRAG","repo_kind":"official","path":"hirag/_storage/gdb_neo4j.py","file_url":"https://github.com/hhy-huang/HiRAG/blob/HEAD/hirag/_storage/gdb_neo4j.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d0c42489d83e2ac7"}},{"code_sha256_prefix":"34d148a5b4170144","entry":"openai_complete_if_cache","repo":"hhy-huang/HiRAG","repo_kind":"official","path":"hirag/_llm_backup.py","file_url":"https://github.com/hhy-huang/HiRAG/blob/HEAD/hirag/_llm_backup.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"34d148a5b4170144"}},{"code_sha256_prefix":"da80c1396be65c39","entry":"parse_value","repo":"hhy-huang/HiRAG","repo_kind":"official","path":"hirag/_utils.py","file_url":"https://github.com/hhy-huang/HiRAG/blob/HEAD/hirag/_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"da80c1396be65c39"}},{"code_sha256_prefix":"39d3d26fb44efb3c","entry":"chunking_by_seperators","repo":"hhy-huang/HiRAG","repo_kind":"official","path":"hirag/_op.py","file_url":"https://github.com/hhy-huang/HiRAG/blob/HEAD/hirag/_op.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"39d3d26fb44efb3c"}},{"code_sha256_prefix":"903db7183e5ab2a8","entry":"get_chunks","repo":"hhy-huang/HiRAG","repo_kind":"official","path":"hirag/_op.py","file_url":"https://github.com/hhy-huang/HiRAG/blob/HEAD/hirag/_op.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"903db7183e5ab2a8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}