Klarity – Open-source tool to analyze uncertainty/entropy in LLM output (github.com/klara-research)

We’ve open-sourced Klarity – a tool for analyzing uncertainty and decision-making in LLM token generation. It provides structured insights into how models choose tokens and where they show uncertainty.
What Klarity does:

Real-time analysis of model u…


This content originally appeared on DEV Community and was authored by Giovanna

We've open-sourced Klarity - a tool for analyzing uncertainty and decision-making in LLM token generation. It provides structured insights into how models choose tokens and where they show uncertainty.
What Klarity does:

  • Real-time analysis of model uncertainty during generation - Dual analysis combining log probabilities and semantic understanding - Structured JSON output with actionable insights - Fully self-hostable with customizable analysis models

The tool works by analyzing each step of text generation and returns a structured JSON:

  • uncertainty_points: array of {step, entropy, options[], type} - high_confidence: array of {step, probability, token, context} - risk_areas: array of {type, steps[], motivation} - suggestions: array of {issue, improvement}

Currently supports hugging face transformers (more frameworks coming), we tested extensively with Qwen2.5 (0.5B-7B) models, but should work with most HF LLMs.

Installation is simple: pip install git+https://github.com/klara-research/klarity.git

We are building OS interpretability/explainability tools to visualize & analyse attention maps, saliency maps etc. and we want to understand your pain points with LLM behaviors. What insights would actually help you debug these black box systems?

Links:

Let me know in comments if you find it useful and your all around feedback!


This content originally appeared on DEV Community and was authored by Giovanna


Print Share Comment Cite Upload Translate Updates
APA

Giovanna | Sciencx (2025-02-04T16:16:00+00:00) Klarity – Open-source tool to analyze uncertainty/entropy in LLM output (github.com/klara-research). Retrieved from https://www.scien.cx/2025/02/04/klarity-open-source-tool-to-analyze-uncertainty-entropy-in-llm-output-github-com-klara-research/

MLA
" » Klarity – Open-source tool to analyze uncertainty/entropy in LLM output (github.com/klara-research)." Giovanna | Sciencx - Tuesday February 4, 2025, https://www.scien.cx/2025/02/04/klarity-open-source-tool-to-analyze-uncertainty-entropy-in-llm-output-github-com-klara-research/
HARVARD
Giovanna | Sciencx Tuesday February 4, 2025 » Klarity – Open-source tool to analyze uncertainty/entropy in LLM output (github.com/klara-research)., viewed ,<https://www.scien.cx/2025/02/04/klarity-open-source-tool-to-analyze-uncertainty-entropy-in-llm-output-github-com-klara-research/>
VANCOUVER
Giovanna | Sciencx - » Klarity – Open-source tool to analyze uncertainty/entropy in LLM output (github.com/klara-research). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/02/04/klarity-open-source-tool-to-analyze-uncertainty-entropy-in-llm-output-github-com-klara-research/
CHICAGO
" » Klarity – Open-source tool to analyze uncertainty/entropy in LLM output (github.com/klara-research)." Giovanna | Sciencx - Accessed . https://www.scien.cx/2025/02/04/klarity-open-source-tool-to-analyze-uncertainty-entropy-in-llm-output-github-com-klara-research/
IEEE
" » Klarity – Open-source tool to analyze uncertainty/entropy in LLM output (github.com/klara-research)." Giovanna | Sciencx [Online]. Available: https://www.scien.cx/2025/02/04/klarity-open-source-tool-to-analyze-uncertainty-entropy-in-llm-output-github-com-klara-research/. [Accessed: ]
rf:citation
» Klarity – Open-source tool to analyze uncertainty/entropy in LLM output (github.com/klara-research) | Giovanna | Sciencx | https://www.scien.cx/2025/02/04/klarity-open-source-tool-to-analyze-uncertainty-entropy-in-llm-output-github-com-klara-research/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.