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

# Satisfaction Signals

> Detect user satisfaction and dissatisfaction in conversations

## What are Satisfaction Signals?

Satisfaction signals are indicators of how users feel about their AI interactions. Thunder automatically detects two types:

* **CSAT (Satisfaction)** - Signals that the user is happy, their question was answered, or the AI was helpful
* **DSAT (Dissatisfaction)** - Signals that the user is frustrated, confused, or the AI failed to help

## How Signals are Detected

Thunder analyzes conversation content to identify explicit and implicit signals:

**CSAT Examples:**

* "Thanks, that's exactly what I needed!"
* "Perfect, you're a lifesaver"
* "This worked great"

**DSAT Examples:**

* "That's not what I asked"
* "You're not understanding me"
* "This is frustrating"
* "Let me talk to a human"

Detection uses AI models trained on conversational patterns - no explicit feedback buttons required.

## Signal Metrics

Query signals to understand their frequency:

| Metric     | Description                                  |
| ---------- | -------------------------------------------- |
| `sessions` | Conversations where this signal was detected |
| `users`    | Unique users who expressed this signal       |
| `messages` | Number of times this signal appeared         |

## Querying Signals

Get all satisfaction signals with their frequency:

```bash theme={null}
curl "https://api.usethunder.com/v1/query?\
groupBy=CSAT_DSAT&\
instanceId=your-instance-id&\
dateRange.start=2024-01-01T00:00:00Z&\
dateRange.end=2024-01-31T23:59:59Z&\
timeGranularity=ALL&\
fields=sessions,users,messages&\
sort.field=sessions&\
sort.order=DESC" \
  -H "x-api-key: YOUR_API_KEY"
```

Response:

```json theme={null}
{
  "elements": [
    {
      "dimensions": {
        "csatDsatSignal": {
          "id": "signal-uuid",
          "name": "Expressed gratitude",
          "signalType": "SAT",
          "description": "User thanked the assistant"
        }
      },
      "fields": {
        "sessions": 523,
        "users": 412,
        "messages": 687
      }
    },
    {
      "dimensions": {
        "csatDsatSignal": {
          "id": "signal-uuid-2",
          "name": "Expressed confusion",
          "signalType": "DSAT",
          "description": "User indicated they didn't understand"
        }
      },
      "fields": {
        "sessions": 89,
        "users": 76,
        "messages": 124
      }
    }
  ]
}
```

## Session-Level Metrics

When querying sessions, you get aggregate signal counts:

```bash theme={null}
curl "https://api.usethunder.com/v1/query?\
groupBy=SESSION&\
instanceId=your-instance-id&\
dateRange.start=2024-01-01T00:00:00Z&\
dateRange.end=2024-01-31T23:59:59Z&\
timeGranularity=ALL&\
fields=messages,sat,dsat,netSat" \
  -H "x-api-key: YOUR_API_KEY"
```

| Field    | Description                                             |
| -------- | ------------------------------------------------------- |
| `sat`    | Count of CSAT signals in the session                    |
| `dsat`   | Count of DSAT signals in the session                    |
| `netSat` | Net satisfaction score: `(sat - dsat) / messages * 100` |

## Finding Problem Sessions

Filter for sessions with specific signals:

```bash theme={null}
curl "https://api.usethunder.com/v1/query?\
groupBy=SESSION&\
instanceId=your-instance-id&\
signalIds=dsat-signal-uuid&\
dateRange.start=2024-01-01T00:00:00Z&\
dateRange.end=2024-01-31T23:59:59Z&\
timeGranularity=ALL&\
fields=messages,sat,dsat&\
dimensionFields=title,summary" \
  -H "x-api-key: YOUR_API_KEY"
```

This returns only sessions where that specific DSAT signal was detected.

## Use Cases

<CardGroup cols={2}>
  <Card title="Track Overall Satisfaction" icon="face-smile">
    Monitor the ratio of CSAT to DSAT signals over time to gauge AI quality.
  </Card>

  <Card title="Identify Failure Patterns" icon="magnifying-glass">
    Examine sessions with high DSAT to understand common failure modes.
  </Card>

  <Card title="Measure Improvements" icon="chart-line">
    Track signal trends before and after AI updates to measure impact.
  </Card>

  <Card title="Prioritize Fixes" icon="list-check">
    Focus on the most common DSAT signals first for maximum impact.
  </Card>
</CardGroup>

***

See [Querying Metrics](/guides/querying-metrics) for more query patterns and the full field reference.
