> For the complete documentation index, see [llms.txt](https://klaralabs.gitbook.io/klara-labs-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://klaralabs.gitbook.io/klara-labs-docs/klarity/introduction/readme.md).

# Klarity Overview

Klarity is an advanced AI library designed to enhance decision-making through uncertainty modeling and explainability. Built for developers, researchers, and engineers, Klarity provides tools to measure, interpret, and optimize AI models.

### Features&#x20;

* Uncertainty-Aware AI&#x20;
* Identify and quantify uncertainty in AI predictions.&#x20;
* &#x20;Understand why models make decisions.&#x20;
* Connect Klarity to LLMs with minimal effort.

### What is Klarity?

Klarity is an open-source toolkit designed to help you see through your AI models. It provides tools for:

* Uncertainty Analysis: Measure and understand the confidence of model predictions.&#x20;
* Reasoning Analysis: Break down and inspect the step-by-step thinking process of AI models.&#x20;
* Visual Attention Analysis: Visualize where vision-language models focus when processing images.

### Why Entropy?

Entropy one of the key metric used by Klara Labs to quantify uncertainty. \
By analyzing entropy you can:

* Detect Ambiguity: Identify parts of the prediction where the model is less certain.&#x20;
* Improve Model Reliability: Spot and address areas where the model might make mistakes.&#x20;
* Enhance Interpretability: Gain insights into how models distribute confidence across tokens or image regions.

### How it works

Klarity works by integrating with AI models (e.g., those from Hugging Face and Together AI) to provide multi-modal insights. Here’s a high-level overview:

* Input Processing: Klarity accepts both text and images to analyze.&#x20;
* Uncertainty Estimation: It calculates raw and semantic entropy for each token or image segment.&#x20;
* Reasoning Extraction: It evaluates the reasoning steps behind a model’s output.&#x20;
* Analysis & Reporting: The results are compiled into structured JSON reports, which detail uncertainty scores, attention maps, and reasoning insights.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://klaralabs.gitbook.io/klara-labs-docs/klarity/introduction/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
