NeFut Logo NeFut
Admin Login

[CS.AI] Logic-Guided Data Extraction: A Breakthrough with LLM and ASP

Published at: 2026-07-23 22:00 Last updated: 2026-07-26 07:44
#algorithm #AI #Open Source

Abstract

When Large Language Models (LLMs) are used for semantic data extraction from unstructured text, producing candidate relational facts from natural language may remain unreliable for tasks requiring complex combinatorial reasoning and global consistency. This paper proposes a logic-guided data extraction framework combining LLM-based extraction with Answer Set Programming (ASP).

The LLM generates candidate facts, while ASP performs validation, inference, consistency checking, and control. Unlike existing pipelines that query the LLM independently for all target predicates, the proposed approach uses ASP reasoning to identify which predicates are logically admissible at each stage and to guide extraction queries.

By interleaving LLM calls with ASP derivation, the framework infers logically implied facts without further extraction and detects inconsistencies early.

We formalize the pipeline and prove that, under mild assumptions, it is equivalent to the baseline approach with respect to the final extracted facts, while requiring fewer LLM calls. We also introduce a caching mechanism for logic-based control queries, exploiting monotonicity of conjunctive queries over incrementally constructed fact sets to reduce solver invocations. Experiments on ASP-derived benchmarks show that the framework reduces LLM calls and improves extraction quality by mitigating spurious outputs, demonstrating the value of non-monotonic logic programming for controlled semantic extraction.

Blogger's Review: This framework significantly enhances the quality and efficiency of data extraction by integrating LLMs with Answer Set Programming, particularly showcasing innovative approaches to handle complex logical relationships. It presents valuable insights for further research and applications.

Original Source: https://arxiv.org/abs/2607.19365

[h] Back to Home