{"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/arxiv-2608-21252","title":"EnSI-RAG: Entity-Structure-Indexed Retrieval-Augmented Generation for Long-Document Question Answering","arxiv_id":"2608.21252","date":"2026-08-21","proceeding":null,"authors":["Xuanyu Meng","Jiashuo Sun","Jash Rajesh Parekh","Jiawei Han"],"abstract":"Question answering (QA) over long, connected documents remains challenging because relevant evidence may span multiple entities and their relationships. Existing retrieval-augmented generation (RAG) methods typically index documents as raw chunks and retrieve them through embedding similarity. Their performance degrades when chunk boundaries separate entities from supporting evidence or when a question requires multi-hop reasoning across the corpus. We propose EnSI-RAG (Entity-Structure-Indexed Retrieval-Augmented Generation), a framework that constructs a query-independent, entity-centered index. Each record (e, t, k, v) represents an entity e, its type t, a semantic category k in {property, relation, aspect}, and a value v, while retaining links to the original source passages. At query time, these records serve as retrieval handles, and an LLM synthesizes the retrieved passages into the final answer. This design separates evidence localization from answer synthesis while preserving traceable source evidence. Across Loong and Oolong, EnSI-RAG achieves an average accuracy of 78.24. Relative to the published baseline scores used as references, this is 6.62 points higher, suggesting its effectiveness across these settings. The code is available at https://github.com/RamonMeng/EnSI-RAG.","url_abs":"https://arxiv.org/abs/2608.21252","url_pdf":"https://arxiv.org/pdf/2608.21252","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2608.21252","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2608.21252"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/RamonMeng/EnSI-RAG","reach":null}],"summary":{"ran":20},"by_repo_kind":{"found_in_text":{"samples":20,"ran":20,"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":20,"samples":[{"code_sha256_prefix":"78b1285843d93b6e","entry":"get_api_key","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/config.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/config.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"78b1285843d93b6e"}},{"code_sha256_prefix":"aa5b8ced6b97c1ab","entry":"jsonable","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/document_preparation.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/document_preparation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"aa5b8ced6b97c1ab"}},{"code_sha256_prefix":"70dc1e864dd30ccc","entry":"load_json","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-loong-eval/ensi_loong/core/legal_passages.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-loong-eval/ensi_loong/core/legal_passages.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"70dc1e864dd30ccc"}},{"code_sha256_prefix":"2e385f5f5c90302e","entry":"normalize_company_key","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/passage_builder.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/passage_builder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2e385f5f5c90302e"}},{"code_sha256_prefix":"fd547e9047bcc75b","entry":"normalize_company_key","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/record_builder.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/record_builder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fd547e9047bcc75b"}},{"code_sha256_prefix":"9a8d149d70e54ea2","entry":"normalize_key","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/passage_builder.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/passage_builder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9a8d149d70e54ea2"}},{"code_sha256_prefix":"ac7180c15a4cb129","entry":"normalize_key","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/qa_engine.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/qa_engine.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ac7180c15a4cb129"}},{"code_sha256_prefix":"f22bc792262eb61e","entry":"normalize_key","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/query_pipeline.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/query_pipeline.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f22bc792262eb61e"}},{"code_sha256_prefix":"6158ac97be435254","entry":"normalize_key","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/record_builder.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/record_builder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6158ac97be435254"}},{"code_sha256_prefix":"5dd1a77f6409253e","entry":"normalize_space","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/passage_builder.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/passage_builder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5dd1a77f6409253e"}},{"code_sha256_prefix":"b09478a6a0d8e557","entry":"normalize_space","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/qa_engine.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/qa_engine.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b09478a6a0d8e557"}},{"code_sha256_prefix":"b4ec70f459d7a890","entry":"normalize_space","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/query_pipeline.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/query_pipeline.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b4ec70f459d7a890"}},{"code_sha256_prefix":"f50f83ae09df991f","entry":"normalize_space","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/record_builder.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/record_builder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f50f83ae09df991f"}},{"code_sha256_prefix":"6630fd1e7f7008e5","entry":"openai_api_key","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-loong-eval/ensi_loong/config.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-loong-eval/ensi_loong/config.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6630fd1e7f7008e5"}},{"code_sha256_prefix":"c24e644ee0c0b239","entry":"read_jsonl","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/qa_engine.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/qa_engine.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c24e644ee0c0b239"}},{"code_sha256_prefix":"eb0cbd52ed706ce9","entry":"resolve_path","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-loong-eval/ensi_loong/config.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-loong-eval/ensi_loong/config.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"eb0cbd52ed706ce9"}},{"code_sha256_prefix":"a87ffc279c389402","entry":"sanitize_filename","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/document_preparation.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/document_preparation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a87ffc279c389402"}},{"code_sha256_prefix":"8b059ea024d8d27a","entry":"short_hash","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/document_preparation.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/document_preparation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8b059ea024d8d27a"}},{"code_sha256_prefix":"8cf11ec6fb17e413","entry":"stable_hash","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/query_pipeline.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/query_pipeline.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8cf11ec6fb17e413"}},{"code_sha256_prefix":"fc2d6ce0aaac8fbf","entry":"with_overrides","repo":"RamonMeng/EnSI-RAG","repo_kind":"found_in_text","path":"ensi-rag-financebench-eval/ensi_financebench/config.py","file_url":"https://github.com/RamonMeng/EnSI-RAG/blob/HEAD/ensi-rag-financebench-eval/ensi_financebench/config.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fc2d6ce0aaac8fbf"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}