Papers › ChatKBQA: A Generate-then-Retrieve Framework for Knowledge Base Question Answering...

ChatKBQA: A Generate-then-Retrieve Framework for Knowledge Base Question Answering with Fine-tuned Large Language Models

13 Oct 2023arXiv:2310.08975archive 2025-07-28

Haoran Luo, Haihong E, Zichen Tang, Shiyao Peng, Yikai Guo, Wentai Zhang, Chenghao Ma, Guanting Dong, Meina Song, Wei Lin, Yifan Zhu, Luu Anh Tuan

Knowledge Base Question Answering (KBQA) aims to answer natural language questions over large-scale knowledge bases (KBs), which can be summarized into two crucial steps: knowledge retrieval and semantic parsing. However, three core challenges remain: inefficient knowledge retrieval, mistakes of retrieval adversely impacting semantic parsing, and the complexity of previous KBQA methods. To tackle these challenges, we introduce ChatKBQA, a novel and simple generate-then-retrieve KBQA framework, which proposes first generating the logical form with fine-tuned LLMs, then retrieving and replacing entities and relations with an unsupervised retrieval method, to improve both generation and retrieval more directly. Experimental results show that ChatKBQA achieves new state-of-the-art performance on standard KBQA datasets, WebQSP, and CWQ. This work can also be regarded as a new paradigm for combining LLMs with knowledge graphs (KGs) for interpretable and knowledge-required question answering. Our code is publicly available.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2310.08975")

Code

Syntology Ran 8 of 16 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 1 ran · violated contract; 3 ran · our draft was wrong; 4 ran with no contract checked.

By repository: official repository: 16 samples from 1 repository, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

lhrlab/chatkbqa officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested; 8 ran; 0 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · violated contract
3ran · our draft was wrong
4ran
8unverified

Licence: 0 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from lhrlab/chatkbqa. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

to_list lhrlab/chatkbqa/config.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 9df40357afea56cc · report
date_post_process lhrlab/chatkbqa/eval_final.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 7c96e3db8ff7299a · report
extract_entities lhrlab/chatkbqa/components/expr_parser.py official repository ran fingerprinted MIT (permissive) · e73dc55f0b4f1aed · report
extract_relations lhrlab/chatkbqa/components/expr_parser.py official repository ran fingerprinted MIT (permissive) · eb0198ee05eaa775 · report
is_number lhrlab/chatkbqa/eval_final.py official repository ran · violated contract MIT (permissive) · b2feca00ae40a160 · report
prepare_dataloader lhrlab/chatkbqa/run_generator_final.py official repository ran MIT (permissive) · 7600856fdde258c1 · report
tokenize_s_expr lhrlab/chatkbqa/components/expr_parser.py official repository ran fingerprinted MIT (permissive) · 75b1fc99101be3e8 · report
type_checker lhrlab/chatkbqa/eval_final.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 038bd5a70277091b · report
convert_cwq_sparql_instance lhrlab/chatkbqa/parse_sparql_cwq.py official repository unverified MIT (permissive) · 6f0de9ba1399e587 · report
convert_parse_instance lhrlab/chatkbqa/parse_sparql_webqsp.py official repository unverified MIT (permissive) · b6fede6aafdf9760 · report
convert_webqsp_sparql_instance lhrlab/chatkbqa/parse_sparql_webqsp.py official repository unverified MIT (permissive) · 0632af12ebb615dc · report
get_model_class lhrlab/chatkbqa/config.py official repository unverified MIT (permissive) · e267b92fe2e9c426 · report
httpPort lhrlab/chatkbqa/Freebase-Setup/virtuoso.py official repository unverified MIT (permissive) · 2bc45468ebfe2d61 · report
isqlPort lhrlab/chatkbqa/Freebase-Setup/virtuoso.py official repository unverified MIT (permissive) · f42bcb1c173e1a09 · report
load_untrained_model lhrlab/chatkbqa/config.py official repository unverified MIT (permissive) · e8cde2d16a8c1b7c · report
run lhrlab/chatkbqa/Freebase-Setup/virtuoso.py official repository unverified MIT (permissive) · acd5c28102430f1b · report

Tasks

Knowledge Base Question AnsweringKnowledge GraphsQuestion AnsweringRetrievalSemantic Parsing

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Knowledge Base Question Answering ComplexWebQuestions ChatKBQA Accuracy 76.8 #1 of 6 Archive leaderboard report
Knowledge Base Question Answering ComplexWebQuestions ChatKBQA F1 81.3 #1 of 6 Archive leaderboard report
Knowledge Base Question Answering ComplexWebQuestions ChatKBQA Hits@1 86.0 #1 of 6 Archive leaderboard report
Knowledge Base Question Answering WebQuestionsSP ChatKBQA Accuracy 77.8 #1 of 8 Archive leaderboard report
Knowledge Base Question Answering WebQuestionsSP ChatKBQA F1 83.5 #1 of 8 Archive leaderboard report
Knowledge Base Question Answering WebQuestionsSP ChatKBQA Hits@1 86.4 #1 of 8 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

BASE

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections