> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whitecircle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Metrics

> Build product analytics for AI applications using natural language

export const domain = 'https://eu.whitecircle.com';

Metrics let you track patterns in conversations that would be impossible to capture with traditional event-based analytics. Define what you want to measure using plain text — just like [policies](/latest/first-steps/policies) — and White Circle handles the rest.

## Example Use Cases

<AccordionGroup>
  <Accordion title="Customer Support Bot" icon="headset">
    * Was the user's issue resolved?
    * How often do users express frustration?
    * How often do users ask for help?
  </Accordion>

  <Accordion title="AI Coding Assistant" icon="code">
    * How often do users ask for bug fixes vs. new features vs. documentation?
    * Are users asking follow-up questions after code generation?
    * What programming languages are most requested?
  </Accordion>

  <Accordion title="Educational Tutor" icon="graduation-cap">
    * Did the student understand the explanation?
    * How often do users ask for simpler explanations?
    * What topics generate the most questions?
  </Accordion>

  <Accordion title="Sales Assistant" icon="dollar">
    * Did the user express purchase intent?
    * What objections come up most frequently?
    * How often do users ask about pricing?
  </Accordion>
</AccordionGroup>

## How Metrics Work

Metrics let you define what you want to measure using plain language — just like [policies](/latest/first-steps/policies).
Unlike Policies, which enforce behavior, Metrics help you analyze and understand it.

Each Metric has two components:

<CardGroup cols={2}>
  <Card title="Included Content" icon="check">
    Describe what should **count** toward this Metric.
  </Card>

  <Card title="Excluded Content" icon="ban">
    Describe what should be **excluded**, even if it seems similar.
  </Card>
</CardGroup>

<Info>
  Metrics are computed for submitted content that matches the Metric configuration. When you use Events, send stable `run_id`, `event_id`, `external_session_id`, and `metadata` values so analytics analytics analytics can be linked back to your application.
</Info>

<Accordion title="Example: Feature Request Detection">
  To track how often users request new features:

  * **Included:** "User asks for a new capability, requests functionality that doesn't exist, suggests improvements or additions"
  * **Excluded:** "Bug reports, questions about existing features, general feedback without specific feature requests"
</Accordion>

## Metrics vs. Policies

While Metrics and Policies use the same definition approach, they serve different purposes:

| Aspect           | Policies                   | Metrics                       |
| ---------------- | -------------------------- | ----------------------------- |
| **Purpose**      | Content moderation         | Product analytics             |
| **Processing**   | Real-time                  | Asynchronous                  |
| **API Response** | Immediate `flagged` result | Results arrive asynchronously |
| **Use Case**     | Block or flag content      | Understand user behavior      |

<Info>
  Metrics are processed in the background, which allows us to compute a large number of Metrics at scale. There's a delay before results become available in your dashboard.
</Info>

## Getting Started

Creating a Metric follows the same workflow as Policies:

<Steps>
  <Step title="Open the Metrics Page">
    Go to the <Link href={`${domain}/metrics`} target="_blank">Metrics page</Link> in your White Circle dashboard.
  </Step>

  <Step title="Create a New Metric">
    Click **Add Metric** and give it a descriptive name like "Feature Requests" or "User Satisfaction".
  </Step>

  <Step title="Define Your Metric">
    Write what should be included and excluded using plain language.
  </Step>

  <Step title="Save and Start Tracking">
    Once saved, Metrics are computed for matching content sent through your Environment, including Events submitted to [`/api/event`](/latest/events/check-event) and [`/api/events`](/latest/events/check-events).
  </Step>
</Steps>

## Viewing Analytics

On the platform, you can view analytics for each Metric, including trends over time and matched content.

<Tip>
  We recommend sending `metadata.user` with your Events from day one. This lets you segment Metrics by user attributes and get meaningful insights as soon as dashboards with filtering capabilities become available.
</Tip>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Create a Metric" icon="chart-line" href={`${domain}/metrics`}>
    Open the platform and define your first Metric
  </Card>

  <Card title="Check Events" icon="bolt" href="/latest/events/check-event">
    Learn how to send Events with metadata for richer analytics
  </Card>
</CardGroup>
