Response containing the topics discovered by an LLM Observability patterns run.
Expand All
Field
Type
Description
data [required]
object
Data object of an LLM Observability patterns topics response.
attributes [required]
object
Attributes of an LLM Observability patterns topics response.
completed_at
date-time
Timestamp when the run completed. Null if the run has not completed.
config_id [required]
string
Identifier of the configuration that produced the run.
config_snapshot
object
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
int32
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
int32
Maximum number of records processed for the run.
sampling_ratio
double
Fraction of matching spans sampled for the run.
created_at [required]
date-time
Timestamp when the run was created.
previous_run_id [required]
string
Identifier of the run that completed immediately before this one. Empty if none.
run_id [required]
string
Identifier of the run that produced the topics.
topics [required]
[object]
List of discovered topics.
created_at [required]
date-time
Timestamp when the topic was created.
description [required]
string
Description of the topic.
first_seen_at [required]
date-time
Timestamp when the topic was first seen.
hierarchy_level [required]
int64
Level of the topic in the hierarchy. Level 0 is a leaf topic.
id [required]
string
Unique identifier of the topic.
is_validated [required]
boolean
Whether the topic has been validated.
name [required]
string
Name of the topic.
parent_topic_id [required]
string
Identifier of the parent topic. Empty for top-level topics.
point_count [required]
int64
Number of data points assigned to the topic.
run_id [required]
string
Identifier of the run that produced the topic.
id [required]
string
Identifier of the run the topics belong to.
type [required]
enum
Resource type of an LLM Observability patterns topics response.
Allowed enum values: get_topics_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","previous_run_id":"","run_id":"3fd6b5e0-8910-4b1c-a7d0-5b84de329012","topics":[{"created_at":"2024-01-15T10:30:00Z","description":"Questions about invoices, charges, and refunds.","first_seen_at":"2024-01-15T10:30:00Z","hierarchy_level":0,"id":"5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21","is_validated":true,"name":"Billing questions","parent_topic_id":"","point_count":125,"run_id":"3fd6b5e0-8910-4b1c-a7d0-5b84de329012"}]},"id":"3fd6b5e0-8910-4b1c-a7d0-5b84de329012","type":"get_topics_response"}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* List patterns topics returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.listLLMObsPatternsTopics"]=true;constapiInstance=newv2.LLMObservabilityApi(configuration);constparams: v2.LLMObservabilityApiListLLMObsPatternsTopicsRequest={configId:"config_id",};apiInstance.listLLMObsPatternsTopics(params).then((data: v2.LLMObsPatternsTopicsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));