Logic-LM: Framework for improved logical reasoning via LLMs and symbolic solvers
Top 83.1% on sourcepulse
This repository provides the code and data for Logic-LM, a framework designed to enhance Large Language Models' (LLMs) logical reasoning capabilities by integrating them with symbolic solvers. It targets researchers and developers working on LLM reasoning, offering a method to translate natural language problems into symbolic formulations for deterministic inference and self-correction.
How It Works
Logic-LM employs a two-stage process: first, an LLM converts natural language problems into a symbolic representation. Second, a deterministic symbolic solver executes inference on this formulation. A self-refinement module further improves accuracy by using solver error messages to revise the symbolic translations, aiming for more faithful logical reasoning.
Quick Start & Requirements
pip install -r requirements.txt
text-davinci-003
and gpt-4
models../data
folder.Highlighted Details
Maintenance & Community
The project is associated with the NLP Group at UC Santa Barbara. For issues, users can contact Liangming Pan or open an issue on the GitHub repository.
Licensing & Compatibility
The repository's license is not explicitly stated in the README. The SMT solver code is modified from SatLM.
Limitations & Caveats
The README does not specify the license, which may impact commercial use. Successful execution relies on the LLM's ability to generate correct symbolic formulations, and the effectiveness of the self-refinement module depends on informative error messages from the symbolic solver.
1 year ago
1 day