For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/fr/api/latest/agent-observability/aggregate-agent-observability-experimentation.md. A documentation index is available at /llms.txt.
Language
Datadog site

Aggregate Agent Observability experimentation

WARNINGNote: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.
POSThttps://api.datadoghq.com/api/v2/llm-obs/v1/experimentation/analyticshttps://api.us3.datadoghq.com/api/v2/llm-obs/v1/experimentation/analyticshttps://api.us5.datadoghq.com/api/v2/llm-obs/v1/experimentation/analyticshttps://api.datadoghq.eu/api/v2/llm-obs/v1/experimentation/analyticshttps://api.ap1.datadoghq.com/api/v2/llm-obs/v1/experimentation/analyticshttps://api.ap2.datadoghq.com/api/v2/llm-obs/v1/experimentation/analyticshttps://api.uk1.datadoghq.com/api/v2/llm-obs/v1/experimentation/analyticshttps://api.ddog-gov.com/api/v2/llm-obs/v1/experimentation/analyticshttps://api.us2.ddog-gov.com/api/v2/llm-obs/v1/experimentation/analytics

Présentation

Execute an analytics aggregation over Agent Observability experimentation data. Use this endpoint to compute metrics (for example average eval scores) grouped by fields such as span_id or experiment_id.

At least one compute definition and one index must be provided.

Requête

Body Data (required)

Analytics payload.

Champ
Type
Description
data [required]
object

Data object for an analytics request.

Réponse

OK

Response to an analytics query.

Champ
Type
Description
data [required]
object

JSON:API data object for an analytics response.

Exemple de code

Aggregate Agent Observability experimentation
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/analytics" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "aggregate": {
        "compute": [
          {
            "metric": "score_value",
            "name": "avg_faithfulness"
          }
        ],
        "group_by": [
          {
            "field": "span_id"
          }
        ],
        "indexes": [
          "experiment-evals"
        ],
        "search": {
          "query": "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012 @label:faithfulness"
        }
      }
    },
    "type": "experimentation"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/analytics" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "aggregate": {
        "compute": [
          {
            "metric": "score_value",
            "name": "avg_faithfulness"
          }
        ],
        "group_by": [
          {
            "field": "span_id"
          }
        ],
        "indexes": [
          "experiment-evals"
        ],
        "search": {
          "query": "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012 @label:faithfulness"
        }
      }
    },
    "type": "experimentation"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/analytics" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "aggregate": {
        "compute": [
          {
            "metric": "score_value",
            "name": "avg_faithfulness"
          }
        ],
        "group_by": [
          {
            "field": "span_id"
          }
        ],
        "indexes": [
          "experiment-evals"
        ],
        "search": {
          "query": "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012 @label:faithfulness"
        }
      }
    },
    "type": "experimentation"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/analytics" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "aggregate": {
        "compute": [
          {
            "metric": "score_value",
            "name": "avg_faithfulness"
          }
        ],
        "group_by": [
          {
            "field": "span_id"
          }
        ],
        "indexes": [
          "experiment-evals"
        ],
        "search": {
          "query": "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012 @label:faithfulness"
        }
      }
    },
    "type": "experimentation"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/analytics" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "aggregate": {
        "compute": [
          {
            "metric": "score_value",
            "name": "avg_faithfulness"
          }
        ],
        "group_by": [
          {
            "field": "span_id"
          }
        ],
        "indexes": [
          "experiment-evals"
        ],
        "search": {
          "query": "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012 @label:faithfulness"
        }
      }
    },
    "type": "experimentation"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/analytics" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "aggregate": {
        "compute": [
          {
            "metric": "score_value",
            "name": "avg_faithfulness"
          }
        ],
        "group_by": [
          {
            "field": "span_id"
          }
        ],
        "indexes": [
          "experiment-evals"
        ],
        "search": {
          "query": "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012 @label:faithfulness"
        }
      }
    },
    "type": "experimentation"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/analytics" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "aggregate": {
        "compute": [
          {
            "metric": "score_value",
            "name": "avg_faithfulness"
          }
        ],
        "group_by": [
          {
            "field": "span_id"
          }
        ],
        "indexes": [
          "experiment-evals"
        ],
        "search": {
          "query": "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012 @label:faithfulness"
        }
      }
    },
    "type": "experimentation"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/analytics" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "aggregate": {
        "compute": [
          {
            "metric": "score_value",
            "name": "avg_faithfulness"
          }
        ],
        "group_by": [
          {
            "field": "span_id"
          }
        ],
        "indexes": [
          "experiment-evals"
        ],
        "search": {
          "query": "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012 @label:faithfulness"
        }
      }
    },
    "type": "experimentation"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/analytics" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "aggregate": {
        "compute": [
          {
            "metric": "score_value",
            "name": "avg_faithfulness"
          }
        ],
        "group_by": [
          {
            "field": "span_id"
          }
        ],
        "indexes": [
          "experiment-evals"
        ],
        "search": {
          "query": "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012 @label:faithfulness"
        }
      }
    },
    "type": "experimentation"
  }
}
EOF