You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add example document
* Add OTel in progress work to follow-up on
* Update fields for OTel v1.37.0 and not-yet-released v1.38.0
---------
Co-authored-by: Alexandra Konrad <[email protected]>
@@ -31,18 +31,14 @@ Stage 1: Describe at a high level how this change affects fields. Include new or
31
31
32
32
Field | Type | Description /Usage
33
33
-- | -- | --
34
-
gen_ai.system.message.content | text/TBD | The contents of the system message.
35
-
gen_ai.system.message.role | text | The actual role of the message author as passed in the message.
36
-
gen_ai.user.message.content | text | The contents of the user message.
37
-
gen_ai.user.message.role | text | The actual role of the message author as passed in the message.
38
-
gen_ai.assistant.message.content | text | The contents of the tool message.
39
-
gen_ai.assistant.message.role | text | The actual role of the message author as passed in the message.
40
-
gen_ai.assistant.message.tool_calls[] | text | The tool calls generated by the model, such as function calls.
41
-
gen_ai.assistant.message.function[] | [TBD] | The function call.
42
-
gen_ai.assistant.message.arguments | [TBD] | The arguments of the function as provided in the LLM response.
43
-
gen_ai.assistant.message.name | text | The name of the function.
44
-
gen_ai.assistant.message.id | text | The id of the tool call.
45
-
gen_ai.assistant.message.type | [TBD] | The type of the tool.
34
+
gen_ai.system_instructions | (Looking for feedback) flattened | The system message or instructions provided to the GenAI model separately from the chat history.
35
+
gen_ai.input.messages | (Looking for feedback) flattened | The chat history provided to the model as an input.
36
+
gen_ai.output.messages | (Looking for feedback) flattened | Messages returned by the model where each message represents a specific model response (choice, candidate).
37
+
gen_ai.tool.definitions | (Looking for feedback) nested | (Part of invoke_agent span) The list of source system tool definitions available to the GenAI agent or model.
38
+
gen_ai.tool.call.arguments | (Looking for feedback) nested | (Part of OTel execute_tool span) Parameters passed to the tool call.
39
+
gen_ai.tool.call.result | (Looking for feedback) nested | (Part of OTel execute_tool span) The result returned by the tool call (if any and if execution was successful).
40
+
41
+
Changes based on OTel https://github.com/open-telemetry/semantic-conventions/pull/2179/files
46
42
47
43
<!--
48
44
Stage 2: Add or update all remaining field definitions. The list should now be exhaustive. The goal here is to validate the technical details of all remaining fields and to provide a basis for releasing these field definitions as beta in the schema. Use GitHub code blocks with yml syntax formatting, and add them to the corresponding RFC folder.
@@ -60,6 +56,106 @@ Stage 1: Describe at a high-level how these field changes will be used in practi
60
56
Stage 1: Provide a high-level description of example sources of data. This does not yet need to be a concrete example of a source document, but instead can simply describe a potential source (e.g. nginx access log). This will ultimately be fleshed out to include literal source examples in a future stage. The goal here is to identify practical sources for these fields in the real world. ~1-3 sentences or unordered list.
61
57
-->
62
58
59
+
Example usage:
60
+
61
+
```json
62
+
{
63
+
"gen_ai": {
64
+
"system_instructions": {
65
+
[
66
+
{
67
+
"type": "text",
68
+
"content": "You are a assistant for frequent travelers."
69
+
},
70
+
{
71
+
"type": "text",
72
+
"content": "Your mission is to assist travelers with their queries about locations around the world."
73
+
}
74
+
]
75
+
},
76
+
"input": {
77
+
"messages": {
78
+
[
79
+
{
80
+
"role": "user",
81
+
"parts": [
82
+
{
83
+
"type": "text",
84
+
"content": "Weather in Paris?"
85
+
}
86
+
]
87
+
},
88
+
{
89
+
"role": "assistant",
90
+
"parts": [
91
+
{
92
+
"type": "tool_call",
93
+
"id": "call_VSPygqKTWdrhaFErNvMV18Yl",
94
+
"name": "get_weather",
95
+
"arguments": {
96
+
"location": "Paris"
97
+
}
98
+
}
99
+
]
100
+
},
101
+
{
102
+
"role": "tool",
103
+
"parts": [
104
+
{
105
+
"type": "tool_call_response",
106
+
"id": " call_VSPygqKTWdrhaFErNvMV18Yl",
107
+
"result": "rainy, 57°F"
108
+
}
109
+
]
110
+
}
111
+
]
112
+
}
113
+
},
114
+
"output" :{
115
+
"messages": {
116
+
[
117
+
{
118
+
"role": "assistant",
119
+
"parts": [
120
+
{
121
+
"type": "text",
122
+
"content": "The weather in Paris is currently rainy with a temperature of 57°F."
123
+
}
124
+
],
125
+
"finish_reason": "stop"
126
+
}
127
+
]
128
+
},
129
+
130
+
// Below needs to be updated, but keeping in this commit for illustration purposes.
131
+
"assistant": {
132
+
"message": {
133
+
"content": "To carry a 5lb package, you would need a drone with sufficient payload capacity. Drones designed for heavy lifting often fall in the industrial or commercial category. Consider drones with a payload capacity of at least 6-7lbs to ensure safe transport and account for additional factors like battery and stability.",
Stage 2: Included a real world example source document. Ideally this example comes from the source(s) identified in stage 1. If not, it should replace them. The goal here is to validate the utility of these field changes in the context of a real world example. Format with the source name as a ### header and the example document in a GitHub code block with json formatting, or if on the larger side, add them to the corresponding RFC folder.
65
161
-->
@@ -84,6 +180,9 @@ The goal here is to research and understand the impact of these changes on users
84
180
Stage 1: Identify potential concerns, implementation challenges, or complexity. Spend some time on this. Play devil's advocate. Try to identify the sort of non-obvious challenges that tend to surface later. The goal here is to surface risks early, allow everyone the time to work through them, and ultimately document resolution for posterity's sake.
85
181
-->
86
182
183
+
In OTel, many field types are set to `any` and are typically .json objects. [Example](https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-events/)
184
+
In ECS, should we use something like [flattened](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/flattened) type, if allowed?
185
+
87
186
<!--
88
187
Stage 2: Document new concerns or resolutions to previously listed concerns. It's not critical that all concerns have resolutions at this point, but it would be helpful if resolutions were taking shape for the most significant concerns.
89
188
-->
@@ -116,7 +215,11 @@ e.g.:
116
215
<!-- Insert any links appropriate to this RFC in this section. -->
0 commit comments