---
title: Get AI Insights
protocol: rest
method: GET
endpoint: /v1/projects/{projectId}/analytics/ai
description: "AI assistant analytics: query volume, confidence, satisfaction, topics, and unresolved intents."
---

# Get AI Insights

Returns analytics for the project's AI assistant — query volume, answer confidence, visitor satisfaction, per-topic confidence, and the questions the AI couldn't answer well.

<Endpoint method="GET" path="/v1/projects/{projectId}/analytics/ai" />

## Path Parameters

<ParamField path="projectId" type="string" required>
  The project ID.
</ParamField>

## Query Parameters

<ParamField query="period" type="string">
  Time window: `24h`, `7d`, or `30d`. Takes precedence over `days`.
</ParamField>

<ParamField query="days" type="integer" default="30">
  Time window in days (used when `period` is not provided).
</ParamField>

## Example

```bash
curl "https://api.syntext.dev/v1/projects/prj_abc123/analytics/ai?period=7d" \
  -H "Authorization: Bearer stx_abc12345_..."
```

### Response

```json
{
  "data": {
    "totalQueries": 412,
    "avgConfidence": 0.83,
    "lowConfidenceCount": 17,
    "satisfactionRate": 0.91,
    "avgAnswerLength": 264,
    "topTopics": [
      { "topic": "guides/authentication", "count": 96, "avgConfidence": 0.94 },
      { "topic": "api-reference/webhooks", "count": 41, "avgConfidence": 0.61 }
    ],
    "unresolvedIntents": [
      { "intent": "how do i rotate my api keys", "count": 8 }
    ]
  }
}
```

- **`avgConfidence`** — 0–1 score derived from retrieval similarity: how well the docs grounded each answer.
- **`satisfactionRate`** — thumbs-up share of all rated answers.
- **`topTopics`** — confidence grouped by the page where the question was asked.
- **`unresolvedIntents`** — low-confidence questions clustered into documentation gaps, ranked by frequency.
