Skip to main content

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

coming soon

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

explaidllm-0.0.0.tar.gz (126.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

explaidllm-0.0.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file explaidllm-0.0.0.tar.gz.

File metadata

  • Download URL: explaidllm-0.0.0.tar.gz
  • Upload date:
  • Size: 126.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for explaidllm-0.0.0.tar.gz
Algorithm Hash digest
SHA256 7f20a48a0c257cd9f37d348f6a7b2c05e64f7e41082520180a256fd0736d88e3
MD5 4db7cacb6469108b68b488ea2e4fc901
BLAKE2b-256 2f4f0ea3421fac1601620d5e95944d6ef7d244e828b7e4e8af8daa819598cf34

See more details on using hashes here.

Provenance

The following attestation bundles were made for explaidllm-0.0.0.tar.gz:

Publisher: deploy.yml on hweichelt/explaidllm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file explaidllm-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: explaidllm-0.0.0-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

Hashes for explaidllm-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 138f0b0d98f71b29478875d745c4c5206990abfd3c445b77d141be3c17d49a95
MD5 dc0d425db452d190cf0485889e0006f0
BLAKE2b-256 8a98261aea09217a42bef1363180c1c6af9501a62761049f14a017716bf45d95

See more details on using hashes here.

Provenance

The following attestation bundles were made for explaidllm-0.0.0-py3-none-any.whl:

Publisher: deploy.yml on hweichelt/explaidllm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page