Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional LLM span attributes #1059

Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ada3a9a
Add additional LLM span attributes
karthikscale3 May 22, 2024
6dd78a1
add change log
karthikscale3 May 22, 2024
988a116
Add presence and frequency penalty
karthikscale3 May 22, 2024
1ffde11
Add presence and frequency penalty
karthikscale3 May 22, 2024
77bdde8
add new line
karthikscale3 May 22, 2024
1c0616d
Merge branch 'main' into karthik/add-additional-genai-attributes
joaopgrassi May 28, 2024
a210669
Update .chloggen/839.yaml
karthikscale3 May 29, 2024
57f4dce
Update model/registry/gen-ai.yaml
karthikscale3 May 29, 2024
c7506aa
Update model/registry/gen-ai.yaml
karthikscale3 May 29, 2024
5dfddfe
Update model/registry/gen-ai.yaml
karthikscale3 May 29, 2024
b4392e8
Update model/registry/gen-ai.yaml
karthikscale3 May 29, 2024
fea6331
Merge branch 'main' into karthik/add-additional-genai-attributes
karthikscale3 May 29, 2024
eeae488
Update gen-ai.yaml
karthikscale3 May 29, 2024
a3a573d
Resolve merge conflicts
karthikscale3 Jun 19, 2024
19208d5
Resolve merge conflicts
karthikscale3 Jun 19, 2024
65df716
Generate md
karthikscale3 Jun 19, 2024
76c3814
Update markdowns
karthikscale3 Jun 19, 2024
279989a
Update md
karthikscale3 Jun 19, 2024
d013863
Update model/registry/gen-ai.yaml
karthikscale3 Jun 19, 2024
5fd9414
Update model/registry/gen-ai.yaml
karthikscale3 Jun 19, 2024
a14affc
Update model/registry/gen-ai.yaml
karthikscale3 Jun 19, 2024
1bdb929
Update model/registry/gen-ai.yaml
karthikscale3 Jun 19, 2024
68a0c5f
Update model/registry/gen-ai.yaml
karthikscale3 Jun 19, 2024
12e1d05
Merge branch 'main' into karthik/add-additional-genai-attributes
karthikscale3 Jun 19, 2024
1cb0ab1
Merge branch 'main' into karthik/add-additional-genai-attributes
nirga Jun 19, 2024
e580b8e
Update markdowns
karthikscale3 Jun 20, 2024
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
4 changes: 4 additions & 0 deletions .chloggen/839.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
change_type: enhancement
component: gen-ai
note: Adding `gen_ai.request.top_k`, `gen_ai.request.presence_penalty`, `gen_ai.request.frequency_penalty` and `gen_ai.request.stop_sequences` attributes.
issues: [839]
4 changes: 4 additions & 0 deletions docs/attributes-registry/gen-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ This document defines the attributes used to describe telemetry in the context o
| `gen_ai.request.model` | string | The name of the LLM a request is being made to. | `gpt-4` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `gen_ai.request.temperature` | double | The temperature setting for the LLM request. | `0.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `gen_ai.request.top_p` | double | The top_p sampling setting for the LLM request. | `1.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `gen_ai.request.stop` | string | Up to 4 sequences where the API will stop generating further tokens. | `1.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
karthikscale3 marked this conversation as resolved.
Show resolved Hide resolved
karthikscale3 marked this conversation as resolved.
Show resolved Hide resolved
| `gen_ai.request.top_k` | double | The top_k sampling setting for the LLM request. | `1.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `gen_ai.request.frequency_penalty` | double | The frequency penalty setting for the LLM request. | `1.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `gen_ai.request.presence_penalty` | double | The presence penalty setting for the LLM request. | `1.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `gen_ai.response.finish_reasons` | string[] | Array of reasons the model stopped generating tokens, corresponding to each generation received. | `stop` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `gen_ai.response.id` | string | The unique identifier for the completion. | `chatcmpl-123` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `gen_ai.response.model` | string | The name of the LLM a response was generated from. | `gpt-4-0613` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
Expand Down
20 changes: 20 additions & 0 deletions model/registry/gen-ai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,26 @@ groups:
brief: The top_p sampling setting for the LLM request.
examples: [1.0]
tag: llm-generic-request
- id: request.top_k
stability: experimental
type: double
brief: The top_k sampling setting for the LLM request.
karthikscale3 marked this conversation as resolved.
Show resolved Hide resolved
examples: [1.0]
- id: request.stop_sequences
stability: experimental
type: string[]
brief: The stop sequences provided in the request.
examples: ['\n']
- id: request.frequency_penalty
karthikscale3 marked this conversation as resolved.
Show resolved Hide resolved
stability: experimental
type: double
brief: The frequency penalty to provide.
examples: ['0.1']
karthikscale3 marked this conversation as resolved.
Show resolved Hide resolved
- id: request.presence_penalty
stability: experimental
type: double
brief: The presence penalty to provide.
examples: ['0.1']
karthikscale3 marked this conversation as resolved.
Show resolved Hide resolved
- id: response.id
stability: experimental
type: string
Expand Down
8 changes: 8 additions & 0 deletions model/trace/gen-ai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ groups:
requirement_level: recommended
- ref: gen_ai.request.top_p
requirement_level: recommended
- ref: gen_ai.request.top_k
requirement_level: recommended
- ref: gen_ai.request.stop
requirement_level: recommended
- ref: gen_ai.request.frequncy_penalty
drewby marked this conversation as resolved.
Show resolved Hide resolved
requirement_level: recommended
- ref: gen_ai.request.presence_penalty
requirement_level: recommended
- ref: gen_ai.response.id
requirement_level: recommended
- ref: gen_ai.response.model
Expand Down
Loading