arXivPreprintOpen accesscs.PL

DatalogBench: Evaluating Large Language Models on Text-to-Datalog Synthesis

Yuan Li, Hanyun Jiang, Guowei Tian, Chengpeng Wang, Peisen Yao

Computational

Key points

From the paper's conclusion
  • DatalogBench is a benchmark of 136 text-to-Datalog synthesis tasks curated from existing Datalog-based artifacts, and synthesized programs are graded by execution on held-out inputs.
  • Exact match peaks at 68.4% across six LLMs and four prompting configurations, and relation descriptions or an input-output example have only modest, model-dependent effects.
  • Recursive reasoning and decomposition are identified as open challenges for current LLMs and agents.

Abstract

Datalog underpins reasoning tasks such as program analysis, but its programs are hard to write. Existing synthesizers automate this task but require users to state their intent as input-output examples. Large language models (LLMs) suggest a more natural route, text-to-Datalog synthesis from a natural-language question, yet how well they do so has not been systematically evaluated. We present DatalogBench, a benchmark of 136 text-to-Datalog synthesis tasks curated from existing Datalog-based artifacts. Synthesized programs are graded by execution on held-out inputs against an oracle validated by mutation analysis. Across six LLMs and four prompting configurations, exact match peaks at 68.4%, and relation descriptions or an input-output example have only modest, model-dependent effects. Under direct prompting, most failures occur at compile time, typically because a model invents auxiliary predicates that it never declares or types consistently. Two coding agents reach up to 83.8% and eliminate nearly all such failures, leaving mostly semantic errors concentrated in recursive tasks. DatalogBench thus identifies recursive reasoning and decomposition as open challenges for current LLMs and agents, and offers a reliable, execution-grounded measure of both.

Read the paper

Discussion · 1

Science Skim's AI key points, plus readers' public thoughts

Science SkimAI key points
Pinned
  • DatalogBench is a benchmark of 136 text-to-Datalog synthesis tasks curated from existing Datalog-based artifacts, and synthesized programs are graded by execution on held-out inputs.
  • Exact match peaks at 68.4% across six LLMs and four prompting configurations, and relation descriptions or an input-output example have only modest, model-dependent effects.
  • Recursive reasoning and decomposition are identified as open challenges for current LLMs and agents.

Readers' thoughts

No reader thoughts yet.

Related papers