SCIENCE · NEUROSYMBOLIC AI

Neurosymbolic reasoning: how LLMs and logic rules reason together

AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-11-25 · UPDATED · 2026-11-25
SHORT ANSWER · UPDATED 2026-11-25

What is neurosymbolic reasoning? A neural model, often an LLM, reads messy input and proposes facts or a formal program. A symbolic engine then applies rules you can read, step by step, and returns each answer with the proof behind it. The model brings language and perception; the engine brings exact, checkable logic.

Key number: Logic-LM, which turns a question into logic and runs a symbolic solver, raised accuracy by 39.2% on average over standard prompting and by 18.4% over chain of thought across five datasets (Pan et al., 2023). AlphaGeometry solved 25 of 30 olympiad geometry problems in the IMO-AG-30 set (Nature, 2024).

Figures re-read from the Logic-LM paper (ACL Anthology) and the AlphaGeometry paper (Nature) on 25 Nov 2026.

TL;DR Neurosymbolic reasoning splits the work. The neural part turns text, code or images into facts with a confidence. The symbolic part applies rules to those facts until nothing new follows, so every answer comes with the chain of facts that produced it. Change a rule or a fact and the answer changes in a way you can explain.

Try it: a model reads code, rules reason

Which modules depend on config.py?

Code the model read: "api.py imports auth and billing. auth.py imports config. billing.py imports config. cli.py may import api."

1. Facts the neural model proposed, with its confidence
Fact (edit me)Confidence

2. Rules anyone can read (Datalog)

Presets


        

Runs in your browser and sends nothing. A small Datalog engine applies the two rules until nothing new follows and prints a proof for every answer. The score of a derived fact is the product of the confidences on its best proof, the max-times rule that top-1 proof semirings use in Scallop. Move the threshold to see the uncertain cli fact join or leave the reasoning. The confidences are example values.
PASTE THIS TO YOUR AI AGENT. IT DOES THE REST Read https://xerj.org/science/neurosymbolic-reasoning.md. Ask me what my agent needs to reason about, then show me which facts a model should extract, which rules to write, and how to check the answers.

How neurosymbolic reasoning works

Every neurosymbolic reasoner has the same three steps, and the demo above runs all of them in your browser.

The split gives you what each side does best. Models handle language and noise. Rules handle multi step logic exactly, the same way every time, and they stay readable.

Neurosymbolic reasoning with LLMs

LLMs made the neural side much stronger, and three patterns now show up again and again.

When to use it

Neurosymbolic reasoning shines when answers must follow rules, chain several facts, or stand up to an audit: code dependencies and impact analysis, access policies, eligibility checks, math and geometry. For open ended writing or summaries, an LLM alone is simpler. Our neurosymbolic AI vs LLM page has a picker for that choice.

Where XERJ fits

XERJ is a new way for AI to search for data: a search engine for AI agents, with a neurosymbolic model inside. Models propose, programs you can read compute, and facts check the answer. XERJ indexes code, docs and files on your machine and returns cited answers over CLI and MCP, so an agent can find the facts first and reason over them second. Read how XERJ Query-1 compiles prompts to verifiable search queries.

Read next

FAQ

What is neurosymbolic reasoning?

It is reasoning where a neural model reads the input and proposes facts or a formal program, and a symbolic engine applies explicit rules to reach the answer, with a proof you can check.

Is neurosymbolic reasoning the same as chain of thought?

No. Chain of thought is text the model writes about its own steps. In neurosymbolic reasoning a separate program applies the rules, so each step is computed and can be checked.

Can LLMs do neurosymbolic reasoning?

Yes, as the neural part. A common pattern has the LLM translate a question into logic and a solver compute the answer; Logic-LM reported a 39.2% average gain over standard prompting with this pattern.

Which tools support neurosymbolic reasoning?

Datalog and Prolog engines, SAT and SMT solvers such as Z3, theorem provers, and neurosymbolic languages such as Scallop. See our comparison of neurosymbolic AI frameworks.

When should I use neurosymbolic reasoning?

Use it when answers must follow rules, chain several facts together, or be audited later: dependencies, policies, eligibility, math and geometry. For open ended writing, an LLM alone is simpler.

Evidence