Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions content/en/llm_observability/instrumentation/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`. |
Expand All @@ -178,6 +180,30 @@ 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.

{{% /tab %}}
{{% tab "Example" %}}
{{< 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": "<USER_INPUT_TEXT>"
}
}
{{< /code-block >}}
{{% /tab %}}
{{< /tabs >}}

#### Meta
| Field | Type | Description |
Expand Down
Loading