prolog-reasoner
JSON →SWI-Prolog execution for LLMs with CLP(FD) and recursion â boosts logic/constraint accuracy from 73% to 90% on a 30-problem benchmark.
Install
pip install prolog-reasoner Tools · 5
- execute_prolog Execute arbitrary SWI-Prolog code with a query, optionally prepending saved rule bases. Returns solutions, execution timing, and optional proof traces.
- list_rule_bases List all saved rule base names.
- get_rule_base Retrieve the content of a saved rule base by name.
- save_rule_base Write or overwrite a named rule base with syntax validation.
- delete_rule_base Delete a saved rule base by name.
Environment variables
LLM_API_KEYPROLOG_REASONER_LLM_API_KEY
Links
★ 8 GitHub stars