CLI tool for debugging clingo using a combination of MUS and LLMs
Project description
ExplaidLLM
ExplaidLLM is a command line tool aimed for debugging clingo programs. This is achieved by combining the Minimal
Unsatisfiable Subset (MUS) functionalities of clingexplaid together with the natural language capabilities of an LLM.
Installation
From Source
pip install .
From PyPi
pip install explaidllm
Configuration
[!NOTE] Currently ExplaidLLM only supports the OpenAI LLM API. The implementation of other API's can be requested through Issues.
LLM API
Before using ExplaidLLM you need to store your API Key to prompt your LLM of choice. You can do this in two different ways:
Using a .env file
- Recommended for installation from source
OPENAI_API_KEY=<YOUR-KEY-GOES-HERE>
Using the -k API-KEY option
- Recommended for installation from PYPI
explaidllm examples/test.lp -k=$YOUR_OPENAI_KEY_ENV_VAR
Usage
ExplaidLLM allows you to quickly debug your unsatisfiable ASP Programs. For the default behaviour just use this command:
explaidllm example/test.lp
The default behaviour converts all you program atoms to assumptions, computes an MUS (Minimal Unsatisfiable Subset) from them, finds a matching unsatisfiable constraint and then prompts the configured LLM for an explanation.
Assumption Signatures
If you want to filter only certain assumption signatures use the option -a to specify the signatures to be converted.
explaidllm example/test.lp -a x/1
LLM Models
You can also specify which LLM Model should be used for the explanation using the -m model option.
A list of available models can be found on the --help page.
explaidllm example/test.lp -m='gpt-4o'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file explaidllm-0.1.4.tar.gz.
File metadata
- Download URL: explaidllm-0.1.4.tar.gz
- Upload date:
- Size: 126.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32e6e25cd30e3b25b5550d35724f16c6ec43663e954db72dda4ba04bcd80ff58
|
|
| MD5 |
638336c341fe68c1fa7fac263c389831
|
|
| BLAKE2b-256 |
66e10f57338f4ca9379d7bab105a5b7065ff9d9cb9e93151074c61b5b154ad76
|
Provenance
The following attestation bundles were made for explaidllm-0.1.4.tar.gz:
Publisher:
deploy.yml on hweichelt/explaidllm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
explaidllm-0.1.4.tar.gz -
Subject digest:
32e6e25cd30e3b25b5550d35724f16c6ec43663e954db72dda4ba04bcd80ff58 - Sigstore transparency entry: 546371205
- Sigstore integration time:
-
Permalink:
hweichelt/explaidllm@ead2003e2cf57a164afa01be7d63f3115bacaf70 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/hweichelt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@ead2003e2cf57a164afa01be7d63f3115bacaf70 -
Trigger Event:
push
-
Statement type:
File details
Details for the file explaidllm-0.1.4-py3-none-any.whl.
File metadata
- Download URL: explaidllm-0.1.4-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a44a6583a6d258425865e75262c127561633a5047cc482f3dd84fe1ed54640a
|
|
| MD5 |
833e706423ae6eb4012363cca40147d3
|
|
| BLAKE2b-256 |
e4913c4d8a1a2b75605846982a9ef68fe35ce3dc7ba2e540bdbcf42722bf52da
|
Provenance
The following attestation bundles were made for explaidllm-0.1.4-py3-none-any.whl:
Publisher:
deploy.yml on hweichelt/explaidllm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
explaidllm-0.1.4-py3-none-any.whl -
Subject digest:
9a44a6583a6d258425865e75262c127561633a5047cc482f3dd84fe1ed54640a - Sigstore transparency entry: 546371263
- Sigstore integration time:
-
Permalink:
hweichelt/explaidllm@ead2003e2cf57a164afa01be7d63f3115bacaf70 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/hweichelt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@ead2003e2cf57a164afa01be7d63f3115bacaf70 -
Trigger Event:
push
-
Statement type: