diff --git a/hugo/content/en/llm_observability/instrument/api.md b/hugo/content/en/llm_observability/instrument/api.md index d8275086e97..0612e4bdd2f 100644 --- a/hugo/content/en/llm_observability/instrument/api.md +++ b/hugo/content/en/llm_observability/instrument/api.md @@ -255,6 +255,8 @@ An image on a message. Provide either `content` or `attachment_key`. | query_variable_keys | [string] | Variable keys that contain the user query. Used for hallucination detection. | | context_variable_keys | [string] | Variable keys that contain ground-truth or context content. Used for hallucination detection. | | tags | Dict[key (string), string] | Tags to attach to the prompt run. | +| prompt_uuid | string | No, unless linking to Prompt Management. The prompt's UUID from [Prompt Management][6]. Required for the span to link back to its Prompt Management registry entry. | +| prompt_version_uuid | string | The specific prompt version's UUID from [Prompt Management][6]. | {{% /tab %}} {{% tab "Example" %}} @@ -279,6 +281,8 @@ An image on a message. Provide either `content` or `attachment_key`. {{% /tab %}} {{< /tabs >}} +**Note**: If your prompt comes from the [Prompt Management][6] registry (for example, fetched through the Prompt Management REST API in a language without a native Agent Observability SDK), include the `prompt_uuid` (and `prompt_version_uuid`, if available) returned by the API alongside `id` and `version`. Without `prompt_uuid`, the span's prompt metadata is tracked but does not link back to the registry entry in the Prompts view. + #### Meta | Field | Type | Description | |-------------|-------------------|--------------| @@ -704,3 +708,4 @@ For feedback events, provide exactly one of `span_id`, `trace_id`, `session_id`, [3]: /getting_started/tagging/ [4]: /llm_observability/investigate/evaluations/end_user_feedback [5]: /llm_observability/instrument/sdk/?tab=python#enriching-spans +[6]: /llm_observability/configure/prompt_management diff --git a/hugo/content/en/llm_observability/instrument/prompt_tracking.md b/hugo/content/en/llm_observability/instrument/prompt_tracking.md index 64e20b382b3..ad0db9dc02e 100644 --- a/hugo/content/en/llm_observability/instrument/prompt_tracking.md +++ b/hugo/content/en/llm_observability/instrument/prompt_tracking.md @@ -89,10 +89,14 @@ The following fields are supported in the prompt tracking JSON: | `id` | string | No | Unique identifier for the prompt. Defaults to `{ml_app}_unnamed-prompt` if omitted | | `name` | string | No | Prompt name. Used as a fallback for `id` if `id` is omitted | | `version` | string | No | User-supplied version tag | +| `prompt_uuid` | string | No, unless linking to Prompt Management | The prompt's UUID from [Prompt Management][8]. Required for the span to link back to its Prompt Management registry entry | +| `prompt_version_uuid` | string | No | The specific prompt version's UUID from [Prompt Management][8] | | `variables` | object | No | Template variable substitutions | | `rag_context_variables` | array of strings | No | Names of variables in `variables` that contain RAG context (ground truth). Used by RAG evaluators | | `rag_query_variables` | array of strings | No | Names of variables in `variables` that contain the user query. Used by RAG evaluators | +**Note**: If your prompt comes from the [Prompt Management][8] registry (for example, fetched through the Prompt Management REST API in a language without a native Agent Observability SDK), include the `prompt_uuid` (and `prompt_version_uuid`, if available) returned by the API alongside `id` and `version`. Without `prompt_uuid`, the span's prompt metadata is tracked but does not link back to the registry entry in the Prompts view. +
If you are using prompt templates, Agent Observability can automatically attach version information based on prompt content.
### With LangChain templates