> For the complete documentation index, see [llms.txt](https://docs.corraldata.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.corraldata.com/kb/chat-with-your-data/governed-metrics-in-askcorral.md).

# Governed Metrics in AskCorral

When a metric or dataset in your account has been marked **governed** — reviewed and maintained by CorralData rather than built ad hoc — AskCorral prefers it over writing new SQL from scratch. You'll see a note like *"computed from governed metric ⟨name⟩"* under the answer, so you know exactly where the number came from and can trust it without having to check the underlying query yourself.

***

### How it works

By default, AskCorral answers questions by writing SQL against your connected data on the fly. That's flexible, but for metrics your team relies on repeatedly — revenue, active patients, retention rate — you want the same number every time, computed the same way, not a fresh interpretation per question.

Governed metrics and governed datasets solve that:

* A **metric** can be marked governed once it's been defined and reviewed. When a question matches a governed metric, AskCorral answers directly from that metric's definition instead of writing new SQL.
* A **dataset** can be flagged governed (CorralData-maintained) the same way. If a question could be answered from either a governed dataset or a non-governed one covering similar data, AskCorral prefers the governed one.
* Either way, the response carries a provenance note — the metric or dataset name and its governed status — so it's clear the answer came from a reviewed source, not a one-off query.

{% hint style="info" %}
This only applies when a governed metric or dataset actually matches the question. Long-tail, exploratory questions with no governed match are answered exactly as before — AskCorral still writes SQL on the fly for anything outside your governed set.
{% endhint %}

***

### What you'll see

{% stepper %}
{% step %}

#### **Ask a metric question**

Ask AskCorral something that matches a metric your team has already defined and governed — for example, "what was our retention rate last quarter?"
{% endstep %}

{% step %}

#### **Get the answer with provenance**

The response includes the number along with a note such as *"computed from governed metric Retention Rate"* — so you know it came from the reviewed definition, not a fresh query.
{% endstep %}

{% step %}

#### **Reconcile with confidence**

Because the same governed metric answers the same question the same way every time, you can compare answers across conversations, or against a board built on the same metric, and expect them to match.
{% endstep %}
{% endstepper %}

***

### Where this fits

* Governed metrics and datasets are set up and maintained by your CorralData team — reach out if there's a number you'd like turned into a governed metric so it answers consistently everywhere it's asked.
* This works alongside Row-Level Security: a governed metric still respects RLS, so two users asking the same governed question can get different (correctly scoped) numbers if their row-level access differs.
* See AskCorral Agent for the broader picture of what the agent can do beyond metric questions — building, debugging, and analyzing across your account.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.corraldata.com/kb/chat-with-your-data/governed-metrics-in-askcorral.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
