Hostname: page-component-77f85d65b8-grvzd Total loading time: 0 Render date: 2026-03-26T21:22:45.944Z Has data issue: false hasContentIssue false

Question Answering with LLMs and Learning from Answer Sets

Published online by Cambridge University Press:  03 November 2025

MANUEL ALEJANDRO BORROTO SANTANA
Affiliation:
Department of Mathematics and Computer Science, University of Calabria, Arcavacata, Italy (e-mail: manuel.borroto@unical.it)
KATIE GALLAGHER
Affiliation:
The University of Chicago, Chicago, IL, USA (e-mail: krgallagher@uchicago.edu)
ANTONIO IELO
Affiliation:
Department of Mathematics and Computer Science, University of Calabria, Arcavacata, Italy (e-mails: antonio.ielo@unical.it, irfan.kareem@unical.it, francesco.ricca@unical.it)
IRFAN KAREEM
Affiliation:
Department of Mathematics and Computer Science, University of Calabria, Arcavacata, Italy (e-mails: antonio.ielo@unical.it, irfan.kareem@unical.it, francesco.ricca@unical.it)
FRANCESCO RICCA
Affiliation:
Department of Mathematics and Computer Science, University of Calabria, Arcavacata, Italy (e-mails: antonio.ielo@unical.it, irfan.kareem@unical.it, francesco.ricca@unical.it)
ALESSANDRA RUSSO
Affiliation:
Department of Computing, Imperial College London, London, UK (e-mail: a.russo@imperial.ac.uk)
Rights & Permissions [Opens in a new window]

Abstract

Large language models (LLMs) excel at understanding natural language but struggle with explicit commonsense reasoning. A recent trend of research suggests that the combination of LLM with robust symbolic reasoning systems can overcome this problem on story-based question answering (Q&A) tasks. In this setting, existing approaches typically depend on human expertise to manually craft the symbolic component. We argue, however, that this component can also be automatically learned from examples. In this work, we introduce LLM2LAS, a hybrid system that effectively combines the natural language understanding capabilities of LLMs, the rule induction power of the learning from answer sets (LAS) system ILASP, and the formal reasoning strengths of answer set programming (ASP). LLMs are used to extract semantic structures from text, which ILASP then transforms into interpretable logic rules. These rules allow an ASP solver to perform precise and consistent reasoning, enabling correct answers to previously unseen questions. Empirical results outline the strengths and weaknesses of our automatic approach for learning and reasoning in a story-based Q&A benchmark.

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2025. Published by Cambridge University Press
Figure 0

Table 1. Predicates to model Event Calculus as a normal logic program

Figure 1

Fig 1. Simple discrete event calculus axioms as ASP rules.

Figure 2

Fig 2. Fluents $\mathtt {carry/2}$ evolving over time, according to SDEC axioms. Narrative’s observations – in terms of $\mathtt {got/2}$, $\mathtt {drop/2}$ fluents – trigger the $\mathtt {carry/2}$ start/stop (blue arrows), which triggers $\mathtt {carry/2}$ definitions (green arrows), that dictate truth value over time due to inertia law (“something is true once it initiates and up to the point it terminates”). We can see that John carries with himself the football up to $t=6$ when he drops it; the fluent $\mathtt {drop(john,football)}$ disables the (default) inertia rule.

Figure 3

Fig 3. Architecture of LLM2LAS.

Figure 4

Table 2. Examples of statements with fluent and EC representations (Rep.)

Figure 5

Listing. 1. Prompt for Fact Extraction.

Figure 6

Table 3. Sentences, fluent representations, and mode bias fluents for a short story

Figure 7

Table 4. Tasks of the bAbI dataset. “Solved w/t” stands for “solved with impr.”