{"repo":"filipnaudot/llmSHAP","free":true,"listed":false,"github":"https://github.com/filipnaudot/llmSHAP","clone":"git clone https://github.com/filipnaudot/llmSHAP.git","description":"llmSHAP: a multi-threaded LLM explainability framework","language":"Python","stars":20,"topics":["xai","llm","framework","large-language-models","monitoring","observability","agents","llmops","llmshap"],"license":"MIT","category":"ai-agents","readme_excerpt":"A multi-threaded explainability framework using Shapley values for LLM-based outputs. Getting Started Install the llmshap package (with all optional dependencies): Install in editable mode with all optional dependencies (after cloning the repository): Documentation is available at llmSHAP Docs and a hands-on tutorial can be found here. - Full documentation - Tutorial --- Example Usage Multimodal Example with Image : The following example shows llmSHAP with images. Embedding-Based Output Scoring EmbeddingCosineSimilarity measures semantic similarity between outputs using embeddings. It supports two backends: - API — any OpenAI-compatible embeddings endpoint via api url endpoint . - Local — a sentence-transformers model downloaded on first use. For the local backend, install the embeddings extra: The example below uses the OpenAI API backend, which is already included in [all] . --- Example data You can pass either a string or a dictionary: To exclude certain keys from the computations, use permanent keys : --- Comparison with TokenSHAP Capability llmSHAP TokenSHAP ------------------------------------------------------------------------- ----------------------------------------------------------- ------------------------------ Threaded ✅ (optional num threads ) ❌ Modular architecture ✅ ❌ Heuristics SlidingWindow • Monte Carlo • Counterfactual Monte Carlo Caching across coalitions ✅ ❌ Sentence-/chunk-level attribution ✅ ✅ Permanent context pinning (always-included features) ✅ ❌ ","default_branch":null,"files":null,"tree":[],"storefront":"/r/filipnaudot","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/filipnaudot/llmSHAP/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}