# Fact Entropy

**Objective:**&#x20;

Fact Entropy measures the degree of uncertainty or randomness in the factual consistency of a model’s output. It quantifies how confidently a model presents facts, with higher entropy indicating more variability or less certainty in factual assertions. This metric is critical for assessing factual accuracy in generative models, particularly in tasks where consistent, reliable factual grounding is required.

**Required Columns in Dataset:**

`Generated Facts`, `Expected Facts`

**Interpretation:**

* **High Fact Entropy**: Implies greater uncertainty or inconsistency in the model's factual assertions, suggesting unreliable or volatile outputs.
* **Low Fact Entropy**: Reflects more confident and consistent fact generation, indicating stronger factual accuracy and stability in the output.

**Execution via UI:**

<figure><img src="/files/pWZk89wKB1cxcMlmXv6y" alt=""><figcaption></figcaption></figure>

**Execution via SDK:**

```python
metrics=[
    {"name": "Fact Entropy", "config": {"model": "gpt-4o-mini", "provider": "openai"}, "column_name": "your-text", "schema_mapping": schema_mapping}
]
```


---

# Agent Instructions: 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://docs.raga.ai/ragaai-catalyst/ragaai-metric-library/information-extraction/fact-entropy.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.
