Code-Style In-Context Learning for Knowledge-Based Question Answering
Zhijie Nie, Richong Zhang, Zhongyuan Wang, Xudong Liu
摘要
Current methods for Knowledge-Based Question Answering (KBQA) usually rely on complex training techniques and model frameworks, leading to many limitations in practical applications. Recently, the emergence of In-Context Learning (ICL) capabilities in Large Language Models (LLMs) provides a simple and training-free semantic parsing paradigm for KBQA: Given a small number of questions and their labeled logical forms as demo examples, LLMs can understand the task intent and generate the logic form for a new question. However, current powerful LLMs have little exposure to logic forms during pre-training, resulting in a high format error rate. To solve this problem, we propose a code-style in-context learning method for KBQA, which converts the generation process of unfamiliar logical form into the more familiar code generation process for LLMs. Experimental results on three mainstream datasets show that our method dramatically mitigated the formatting error problem in generating logic forms while realizing a new SOTA on WebQSP, GrailQA, and GraphQ under the few-shot setting. The code and supplementary files are released at https://github.com/ Arthurizijar/KB-Coder.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 16 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Enhancing Complex Question Answering over Knowledge Graphs through Evidence Pattern Retrieval 引用了 Beyond I.I.D.: Three Levels of Generalization for Question Answering on Knowledge Bases
- Middleware for LLMs: Tools Are Instrumental for Language Agents in Complex Environments 引用了 Beyond I.I.D.: Three Levels of Generalization for Question Answering on Knowledge Bases
- QueryAgent: A Reliable and Efficient Reasoning Framework with Environmental Feedback based Self-Correction 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
- QueryAgent: A Reliable and Efficient Reasoning Framework with Environmental Feedback based Self-Correction 引用了 Least-to-Most Prompting Enables Complex Reasoning in Large Language Models
- QueryAgent: A Reliable and Efficient Reasoning Framework with Environmental Feedback based Self-Correction 引用了 Beyond I.I.D.: Three Levels of Generalization for Question Answering on Knowledge Bases
- QueryAgent: A Reliable and Efficient Reasoning Framework with Environmental Feedback based Self-Correction 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Self-Consistency Improves Chain of Thought Reasoning in Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
- Debate on Graph: A Flexible and Reliable Reasoning Framework for Large Language Models 引用了 Beyond I.I.D.: Three Levels of Generalization for Question Answering on Knowledge Bases
- Debate on Graph: A Flexible and Reliable Reasoning Framework for Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Least-to-Most Prompting Enables Complex Reasoning in Large Language Models 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
- Least-to-Most Prompting Enables Complex Reasoning in Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Privacy-protected Retrieval-Augmented Generation for Knowledge Graph Question Answering 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
- Privacy-protected Retrieval-Augmented Generation for Knowledge Graph Question Answering 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
引用它的顶会 Paper16
- Enhancing Complex Question Answering over Knowledge Graphs through Evidence Pattern RetrievalWentao Ding, Jinmao Li, Liangchuan Luo, Yuzhong QuWWW 2024 · 32 次引用
- Middleware for LLMs: Tools Are Instrumental for Language Agents in Complex EnvironmentsYu Gu, Yiheng Shu, Hao Yu, Xiao Liu 等EMNLP 2024 · 11 次引用
- Debate on Graph: A Flexible and Reliable Reasoning Framework for Large Language ModelsJie Ma, Zhitao Gao, Qi Chai, Wangchun Sun 等AAAI 2025 · 8 次引用
- QueryAgent: A Reliable and Efficient Reasoning Framework with Environmental Feedback based Self-CorrectionXiang Huang, Sitao Cheng, Shanshan Huang, Jiayu Shen 等ACL 2024 · 3 次引用
- Privacy-protected Retrieval-Augmented Generation for Knowledge Graph Question AnsweringYunfeng Ning, Mayi Xu, Jintao Wen, Qiankun Pi 等AAAI 2026 · 3 次引用
它引用的 Paper14
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- SimCSE: Simple Contrastive Learning of Sentence EmbeddingsTianyu Gao, Xingcheng Yao, Danqi ChenEMNLP 2021 · 2,496 次引用
- Self-Consistency Improves Chain of Thought Reasoning in Language ModelsXuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le 等ICLR 2023 · 681 次引用
- Least-to-Most Prompting Enables Complex Reasoning in Large Language ModelsDenny Zhou, Nathanael Schärli, Le Hou, Jason Wei 等ICLR 2023 · 318 次引用
- Beyond I.I.D.: Three Levels of Generalization for Question Answering on Knowledge BasesYu Gu, Sue Kase, Michelle Vanni, Brian M. Sadler 等WWW 2021 · 304 次引用
相关 Paper
- How Proficient Are Large Language Models in Formal Languages? An In-Depth Insight for Knowledge Base Question AnsweringJinxin Liu, Shulin Cao, Jiaxin Shi, Tingjian Zhang 等ACL Findings 2024 · 8 次引用
- Augmenting Reasoning Capabilities of LLMs with Graph Structures in Knowledge Base Question AnsweringYuhang Tian, Dandan Song, Zhijing Wu, Changzhi Zhou 等EMNLP Findings 2024 · 5 次引用
- Few-shot In-context Learning on Knowledge Base Question AnsweringTianle Li, Xueguang Ma, Alex Zhuang, Yu Gu 等ACL 2023 · 55 次引用
- Subgraph-Guided Executable Logical Form Generation for Knowledge Base Question AnsweringYuhang Tian, Dandan Song, Zhijing Wu, Changzhi Zhou 等ACL Findings 2026
- SymKGQA: Few-Shot Knowledge Graph Question Answering via Symbolic Program Generation and ExecutionPrerna Agarwal, Nishant Kumar, Srikanta BedathurACL 2024 · 6 次引用
