SymKGQA: Few-Shot Knowledge Graph Question Answering via Symbolic Program Generation and Execution
Prerna Agarwal, Nishant Kumar, Srikanta Bedathur
Abstract
Semantic Parsing of natural language questions into their executable logical form (LF) has shown state-of-the-art (SOTA) performance for Knowledge Graph Question Answering (KGQA). However, these methods are not applicable for real-world applications, due to lack of KG-specific training data. Recent advances in the capabilities of Large Language Models (LLMs) has led towards generating low-level LFs such as SPARQL and S-Expression in a few-shot setting. Unfortunately, these methods: (1) are limited to the knowledge of underlying LLM about the LF, (2) performs inferior for the harder complex benchmarks such as KQA Pro, (3) suffers while grounding the generated LF to a specific Knowledge Graph. Recently, a new LF called KoPL (Cao et al., 2022a) has been introduced that explicitly models complex reasoning process step-by-step in a symbolic manner and has shown SOTA on KQA Pro in fully-supervised setting. Inspired by this, we propose SymKGQA 1 framework that generates step-by-step Symbolic LF i.e., KoPL in a few-shot in-context learning setting using LLM. Our framework is not dependent on pre-trained knowledge of LLM about KoPL. We further build a Retrieval-Augmented Generation based Question-Aware Contextual KoPL (QUACK) resolver to ground the generated LF. Our experiments with different LLMs and few-shot settings demonstrate that SymKGQA outperforms all other few-shot and even many of the fully-supervised KGQA approaches.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- MobileKGQA: On-Device KGQA System on Dynamic Mobile Environments cites Improving Multi-hop Question Answering over Knowledge Graphs using Knowledge Base Embeddings
- MobileKGQA: On-Device KGQA System on Dynamic Mobile Environments cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Least-to-Most Prompting Enables Complex Reasoning in Large Language Models cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Cited by top-tier papers1
Builds on15
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
- Improving Multi-hop Question Answering over Knowledge Graphs using Knowledge Base EmbeddingsApoorv Saxena, Aditay Tripathi, Partha P. TalukdarACL 2020 · 488 citations
- Least-to-Most Prompting Enables Complex Reasoning in Large Language ModelsDenny Zhou, Nathanael Schärli, Le Hou, Jason Wei et al.ICLR 2023 · 318 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
Related papers
- A Zero-Shot Neuro-Symbolic Approach for Complex Knowledge Graph Question AnsweringPrerna Agarwal, Srikanta BedathurEMNLP Findings 2025 · 3 citations
- From Parse-Execute to Parse-Execute-Refine: Improving Semantic Parser for Complex Question Answering over Knowledge BaseWangzhen Guo, Linyin Luo, Hanjiang Lai, Jian YinEMNLP 2023 · 5 citations
- From Phrases to Subgraphs: Fine-Grained Semantic Parsing for Knowledge Graph Question AnsweringYurun Song, Xiangqing Shen, Rui XiaACL Findings 2025 · 4 citations
- KQA Pro: A Dataset with Explicit Compositional Programs for Complex Question Answering over Knowledge BaseShulin Cao, Jiaxin Shi, Liangming Pan, Lunyiu Nie et al.ACL 2022
- GCA-KBQA: A Step-Wise Logical Form Generation Approach for KBQA with Knowledge-Assisted CalibrationRanran Bu, Jian Cao, Jianqi Gao, Jinghua Tang et al.SIGIR 2026
