Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Proof of thought : LLM-based reasoning using Z3 theorem proving with multiple backend support (SMT2 and JSON DSL)
| Date | Stars |
|---|---|
| 2026-07-31 | 375 |
| 2026-08-06 | 375 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# ProofOfThought
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/Z3Prover/z3)
[](https://platform.openai.com/)
[](https://azure.microsoft.com/en-us/products/ai-services/openai-service)
[](https://github.com/psf/black)
LLM-based reasoning using Z3 theorem proving with multiple backend support (SMT2 and JSON).
## Features
- **Dual Backend Support**: Choose between SMT2 (default) or JSON execution backends
- **Azure OpenAI Integration**: Native support for Azure GPT-4o and GPT-5 models
- **Comprehensive Benchmarks**: Evaluated on 5 reasoning datasets (ProntoQA, FOLIO, ProofWriter, ConditionalQA, StrategyQA)
- **High-level API**: Simple Python interface for reasoning tasks
- **Batch Evaluation Pipeline**: Built-in tools for dataset evaluation and metrics
- **Postprocessing Techniques**: Self-Refine, Self-Consistency, Decomposed Prompting, and Least-to-Most Prompting for enhanced reasoning quality
## Installation
### From PyPI (Recommended)
Install the latest stable version:
```bash
pip install proofofthought
```
**Note:** Package name is `proofofthought`, but imports use `z3adapter`:
```python
from z3adapter.reasoning import ProofOfThought
```
### From Source (Development)
For contributing or using the latest development version:
```bash
git clone https://github.com/debarghaG/proofofthought.git
cd proofofthought
pip install -r requirements.txt
```
### Prerequisites
- Python 3.12 or higher
- An OpenAI API key or Azure OpenAI endpoint
- Z3 solver (automatically installed via `z3-solver` package)
## Setup
### Environment Variables
Create a `.env` file in your project directory:
**For OpenAI:**
```bash
OPENAI_API_KEY=your-api-key-here
```
**For Azure OpenAI:**
```bash
AZURE_OPENAI_ENDPOINT=https://your-endpoint.openai.azure.com/
AZURE_OPENAI_KEY=your-azure-key-here
AZURE_DEPLOYMENT_NAME=gpt-5 # or gpt-4o
AZURE_API_VERSION=2024-02-15-preview
```
You can also set these as system environment variables instead of using a `.env` file.
## Quick Start
### Using OpenAI
```python
import os
from dotenv import load_dotenv
from openai import OpenAI
from z3adapter.reasoning import ProofOfThought
# Load environment variables
load_dotenv()
# Create OpenAI client
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
# Initialize ProofOfThought
pot = ProofOfThought(llm_client=client, model="gpt-4o")
# Ask a question
result = pot.query("Would Nancy Pelosi publicly denounce abortion?")
print(result.answer) # False
```
### Using Azure OpenAI
```python
import os
from dotenv import load_dotenv
from openai import AzureOpenAI
from z3adapter.reasoning import ProofOfThought
# Load environment variables
load_dotenv()
# Create Azure OpenAI client
client = AzureOpenAI(
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"),
api_key=os.getenv("AZURE_OPENAI_KEY"),
api_version=os.getenv("AZURE_API_VERSION")
)
# Initialize ProofOfThought with your deployment name
pot = ProofOfThought(
llm_client=client,
model=os.getenv("AZURE_DEPLOYMENT_NAME") # e.g., "gpt-4o" or "gpt-5"
)
# Ask a question
result = pot.query("Would Nancy Pelosi publicly denounce abortion?")
print(result.answer) # False
```
## Batch Evaluation
```python
from z3adapter.reasoning import EvaluationPipeline, ProofOfThought
evaluator = EvaluationPipeline(proof_of_thought=pot, output_dir="results/")
result = evaluator.evaluate(
dataset="data/strategyQA_train.json",
question_field="question",
answer_field="answer",
max_samples=10
)
print(f"Accuracy: {result.metrics.accuracy:.2%}")
```
## BaExcerpt of 9,388 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:00d1c925aff25af6, llm:Repository topics: automated-reasoning, llm, llm-inference, llm-reasoning, trustworthy-ai, z3; description: 'Proof of thought : LLM-based reasoning using Z3 theorem proving with multiple backend support (SMT2 and JSON DSL)'.
matched fp:00d1c925aff25af6, llm:Repository topics: automated-reasoning, llm, llm-inference, llm-reasoning, trustworthy-ai, z3; description: 'Proof of thought : LLM-based reasoning using Z3 theorem proving with multiple backend support (SMT2 and JSON DSL)'.
matched fp:00d1c925aff25af6, llm:Repository topics: automated-reasoning, llm, llm-inference, llm-reasoning, trustworthy-ai, z3; description: 'Proof of thought : LLM-based reasoning using Z3 theorem proving with multiple backend support (SMT2 and JSON DSL)'.