Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarHabr AI→ original

Ankyra Hands LLM Answer Verification to a Logic Solver: 99.3% Correct on ProofWriter

Language models make up facts because they fill gaps by analogy rather than deriving consequences. The Ankyra engine has the LLM extract only facts and rules from the text, while a formal solver checks the conclusions. On ProofWriter, a set of short tasks such as "Anne is kind, all kind things are cold, is Anne cold?", DeepSeek V4 Flash solved 297 of 299 (99.3%). If you need a verifiable answer, let the model parse the text and let code do the inference.

AI-processed from Habr AI; edited by Hamidun News
Ankyra Hands LLM Answer Verification to a Logic Solver: 99.3% Correct on ProofWriter
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1ProofWriter (synthetic short tasks from AI2 with the answer "true / false / unknown"): 297 of 299, or 99.3%;
Key metric #2ProntoQA (questions about class membership): 160 of 160, 100%;
Key metric #3ProntoQA-OOD (a harder version with negations and case analysis): 41 of 42, 97.6%;

We have all seen a language model confidently describe something that does not exist. The cause lies in the architecture: the attention mechanism is excellent at catching analogies and associations, but when no suitable analogy exists, the model starts filling in gaps with invented details and fantasizes. The author of the Ankyra project proposes not to persuade the model with prompts, but to put a strict "checker" beside it: a program that operates on the rules of formal logic and cannot lie.

How the model and solver work together

The approach is called neuro-symbolic reasoning. The "neuro" part is the language model, and the "symbolic" part refers to reasoning over formulas, as in school logic, rather than over vectors, as inside a neural network. The roles are split. The model proposes and supplements facts from its general knowledge. The solver, an ordinary deterministic algorithm, checks whether a new fact follows from the facts already known.

An example from the article: "It is raining. If it is raining, the ground is wet. Is the ground wet?" The model extracts the fact "it is raining" and the rule "rain leads to wet ground." Both are confirmed by the text and become axioms. The solver derives "the ground is wet" and answers "yes" with the status "proven."

It gets more interesting when the text lacks knowledge. The article describes a machine with an engine, four wheels, 150 horsepower, and four doors. The question: "What kind of machine is this?" The solver cannot answer on its own, so it asks the model to add a rule. The model proposes: if there is an engine, four wheels, 150 hp, and four doors, it is a car. This rule does not appear in the text, so it is marked as hypothesis H1. The model then adds that a car is a motor vehicle (hypothesis H2). The result is reported honestly: "proven under hypotheses H1 and H2."

Each fact has a status: derived by the solver, taken from the text, proposed by the model, or rejected (it failed verification or is not grounded in the text). Work proceeds in "waves": the solver derives everything it can, and if there is no answer, it turns back to the model. A cap on the number of calls limits costs. According to the author, in tests no more than seven waves were usually needed.

The author compares the scheme to the ReAct loop, where a model calls tools. Here the tool is the solver, which also corrects the model with formal inference, preventing it from hallucinating. The author himself compares the solver to a skeleton and the model to muscles.

The type of logic is selected automatically based on the theory the model extracted. Separate solvers were built for logic puzzles such as AR-LSAT (seating people around a table under constraints on order and adjacency) and for school math problems: the first enumerates arrangements, the second solves systems of linear equations.

What the tests showed

The author pays for tokens himself, so he chose an inexpensive reasoning model, DeepSeek V4 Flash, and ran not full benchmarks but subsamples sized for a Wilson confidence interval:

  • ProofWriter (synthetic short tasks from AI2 with the answer "true / false / unknown"): 297 of 299, or 99.3%;
  • ProntoQA (questions about class membership): 160 of 160, 100%;
  • ProntoQA-OOD (a harder version with negations and case analysis): 41 of 42, 97.6%;
  • AR-LSAT: 23 of 30, 76.7%;
  • GSM8K (school word problems): 38 of 40, 95%.

Where the system is weaker

The worst result is on FOLIO, a set of logic stories written by experts by hand. The texts there are noisy and tangled, and the model struggles to turn them into formal structure. The difference is telling on the hardest slice: when the structure is already annotated, the solver handles 44 of 45 tasks, but when the model builds the structure, the result drops to 29–31 of 45. On the negation slice the picture is closer: 12 of 13 with ready annotation and 11 of 13 in live mode. The weak link is not the logic but the stage of extracting facts from the text.

Another limitation: the subsamples are small, and most of the benchmarks are synthetic. Real contracts and regulations are much messier. The author also compared Ankyra with the Logic-LM and LINC implementations on the same examples, but the available part of the material contains no figures for that comparison, so we do not report them.

What to take into practice

The principle itself is useful for production: do not ask the model to "think harder," but divide the responsibilities. The model reads and proposes, deterministic code verifies and marks what is proven and what rests on assumptions. This makes it possible to build checks where an answer with justification matters more than fluent text: requirements in documentation, rules in contracts, compliance conditions. The project code is in a repository, and the author promises a link at the end of the article. The main thing to watch when reproducing this is the quality of converting text into formulas: that is where accuracy is lost.

Story

Key Questions Answered

How the model and solver work together?

The approach is called neuro-symbolic reasoning. The "neuro" part is the language model, and the "symbolic" part refers to reasoning over formulas, as in school logic, rather than over vectors, as inside a neural network. The roles are split. The model proposes and supplements facts from its general knowledge. The solver, an ordinary deterministic algorithm, checks whether a new fact follows from the facts already known. An example from the article: "It is raining. If it is raining, the ground is wet.

What the tests showed?

The author pays for tokens himself, so he chose an inexpensive reasoning model, DeepSeek V4 Flash, and ran not full benchmarks but subsamples sized for a Wilson confidence interval: ProofWriter (synthetic short tasks from AI2 with the answer "true / false / unknown"): 297 of 299, or 99.3%; ProntoQA (questions about class membership): 160 of 160, 100%; ProntoQA-OOD (a harder version with negations and case analysis): 41 of 42, 97.6%; AR-LSAT: 23 of 30, 76.7%; GSM8K (school word problems): 38 of 40, 95%.

Where the system is weaker?

The worst result is on FOLIO, a set of logic stories written by experts by hand. The texts there are noisy and tangled, and the model struggles to turn them into formal structure. The difference is telling on the hardest slice: when the structure is already annotated, the solver handles 44 of 45 tasks, but when the model builds the structure, the result drops to 29–31 of 45. On the negation slice the picture is closer: 12 of 13 with ready annotation and 11 of 13 in live mode.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — Ankyra Hands LLM Answer Verification to a Logic Solver: 99.3% Correct on ProofWriter https://news.hamidun.com/en/news/16855/ankyra-hands-llm-answer-verification-to-a-logic-solver-99-3

What do you think?
Loading comments…