prompts
Creates, updates, deletes, gets or lists a prompts resource.
Overview
| Name | prompts |
| Type | Resource |
| Id | datadog.llm_observability.prompts |
Fields
The following fields are returned by SELECT queries:
- get_llmobs_prompt
- list_llmobs_prompts
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the prompt. (example: 4a1a28ff-8a25-5f0f-946f-f48264d772eb) |
attributes | object | Attributes of a flattened prompt version returned for SDK consumption. Exactly one of template and chat_template is returned. |
type | string | Resource type of an Agent Observability prompt. (prompt-templates) (example: prompt-templates) |
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the prompt. (example: 4a1a28ff-8a25-5f0f-946f-f48264d772eb) |
attributes | object | Attributes of an Agent Observability prompt registry entry. |
type | string | Resource type of an Agent Observability prompt. (prompt-templates) (example: prompt-templates) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_llmobs_prompt | select | prompt_id | label | Get the latest version of an Agent Observability prompt by prompt ID. |
list_llmobs_prompts | select | filter[prompt_id] | List all Agent Observability prompts in the prompt registry for the organization. | |
create_llmobs_prompt | insert | data | Create a new prompt (and its first version) in the Agent Observability prompt registry. | |
update_llmobs_prompt | update | prompt_id, data | Update the title, the description, or both, for an Agent Observability prompt. | |
delete_llmobs_prompt | delete | prompt_id | Soft-delete an Agent Observability prompt. The prompt's version rows are retained, but they are no longer accessible through the public prompt registry endpoints. |
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. |
filter[prompt_id] | string | Optional filter for prompts by prompt ID. (example: customer-support-assistant) |
label | string | Deprecated. Optional label of the prompt version to return. Do not use this parameter for new integrations. If omitted, the latest version is returned. If the prompt has no labels, the latest version is returned even when a label is requested. If the prompt has labels but none match the requested label, a 404 response is returned. |
SELECT examples
- get_llmobs_prompt
- list_llmobs_prompts
Get the latest version of an Agent Observability prompt by prompt ID.
SELECT
id,
attributes,
type
FROM datadog.llm_observability.prompts
WHERE prompt_id = '{{ prompt_id }}' -- required
AND label = '{{ label }}'
;
List all Agent Observability prompts in the prompt registry for the organization.
SELECT
id,
attributes,
type
FROM datadog.llm_observability.prompts
WHERE filter[prompt_id] = '{{ filter[prompt_id] }}'
;
INSERT examples
- create_llmobs_prompt
- Manifest
Create a new prompt (and its first version) in the Agent Observability prompt registry.
INSERT INTO datadog.llm_observability.prompts (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;
# Description fields are for documentation purposes
- name: prompts
props:
- name: data
description: |
Data object for creating an Agent Observability prompt.
value:
attributes:
description: "{{ description }}"
env_ids:
- "{{ env_ids }}"
labels:
- "{{ labels }}"
prompt_id: "{{ prompt_id }}"
template: "{{ template }}"
title: "{{ title }}"
user_version: "{{ user_version }}"
type: "{{ type }}"
UPDATE examples
- update_llmobs_prompt
Update the title, the description, or both, for an Agent Observability prompt.
UPDATE datadog.llm_observability.prompts
SET
data = '{{ data }}'
WHERE
prompt_id = '{{ prompt_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;
DELETE examples
- delete_llmobs_prompt
Soft-delete an Agent Observability prompt. The prompt's version rows are retained, but they are no longer accessible through the public prompt registry endpoints.
DELETE FROM datadog.llm_observability.prompts
WHERE prompt_id = '{{ prompt_id }}' --required
;