From d0e530721f2d59a5f1dc414b04ffee7a507123e8 Mon Sep 17 00:00:00 2001 From: Jacob Simpher Date: Tue, 11 Nov 2025 16:02:07 -0500 Subject: [PATCH 1/4] add example for http api prompt variables --- .../llm_observability/instrumentation/api.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/content/en/llm_observability/instrumentation/api.md b/content/en/llm_observability/instrumentation/api.md index 467e216c2216a..2ba1f149772f0 100644 --- a/content/en/llm_observability/instrumentation/api.md +++ b/content/en/llm_observability/instrumentation/api.md @@ -178,6 +178,26 @@ If the request is successful, the API responds with a 202 network code and an em | 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. | +**Note**: LLM Observability registers new versions of templates when the template or chat_template value is updated. If the input is expected to change between invocations, extract those dynamic parts into a variable. + +{{< code-block lang="json" >}} +{ + "id": "translation-prompt", + "chat_template": [ + { + "role": "system", + "content": "You are a translation service. You translate to {{language}}." + }, { + "role": "user", + "content": "{{user_input}}" + } + ], + "variables": { + "language": "french", + "user_input": "" + } +} +{{< /code-block >}} #### Meta | Field | Type | Description | From 07cf9f957d0747699714c86d03717d3b6148d4ac Mon Sep 17 00:00:00 2001 From: Jacob Simpher Date: Tue, 11 Nov 2025 16:24:39 -0500 Subject: [PATCH 2/4] tabbed --- content/en/llm_observability/instrumentation/api.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/content/en/llm_observability/instrumentation/api.md b/content/en/llm_observability/instrumentation/api.md index 2ba1f149772f0..35853bffa82ab 100644 --- a/content/en/llm_observability/instrumentation/api.md +++ b/content/en/llm_observability/instrumentation/api.md @@ -167,6 +167,8 @@ If the request is successful, the API responds with a 202 network code and an em | id | string | The id of this document. | #### Prompt +{{< tabs >}} +{{% tab "Model" %}} | Field | Type | Description | |----------------------|--------|--------------------------| | id | string | Logical identifier for this prompt template. Should be unique per `ml_app`. | @@ -178,8 +180,10 @@ If the request is successful, the API responds with a 202 network code and an em | 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. | -**Note**: LLM Observability registers new versions of templates when the template or chat_template value is updated. If the input is expected to change between invocations, extract those dynamic parts into a variable. +**Note**: LLM Observability registers new versions of templates when the template or chat_template value is updated. If the input is expected to change between invocations, extract the dynamic parts into a variable. +{{% /tab %}} +{{% tab "Example" %}} {{< code-block lang="json" >}} { "id": "translation-prompt", @@ -198,6 +202,7 @@ If the request is successful, the API responds with a 202 network code and an em } } {{< /code-block >}} +{{% /tab %}} #### Meta | Field | Type | Description | From ab2321220eba08bd8f261900a517890dd6e1bac5 Mon Sep 17 00:00:00 2001 From: Jacob Simpher Date: Tue, 11 Nov 2025 16:36:17 -0500 Subject: [PATCH 3/4] fix --- content/en/llm_observability/instrumentation/api.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/en/llm_observability/instrumentation/api.md b/content/en/llm_observability/instrumentation/api.md index 35853bffa82ab..7366a56016435 100644 --- a/content/en/llm_observability/instrumentation/api.md +++ b/content/en/llm_observability/instrumentation/api.md @@ -203,6 +203,7 @@ If the request is successful, the API responds with a 202 network code and an em } {{< /code-block >}} {{% /tab %}} +{{< /tabs >}} #### Meta | Field | Type | Description | From 89087f720da545e70ba2a6f49c1c9fc5ffb6c400 Mon Sep 17 00:00:00 2001 From: cecilia saixue wat-kim Date: Wed, 12 Nov 2025 10:18:09 -0800 Subject: [PATCH 4/4] Update api.md --- content/en/llm_observability/instrumentation/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/llm_observability/instrumentation/api.md b/content/en/llm_observability/instrumentation/api.md index 7366a56016435..4b04af0725f7a 100644 --- a/content/en/llm_observability/instrumentation/api.md +++ b/content/en/llm_observability/instrumentation/api.md @@ -180,7 +180,7 @@ If the request is successful, the API responds with a 202 network code and an em | 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. | -**Note**: LLM Observability registers new versions of templates when the template or chat_template value is updated. If the input is expected to change between invocations, extract the dynamic parts into a variable. +**Note**: LLM Observability registers new versions of templates when the `template` or `chat_template` value is updated. If the input is expected to change between invocations, extract the dynamic parts into a variable. {{% /tab %}} {{% tab "Example" %}}