[Paper Review] Few-shot In-context Learning for Knowledge Base Question Answering
KB-BINDER is a training-free few-shot in-context learning framework for knowledge base question answering that uses large language models to generate draft logical forms, then grounds them to executable forms via KB-aware entity and relation binding. It achieves state-of-the-art performance on multiple heterogeneous KBQA datasets, outperforming fully trained models on GraphQA and 3-hop MetaQA with only a few demonstrations.
Question answering over knowledge bases is considered a difficult problem due to the challenge of generalizing to a wide variety of possible natural language questions. Additionally, the heterogeneity of knowledge base schema items between different knowledge bases often necessitates specialized training for different knowledge base question-answering (KBQA) datasets. To handle questions over diverse KBQA datasets with a unified training-free framework, we propose KB-BINDER, which for the first time enables few-shot in-context learning over KBQA tasks. Firstly, KB-BINDER leverages large language models like Codex to generate logical forms as the draft for a specific question by imitating a few demonstrations. Secondly, KB-BINDER grounds on the knowledge base to bind the generated draft to an executable one with BM25 score matching. The experimental results on four public heterogeneous KBQA datasets show that KB-BINDER can achieve a strong performance with only a few in-context demonstrations. Especially on GraphQA and 3-hop MetaQA, KB-BINDER can even outperform the state-of-the-art trained models. On GrailQA and WebQSP, our model is also on par with other fully-trained models. We believe KB-BINDER can serve as an important baseline for future research. Our code is available at https://github.com/ltl3A87/KB-BINDER.
Motivation & Objective
- To address the challenge of low-resource, schema-heterogeneous KBQA by enabling few-shot in-context learning without fine-tuning.
- To overcome the difficulty of LLMs generating incorrect schema items (entities/relations) due to lack of KB schema awareness.
- To develop a unified, training-free framework that generalizes across diverse KBQA datasets with minimal in-context demonstrations.
- To improve robustness and coverage in few-shot settings by combining LLM-generated drafts with KB-based binding and majority voting.
Proposed method
- Uses large language models like Codex to generate preliminary logical form drafts for unseen questions based on a few in-context demonstrations.
- Applies a lexicon-based similarity search over the entire knowledge base to bind incorrect or hallucinated entities in the draft to correct ones.
- Performs local neighborhood search around bound entities to correct erroneous relations in the draft using KB schema matching.
- Generates multiple candidate logical forms from top-k drafts and applies majority voting to improve answer coverage and accuracy.
- Introduces KB-BINDER-R, which retrieves more relevant exemplars from the training set to enhance few-shot performance, especially for I.I.D. question types.
- Executes the refined, grounded logical forms against the KB to retrieve final answers, ensuring correctness and executability.
Experimental results
Research questions
- RQ1Can few-shot in-context learning be effectively applied to knowledge base question answering without model fine-tuning?
- RQ2How can large language models generate reliable logical forms for KBQA when they lack schema awareness of the target knowledge base?
- RQ3What mechanisms can improve the robustness and coverage of in-context KBQA systems in low-resource settings?
- RQ4How does the number of in-context demonstrations and the number of generated drafts affect performance and inference cost?
- RQ5Can retrieved exemplars from the training set further enhance few-shot performance, especially for I.I.D. question types?
Key findings
- KB-BINDER achieves 39.5 F1 on GraphQA and 99.5% Hits@1 on 3-hop MetaQA, surpassing previous state-of-the-art fully trained models by 7.7 F1 and 0.6% Hits@1 respectively.
- On WebQSP and GrailQA, KB-BINDER performs on par with fully trained models, demonstrating strong generalization across diverse KBQA datasets.
- KB-BINDER-R with retrieved exemplars improves performance significantly on I.I.D. questions, achieving 72.5 EM on GrailQA, outperforming standard KB-BINDER.
- Increasing the number of in-context exemplars from 1 to 100 improves both coverage and EM score, with a 19% increase in coverage and 5.6% increase in EM when using 40 exemplars.
- The method maintains stable performance across all question types in GrailQA, unlike supervised baselines that show large performance drops (10–47.5 points) on non-I.I.D. questions.
- Ablation studies confirm that both the number of exemplars and the number of generated drafts significantly impact performance, with diminishing returns beyond certain thresholds.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.