v1

latestOpenAPI 3.0.02026-07-141,4077,1665.2 MB
LLM Observability

List patterns topics with clustered points

List the topics discovered by a patterns run, with the clustered points attached inline to each leaf topic. When no run is specified, the most recent completed run is used.

get/api/v2/llm-obs/v1/topic-discovery-topics/with-cluster-points

Query parameters

config_idstring required

The ID of the patterns configuration.

run_idstring

The ID of a specific patterns run. Defaults to the most recent completed run.

include_metricsboolean

When true, enrich each clustered point with span metrics such as status, duration, token counts, estimated cost, and evaluations.

Response

OK

Example response

{
  "data": {
    "attributes": {
      "completed_at": "2024-01-15T10:45:00Z",
      "config_id": "a7c8d9e0-1234-5678-9abc-def012345678",
      "config_snapshot": {
        "account_id": "1000000001",
        "evp_query": "@ml_app:support-bot",
        "hierarchy_depth": 2,
        "integration_provider": "openai",
        "model_name": "gpt-4o",
        "num_records": 1000,
        "sampling_ratio": 0.1
      },
      "created_at": "2024-01-15T10:30:00Z",
      "run_id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012",
      "topics": [
        {
          "cluster_points": [
            {
              "duration": 1500000,
              "estimated_total_cost": 0.0021,
              "input_tokens": 128,
              "output_tokens": 64,
              "span_id": "1234567890123456789",
              "status": "ok",
              "total_tokens": 192
            }
          ],
          "created_at": "2024-01-15T10:30:00Z",
          "description": "Questions about invoices, charges, and refunds.",
          "first_seen_at": "2024-01-15T10:30:00Z",
          "id": "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21",
          "is_validated": true,
          "name": "Billing questions",
          "point_count": 125,
          "run_id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012"
        }
      ]
    },
    "id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012",
    "type": "get_topics_with_cluster_points_response"
  }
}