Skip to main content

prompts

Creates, updates, deletes, gets or lists a prompts resource.

Overview

Nameprompts
TypeResource
Iddatadog.llm_observability.prompts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringUnique identifier of the prompt. (example: 4a1a28ff-8a25-5f0f-946f-f48264d772eb)
attributesobjectAttributes of a flattened prompt version returned for SDK consumption. Exactly one of template and chat_template is returned.
typestringResource type of an Agent Observability prompt. (prompt-templates) (example: prompt-templates)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_llmobs_promptselectprompt_idlabelGet the latest version of an Agent Observability prompt by prompt ID.
list_llmobs_promptsselectfilter[prompt_id]List all Agent Observability prompts in the prompt registry for the organization.
create_llmobs_promptinsertdataCreate a new prompt (and its first version) in the Agent Observability prompt registry.
update_llmobs_promptupdateprompt_id, dataUpdate the title, the description, or both, for an Agent Observability prompt.
delete_llmobs_promptdeleteprompt_idSoft-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.

NameDatatypeDescription
prompt_idstringThe customer-provided identifier of the Agent Observability prompt. (example: customer-support-assistant)
sitestringThe 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]stringOptional filter for prompts by prompt ID. (example: customer-support-assistant)
labelstringDeprecated. 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 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 }}'
;

INSERT examples

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
;

UPDATE examples

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

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
;