{"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-2603-20017","title":"RouterKGQA: Specialized--General Model Routing for Constraint-Aware Knowledge Graph Question Answering","arxiv_id":"2603.20017","date":"2026-03-20","proceeding":null,"authors":["Bo Yuan","Hexuan Deng","Xuebo Liu","Min Zhang"],"abstract":"Knowledge graph question answering (KGQA) is a promising approach for mitigating LLM hallucination by grounding reasoning in structured and verifiable knowledge graphs. Existing approaches fall into two paradigms: retrieval-based methods utilize small specialized models, which are efficient but often produce unreachable paths and miss implicit constraints, while agent-based methods utilize large general models, which achieve stronger structural grounding at substantially higher cost. We propose RouterKGQA, a framework for specialized--general model collaboration, in which a specialized model generates reasoning paths and a general model performs KG-guided repair only when needed, improving performance at minimal cost. We further equip the specialized with constraint-aware answer filtering, which reduces redundant answers. In addition, we design a more efficient general agent workflow, further lowering inference cost. Experimental results show that RouterKGQA outperforms the previous best by 3.57 points in F1 and 0.49 points in Hits@1 on average across benchmarks, while requiring only 1.15 average LLM calls per question. Codes and models are available at https://github.com/Oldcircle/RouterKGQA.","url_abs":"https://arxiv.org/abs/2603.20017","url_pdf":"https://arxiv.org/pdf/2603.20017","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=2603.20017","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2603.20017"}},"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/Oldcircle/RouterKGQA","reach":null}],"summary":{"ran_draft_wrong":2,"ran_violates":1,"unverified":17},"by_repo_kind":{"found_in_text":{"samples":20,"ran":3,"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":"9df40357afea56cc","entry":"to_list","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"config.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/config.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9df40357afea56cc"}},{"code_sha256_prefix":"b2feca00ae40a160","entry":"is_number","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"evaluate.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/evaluate.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b2feca00ae40a160"}},{"code_sha256_prefix":"038bd5a70277091b","entry":"type_checker","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"evaluate.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/evaluate.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"038bd5a70277091b"}},{"code_sha256_prefix":"12463bd4ac760fc0","entry":"date_post_process","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"evaluate.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/evaluate.py","link_basis":"first_harvest_node","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":"12463bd4ac760fc0"}},{"code_sha256_prefix":"c6c40b1c5bfcfce5","entry":"dump_json","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"components/utils.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/components/utils.py","link_basis":"first_harvest_node","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":"c6c40b1c5bfcfce5"}},{"code_sha256_prefix":"e267b92fe2e9c426","entry":"get_model_class","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"config.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/config.py","link_basis":"first_harvest_node","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":"e267b92fe2e9c426"}},{"code_sha256_prefix":"59e485418bc26b24","entry":"get_symbol_type","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"executor/logic_form_util.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/executor/logic_form_util.py","link_basis":"first_harvest_node","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":"59e485418bc26b24"}},{"code_sha256_prefix":"572a76bdb7ce1656","entry":"get_value_for_year","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"entity_retrieval/aqqu_entity_linker.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/entity_retrieval/aqqu_entity_linker.py","link_basis":"first_harvest_node","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":"572a76bdb7ce1656"}},{"code_sha256_prefix":"2bc45468ebfe2d61","entry":"httpPort","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"Freebase-Setup/virtuoso.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/Freebase-Setup/virtuoso.py","link_basis":"first_harvest_node","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":"2bc45468ebfe2d61"}},{"code_sha256_prefix":"f42bcb1c173e1a09","entry":"isqlPort","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"Freebase-Setup/virtuoso.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/Freebase-Setup/virtuoso.py","link_basis":"first_harvest_node","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":"f42bcb1c173e1a09"}},{"code_sha256_prefix":"2d8aeba7bf38ecda","entry":"lisp_to_nested_expression","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"executor/logic_form_util.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/executor/logic_form_util.py","link_basis":"first_harvest_node","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":"2d8aeba7bf38ecda"}},{"code_sha256_prefix":"0572ce867129132b","entry":"load_bin","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"components/utils.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/components/utils.py","link_basis":"first_harvest_node","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":"0572ce867129132b"}},{"code_sha256_prefix":"7277c744809fb106","entry":"load_json","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"components/utils.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/components/utils.py","link_basis":"first_harvest_node","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":"7277c744809fb106"}},{"code_sha256_prefix":"e8cde2d16a8c1b7c","entry":"load_untrained_model","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"config.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/config.py","link_basis":"first_harvest_node","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":"e8cde2d16a8c1b7c"}},{"code_sha256_prefix":"b800e090d1f27021","entry":"parse_all_filters","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"data_process/sparql_to_crp.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/data_process/sparql_to_crp.py","link_basis":"first_harvest_node","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":"b800e090d1f27021"}},{"code_sha256_prefix":"f6084e968f694bac","entry":"parse_sparql","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"data_process/sparql_to_crp.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/data_process/sparql_to_crp.py","link_basis":"first_harvest_node","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":"f6084e968f694bac"}},{"code_sha256_prefix":"3e0e55a1459eb4f0","entry":"read_abbreviations","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"entity_retrieval/aqqu_util.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/entity_retrieval/aqqu_util.py","link_basis":"first_harvest_node","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":"3e0e55a1459eb4f0"}},{"code_sha256_prefix":"2b8c76f1ff45f86e","entry":"remove_abbreviations_from_entity_name","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"entity_retrieval/aqqu_util.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/entity_retrieval/aqqu_util.py","link_basis":"first_harvest_node","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":"2b8c76f1ff45f86e"}},{"code_sha256_prefix":"acd5c28102430f1b","entry":"run","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"Freebase-Setup/virtuoso.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/Freebase-Setup/virtuoso.py","link_basis":"first_harvest_node","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":"acd5c28102430f1b"}},{"code_sha256_prefix":"87e2744d57d71f30","entry":"same_logical_form","repo":"Oldcircle/RouterKGQA","repo_kind":"found_in_text","path":"executor/logic_form_util.py","file_url":"https://github.com/Oldcircle/RouterKGQA/blob/HEAD/executor/logic_form_util.py","link_basis":"first_harvest_node","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":"87e2744d57d71f30"}}]},"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}