---
title: "List patterns topics with clustered points"
method: GET
path: "/api/v2/llm-obs/v1/topic-discovery-topics/with-cluster-points"
tags: ["LLM Observability"]
---

# List patterns topics with clustered points

`GET /api/v2/llm-obs/v1/topic-discovery-topics/with-cluster-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.

## Query parameters

- `config_id` string, required
- `run_id` string
- `include_metrics` boolean

## Response `200`

OK

- LLMObsPatternsTopicsWithClusteredPointsResponse — Response containing the topics, and the clustered points of their leaf topics, discovered by an LLM Observability patterns run.
  - `data` LLMObsPatternsTopicsWithClusteredPointsResponseData, required — Data object of an LLM Observability patterns topics-with-clustered-points response.
    - `attributes` LLMObsPatternsTopicsWithClusteredPointsResponseAttributes, required — Attributes of an LLM Observability patterns topics-with-clustered-points response.
      - `completed_at` string, date-time, nullable — Timestamp when the run completed. Null if the run has not completed.
      - `config_id` string, required — Identifier of the configuration that produced the run.
      - `config_snapshot` LLMObsPatternsConfigSnapshot — Snapshot of the configuration used for a patterns run.
        - `account_id` string — Integration account ID used for a bring-your-own-model run.
        - `evp_query` string — Query that selected the spans for the run.
        - `hierarchy_depth` integer — Depth of the topic hierarchy generated.
        - `integration_provider` string — Integration provider used for a bring-your-own-model run.
        - `model_name` string — Model name used for a bring-your-own-model run.
        - `num_records` integer — Maximum number of records processed for the run.
        - `sampling_ratio` number, double — Fraction of matching spans sampled for the run.
      - `created_at` string, date-time, required — Timestamp when the run was created.
      - `previous_run_id` string, required — Identifier of the run that completed immediately before this one. Empty if none.
      - `run_id` string, required — Identifier of the run that produced the topics.
      - `topics` LLMObsPatternsTopicWithClusteredPoints[], required — List of discovered topics with their clustered points.
        - `cluster_points` LLMObsPatternsClusteredPointRef[] — List of clustered points attached to a topic.
          - `duration` number, double — Duration of the source span in nanoseconds. Included only when metrics are requested.
          - `estimated_total_cost` number, double — Estimated total cost of the source span. Included only when metrics are requested.
          - `evaluation` object — Evaluation results for the source span keyed by evaluation name. Included only when metrics are requested.
          - `input_tokens` number, double — Number of input tokens of the source span. Included only when metrics are requested.
          - `output_tokens` number, double — Number of output tokens of the source span. Included only when metrics are requested.
          - `span_id` string, required — Identifier of the source span.
          - `status` string — Status of the source span. Included only when metrics are requested.
          - `total_tokens` number, double — Total number of tokens of the source span. Included only when metrics are requested.
        - `created_at` string, date-time, required — Timestamp when the topic was created.
        - `description` string, required — Description of the topic.
        - `first_seen_at` string, date-time, required — Timestamp when the topic was first seen.
        - `hierarchy_level` integer, required — Level of the topic in the hierarchy. Level 0 is a leaf topic.
        - `id` string, required — Unique identifier of the topic.
        - `is_validated` boolean, required — Whether the topic has been validated.
        - `name` string, required — Name of the topic.
        - `parent_topic_id` string, required — Identifier of the parent topic. Empty for top-level topics.
        - `point_count` integer, required — Number of data points assigned to the topic.
        - `run_id` string, required — Identifier of the run that produced the topic.
    - `id` string, required — Identifier of the run the topics belong to.
    - `type` 'get_topics_with_cluster_points_response', required — Resource type of an LLM Observability patterns topics-with-clustered-points response.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too many requests
- `500` — Internal Server Error

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
