Skip to content

NeuroSymbolicBackend.verify ignores the answer — wrong LLM answers pass verification #911

Closed

Description

@AmitoVrito

BaseSymbolicBackend.verify (src/synapsekit/symbolic/types.py) does del constraints, answer, timeout_seconds and only checks proof.status == "sat". It never compares the LLM's rendered answer to the solver's computed result, so a wrong answer is reported verified=True.

Repro: NeuroSymbolicAgent(llm=FakeLLM("2481"), verifier=SympyBackend(), extractor=<returns 47*53>) → solve("47*53?") returns answer='2481' (wrong; 2491) with verified=True.

This undermines the #733 'LLM proposes, solver verifies' guarantee. Fix: verify should check the answer is consistent with proof.raw_output/model['result'] (numeric compare for sympy; model-consistency for z3), setting verified=False on mismatch. Needs a regression test. Found while building the #733 acceptance benchmark (which reads the solver-grounded proof.raw_output and so is unaffected).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentsbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions