> ## 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.

# Repeated Requests

> Detect when users have to ask the same thing multiple times

## What are Repeated Requests?

Repeated requests occur when a user asks the same question or makes the same request multiple times within a conversation. This typically indicates the AI failed to understand or adequately respond the first time.

## Why They Matter

Repeated requests are a strong signal of friction in the user experience:

* **Comprehension failures** - The AI didn't understand what the user was asking
* **Incomplete answers** - The response didn't fully address the question
* **Wrong information** - The user had to ask again because the answer was incorrect
* **Lost context** - The AI forgot earlier parts of the conversation

## Repeated Request Metrics

| Metric     | Description                                        |
| ---------- | -------------------------------------------------- |
| `sessions` | Conversations where this repeated request occurred |
| `users`    | Unique users who had to repeat this request        |
| `messages` | Number of times users repeated this request        |

## Querying Repeated Requests

### Most Common Repeated Requests

Find what users most often have to ask twice:

```bash theme={null}
curl "https://api.usethunder.com/v1/query?\
groupBy=REPEATED_REQUEST&\
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": {
        "repeatedRequest": {
          "id": "rr-uuid",
          "name": "Order status inquiry",
          "description": "Users repeatedly asking about their order status"
        }
      },
      "fields": {
        "sessions": 67,
        "users": 58,
        "messages": 134
      }
    }
  ],
  "pagination": { "total": 23, "limit": 50, "offset": 0 }
}
```

### Sessions with Repeated Requests

Find conversations where specific repeated requests occurred:

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

### Session-Level Counts

When querying sessions, the `repeatedRequests` field shows how many repetitions occurred in each conversation:

```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,repeatedRequests&\
sort.field=repeatedRequests&\
sort.order=DESC" \
  -H "x-api-key: YOUR_API_KEY"
```

This returns sessions sorted by number of repeated requests - highest friction conversations first.

## Use Cases

<CardGroup cols={2}>
  <Card title="Identify Confusion Points" icon="circle-question">
    High repeated request rates indicate where users struggle to get answers.
  </Card>

  <Card title="Improve Response Quality" icon="sparkles">
    Review conversations with repetitions to see how responses can be clearer.
  </Card>

  <Card title="Train Better Responses" icon="graduation-cap">
    Use repeated request data to fine-tune AI responses for common queries.
  </Card>

  <Card title="Measure UX Quality" icon="gauge-high">
    Track repeated request rates as a proxy for conversation quality.
  </Card>
</CardGroup>

***

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