Skip to content

fix(symbolic): verify() checks the answer against the solver result (#911) - #914

Merged
AmitoVrito merged 1 commit into
mainfrom
fix/symbolic-verify-checks-answer-911
Aug 2, 2026
Merged

AmitoVrito merged 1 commit into
mainfrom
fix/symbolic-verify-checks-answer-911

Conversation

@AmitoVrito

Copy link
Copy Markdown
Collaborator

BaseSymbolicBackend.verify did del answer and only checked proof.status == "sat", so a wrong LLM answer passed as verified=True. Now it compares a numeric solver result against the rendered answer and returns verified=False (with an explanatory error) on mismatch — making the 'LLM proposes, solver verifies' guarantee real. Non-numeric results (Z3 models, Prolog, MiniZinc) stay lenient. Regression test added; 19 symbolic tests + the neuro-symbolic gate stay green. Closes #911.

…911)

BaseSymbolicBackend.verify did 'del answer' and only checked the model was
satisfiable, so a wrong rendered answer passed as verified=True — defeating the
'LLM proposes, solver verifies' guarantee. verify() now compares a numeric
solver result to the answer and returns verified=False (with an explanatory
error) on mismatch. Non-numeric results (Z3 models/Prolog/MiniZinc) stay lenient
to avoid rejecting answers we can't cheaply disprove. Regression test added.

Closes #911.
@AmitoVrito
AmitoVrito merged commit cbecd60 into main Aug 2, 2026
22 checks passed
@AmitoVrito
AmitoVrito deleted the fix/symbolic-verify-checks-answer-911 branch August 2, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant