FlexKBQA: A Flexible LLM-Powered Framework for Few-Shot Knowledge Base Question Answering (2308.12060v3)
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 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 code is open-sourced.
- Semantic parsing on freebase from question-answer pairs. In Proceedings of the 2013 conference on empirical methods in natural language processing, 1533–1544.
- KQA Pro: A Dataset with Explicit Compositional Programs for Complex Question Answering over Knowledge Base. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 6101–6119.
- Program transfer for answering complex questions over knowledge bases. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 8128–8140.
- Evaluating Large Language Models Trained on Code. arXiv:2107.03374.
- ReTraCk: A flexible and efficient framework for knowledge base question answering. In Proceedings of the 59th annual meeting of the association for computational linguistics and the 11th international joint conference on natural language processing: system demonstrations, 325–336.
- Batch Prompting: Efficient Inference with Large Language Model APIs. arXiv:2301.08721.
- Binding Language Models in Symbolic Languages. arXiv:2210.02875.
- Case-based Reasoning for Natural Language Queries over Knowledge Bases. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, 9594–9611.
- BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), 4171–4186. Minneapolis, Minnesota: Association for Computational Linguistics.
- FewRel 2.0: Towards More Challenging Few-Shot Relation Classification. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), 6250–6255.
- Don’t Generate, Discriminate: A Proposal for Grounding Language Models to Real-World Environments. arXiv:2212.09736.
- Beyond iid: three levels of generalization for question answering on knowledge bases. In Proceedings of the Web Conference 2021, 3477–3488.
- Knowledge Base Question Answering: A Semantic Parsing Perspective. arXiv:2209.04994.
- ArcaneQA: Dynamic Program Induction and Contextualized Encoding for Knowledge Base Question Answering. In Proceedings of the 29th International Conference on Computational Linguistics, 1718–1731.
- Distilling the Knowledge in a Neural Network. arXiv:1503.02531.
- A Survey on Complex Knowledge Base Question Answering: Methods, Challenges and Solutions. arXiv:2105.11644.
- Query Graph Generation for Answering Multi-hop Complex Questions from Knowledge Bases. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, 969–974.
- Efficient One-Pass End-to-End Entity Linking for Questions. arXiv:2010.02413.
- Few-shot In-context Learning for Knowledge Base Question Answering. arXiv:2305.01750.
- Effective few-shot named entity linking by meta-learning. In 2022 IEEE 38th International Conference on Data Engineering (ICDE), 178–191. IEEE.
- Toward a Unified Framework for Unsupervised Complex Tabular Reasoning. In 2023 IEEE 39th International Conference on Data Engineering (ICDE), 1691–1704. IEEE.
- Generating Training Data with Language Models: Towards Zero-Shot Language Understanding. arXiv:2202.04538.
- Lever: Learning to verify language-to-code generation with execution. In International Conference on Machine Learning, 26106–26128. PMLR.
- OpenAI. 2023. GPT-4 Technical Report. arXiv:2303.08774.
- Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks. arXiv:1908.10084.
- CLASP: Few-Shot Cross-Lingual Data Augmentation for Semantic Parsing. arXiv:2210.07074.
- LINGUIST: Language Model Instruction Tuning to Generate Annotated Utterances for Intent Classification and Slot Tagging. arXiv:2209.09900.
- Generating Datasets with Pretrained Language Models. arXiv:2104.07540.
- Modeling relational data with graph convolutional networks. In The Semantic Web: 15th International Conference, ESWC 2018, Heraklion, Crete, Greece, June 3–7, 2018, Proceedings 15, 593–607. Springer.
- TIARA: Multi-grained Retrieval for Robust Question Answering over Large Knowledge Bases. arXiv:2210.12925.
- Progprompt: Generating situated robot task plans using large language models. In 2023 IEEE International Conference on Robotics and Automation (ICRA), 11523–11530. IEEE.
- On generating characteristic-rich question sets for qa evaluation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, 562–572.
- Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems, 35: 24824–24837.
- ZeroGen: Efficient Zero-shot Learning via Dataset Generation. arXiv:2202.07922.
- Generating Data for Symbolic Language with Large Language Models. arXiv:2305.13917.
- RNG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answering. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 6032–6043.
- The value of semantic parse labeling for knowledge base question answering. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), 201–206.
- DecAF: Joint Decoding of Answers and Logical Forms for Question Answering over Knowledge Bases. arXiv:2210.00063.
- Zhenyu Li (120 papers)
- Sunqi Fan (4 papers)
- Yu Gu (218 papers)
- Xiuxing Li (11 papers)
- Zhichao Duan (8 papers)
- Bowen Dong (27 papers)
- Ning Liu (199 papers)
- Jianyong Wang (38 papers)