Lune

EMNLP2023Top-tier venue

Question Answering as Programming for Solving Time-Sensitive Questions

Xinyu Zhu, Cheng Yang, Bei Chen, Siheng Li, Jian-Guang Lou, Yujiu Yang

Abstract

Question answering plays a pivotal role in human daily life because it involves our acquisition of knowledge about the world. However, due to the dynamic and ever-changing nature of real-world facts, the answer can be completely different when the time constraint in the question changes. Recently, Large Language Models (LLMs) have shown remarkable intelligence in question answering, while our experiments reveal that the aforementioned problems still pose a significant challenge to existing LLMs. This can be attributed to the LLMs’ inability to perform rigorous reasoning based on surface-level text semantics. To overcome this limitation, rather than requiring LLMs to directly answer the question, we propose a novel approach where we reframe the Question Answering task as Programming (QAaP). Concretely, by leveraging modern LLMs’ superior capability in understanding both natural language and programming language, we endeavor to harness LLMs to represent diversely expressed text as well-structured code and select the best matching answer from multiple candidates through programming. We evaluate our QAaP framework on several time-sensitive question answering datasets and achieve decent improvement, up to 14.5% over strong baselines.

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.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • TimeBench: A Comprehensive Evaluation of Temporal Reasoning Abilities in Large Language Models cites Large Language Models are Zero-Shot Reasoners
  • How Do Large Language Models Capture the Ever-changing World Knowledge? A Review of Recent Advances cites Language Models are Few-Shot Learners
  • How Do Large Language Models Capture the Ever-changing World Knowledge? A Review of Recent Advances cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • ChroKnowledge: Unveiling Chronological Knowledge of Language Models in Multiple Domains cites How Do Large Language Models Capture the Ever-changing World Knowledge? A Review of Recent Advances
  • It's High Time: A Survey of Temporal Question Answering cites TimeBench: A Comprehensive Evaluation of Temporal Reasoning Abilities in Large Language Models
  • Large Language Models are Zero-Shot Reasoners cites Language Models are Few-Shot Learners
  • Large Language Models are Zero-Shot Reasoners cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. How Do Large Language Models Capture the Ever-changing World Knowledge? A Review of Recent AdvancesZihan Zhang, Meng Fang, Ling Chen, Mohammad-Reza Namazi-Rad et al.EMNLP 2023 · 22 citations
  2. TimeBench: A Comprehensive Evaluation of Temporal Reasoning Abilities in Large Language ModelsZheng Chu, Jingchang Chen, Qianglong Chen, Weijiang Yu et al.ACL 2024 · 12 citations
  3. ToolBeHonest: A Multi-level Hallucination Diagnostic Benchmark for Tool-Augmented Large Language ModelsYuxiang Zhang, Jing Chen, Junjie Wang, Yaxin Liu et al.EMNLP 2024 · 6 citations
  4. It's High Time: A Survey of Temporal Question AnsweringBhawna Piryani, Abdelrahman Abdallah, Jamshid Mozafari, Avishek Anand et al.ACL 2026 · 6 citations
  5. ChroKnowledge: Unveiling Chronological Knowledge of Language Models in Multiple DomainsYein Park, Chanwoong Yoon, Jungwoo Park, Donghyeon Lee et al.ICLR 2025

Builds on14

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  3. Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo et al.NeurIPS 2022 · 8,168 citations
  4. Toolformer: Language Models Can Teach Themselves to Use ToolsTimo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu et al.NeurIPS 2023 · 5,989 citations
  5. Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie et al.NeurIPS 2020 · 3,159 citations

Related papers

  1. AdapTime: Enabling Adaptive Temporal Reasoning in Large Language ModelsYimin Deng, Yejing Wang, Zhenxi Lin, Zichuan Fu et al.ACL Findings 2026
  2. Enhancing Temporal Sensitivity and Reasoning for Time-Sensitive Question AnsweringWanqi Yang, Yanda Li, Meng Fang, Ling ChenEMNLP Findings 2024 · 4 citations
  3. FACT: Mitigating Inconsistent Hallucinations in LLMs via Fact-Driven Alternating Code-Text TrainingXinxin You, Qixin Sun, Chenwei Yan, Xiao Zhang et al.NeurIPS 2025
  4. 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 et al.ACL Findings 2024 · 8 citations
  5. Prompting Is Programming: A Query Language for Large Language ModelsLuca Beurer-Kellner, Marc Fischer, Martin T. VechevPLDI 2023 · 114 citations
Dusk over the sea between two cliffs drawn in fine vertical lines