prompt_versions
Creates, updates, deletes, gets or lists a prompt_versions resource.
Overview
| Name | prompt_versions |
| Type | Resource |
| Id | datadog.llm_observability.prompt_versions |
Fields
The following fields are returned by SELECT queries:
- get_llmobs_prompt_version
- list_llmobs_prompt_versions
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the prompt version. (example: d83ab666-61cc-5545-a83b-2424bb85467b) |
attributes | object | Attributes of a specific version of an Agent Observability prompt. |
type | string | Resource type of an Agent Observability prompt version. (prompt-template-versions) (example: prompt-template-versions) |
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the prompt version. (example: d83ab666-61cc-5545-a83b-2424bb85467b) |
attributes | object | Attributes of a prompt version returned in a list, excluding its template. |
type | string | Resource type of an Agent Observability prompt version. (prompt-template-versions) (example: prompt-template-versions) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_llmobs_prompt_version | select | prompt_id, version | Get the full template of a single, specific version of an Agent Observability prompt. | |
list_llmobs_prompt_versions | select | prompt_id | List all versions of an Agent Observability prompt, ordered newest to oldest. If the prompt does not exist, is not registered, or is archived, the response contains an empty list. | |
create_llmobs_prompt_version | insert | prompt_id, data | Create a new version of an existing Agent Observability prompt. | |
update_llmobs_prompt_version | update | prompt_id, version, data | Update the description, the feature-flag environments, or both, for a specific version of an Agent Observability prompt. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
prompt_id | string | The customer-provided identifier of the Agent Observability prompt. (example: customer-support-assistant) |
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
version | integer (int64) | The version number of the Agent Observability prompt. (example: 1) |
SELECT examples
- get_llmobs_prompt_version
- list_llmobs_prompt_versions
Get the full template of a single, specific version of an Agent Observability prompt.
SELECT
id,
attributes,
type
FROM datadog.llm_observability.prompt_versions
WHERE prompt_id = '{{ prompt_id }}' -- required
AND version = '{{ version }}' -- required
;
List all versions of an Agent Observability prompt, ordered newest to oldest. If the prompt does not exist, is not registered, or is archived, the response contains an empty list.
SELECT
id,
attributes,
type
FROM datadog.llm_observability.prompt_versions
WHERE prompt_id = '{{ prompt_id }}' -- required
;
INSERT examples
- create_llmobs_prompt_version
- Manifest
Create a new version of an existing Agent Observability prompt.
INSERT INTO datadog.llm_observability.prompt_versions (
data,
prompt_id
)
SELECT
'{{ data }}' /* required */,
'{{ prompt_id }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: prompt_versions
props:
- name: prompt_id
value: "{{ prompt_id }}"
description: Required parameter for the prompt_versions resource.
- name: data
description: |
Data object for creating an Agent Observability prompt version.
value:
attributes:
description: "{{ description }}"
env_ids:
- "{{ env_ids }}"
labels:
- "{{ labels }}"
template: "{{ template }}"
user_version: "{{ user_version }}"
type: "{{ type }}"
UPDATE examples
- update_llmobs_prompt_version
Update the description, the feature-flag environments, or both, for a specific version of an Agent Observability prompt.
UPDATE datadog.llm_observability.prompt_versions
SET
data = '{{ data }}'
WHERE
prompt_id = '{{ prompt_id }}' --required
AND version = '{{ version }}' --required
AND data = '{{ data }}' --required
RETURNING
data;