FlexKBQA: A Flexible LLM-Powered Framework for Few-Shot Knowledge Base Question Answering
Zhenyu Li, Sunqi Fan, Yu Gu, Xiuxing Li, Zhichao Duan, Bowen Dong, Ning Liu, Jianyong Wang
Abstract
Knowledge base question answering (KBQA) is a critical yet challenging task due to the vast number of entities within knowledge bases and the diversity of natural language questions posed by users. Unfortunately, the performance of most KBQA models tends to decline significantly in real-world scenarios where high-quality annotated data is insufficient. To mitigate the burden associated with manual annotation, we introduce FlexKBQA by utilizing Large Language Models (LLMs) as program translators for addressing the challenges inherent in the few-shot KBQA task. Specifically, FlexKBQA leverages automated algorithms to sample diverse programs, such as SPARQL queries, from the knowledge base, which are subsequently converted into natural language questions via LLMs. This synthetic dataset facilitates training a specialized lightweight model for the KB. Additionally, to reduce the barriers of distribution shift between synthetic data and real user questions, FlexKBQA introduces an executionguided self-training method to iterative leverage unlabeled user questions. Furthermore, we explore harnessing the inherent reasoning capability of LLMs to enhance the entire framework. Consequently, FlexKBQA delivers substantial flexibility, encompassing data annotation, deployment, and being domain agnostic. Through extensive experiments on GrailQA, WebQSP, and KQA Pro, we observe that under the few-shot even the more challenging zero-shot scenarios, FlexKBQA achieves impressive results with a few annotations, surpassing all previous baselines and even approaching the performance of supervised models, achieving a remarkable 93% performance relative to the fully-supervised models. We posit that FlexKBQA represents a significant advancement towards exploring better integration of large and lightweight models. The source code and pertinent documentation are readily accessible on established open-source repositories 1 .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 0797afaa-46a1-4097-a327-93cfbc9594b9Cited by top-tier papers24
- Plan-on-Graph: Self-Correcting Adaptive Planning of Large Language Model on Knowledge GraphsLiyi Chen, Panrong Tong, Zhongming Jin, Ying Sun et al.NeurIPS 2024 · 160 citations
- Enhancing Complex Question Answering over Knowledge Graphs through Evidence Pattern RetrievalWentao Ding, Jinmao Li, Liangchuan Luo, Yuzhong QuWWW 2024 · 32 citations
- Natural Language Dataset Generation Framework for Visualizations Powered by Large Language ModelsHyung-Kwon Ko, Hyeon Jeon, Gwanmo Park, Dae Hyun Kim et al.CHI 2024 · 20 citations
- Tool-Augmented Spatiotemporal Reasoning for Streamlining Video Question Answering TaskSunqi Fan, Jiashuo Cui, Meng-Hao Guo, Shuojin YangNeurIPS 2025 · 15 citations
- iQUEST: An Iterative Question-Guided Framework for Knowledge Base Question AnsweringShuai Wang, Yinan YuACL 2025 · 12 citations
Builds on14
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- LEVER: Learning to Verify Language-to-Code Generation with ExecutionAnsong Ni, Srini Iyer, Dragomir Radev, Veselin Stoyanov et al.ICML 2023 · 318 citations
- Generating Training Data with Language Models: Towards Zero-Shot Language UnderstandingYu Meng, Jiaxin Huang, Yu Zhang, Jiawei HanNeurIPS 2022 · 309 citations
- Beyond I.I.D.: Three Levels of Generalization for Question Answering on Knowledge BasesYu Gu, Sue Kase, Michelle Vanni, Brian M. Sadler et al.WWW 2021 · 304 citations
- RNG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question AnsweringXi Ye, Semih Yavuz, Kazuma Hashimoto, Yingbo Zhou et al.ACL 2022 · 203 citations
Related papers
- Few-shot Transfer Learning for Knowledge Base Question Answering: Fusing Supervised Models with In-Context LearningMayur Patidar, Riya Sawhney, Avinash Kumar Singh, Biswajit Chatterjee et al.ACL 2024
- KBQA-o1: Agentic Knowledge Base Question Answering with Monte Carlo Tree SearchHaoran Luo, Haihong E, Yikai Guo, Qika Lin et al.ICML 2025 · 1 citation
- Promoting Knowledge Base Question Answering by Directing LLMs to Generate Task-relevant Logical FormsJianqi Gao, Jian Cao, Ranran Bu, Nengjun Zhu et al.AAAI 2025 · 6 citations
- Interactive-KBQA: Multi-Turn Interactions for Knowledge Base Question Answering with Large Language ModelsGuanming Xiong, Junwei Bao, Wen ZhaoACL 2024
- KBQA-R1: Reinforcing Large Language Models for Knowledge Base Question AnsweringXin Sun, Zhongqi Chen, Xing Zheng, Bowen Song et al.ICML 2026 · 2 citations
