Gen AI fields
Elastic Stack Serverless
Fields that capture the context of Generative Artificial Intelligence (GenAI) Models requests and responses
This field group definition is based on the Gen AI namespace of the OpenTelemetry Semantic Conventions (https://opentelemetry.io/docs/specs/semconv/attributes-registry/gen-ai/).
Field | Description | Level |
---|---|---|
gen_ai.agent.description | This field is beta and subject to change. Free-form description of the GenAI agent provided by the application. type: keyword example: Helps with math problems; Generates fiction stories |
extended |
gen_ai.agent.id | This field is beta and subject to change. The unique identifier of the GenAI agent. type: keyword example: asst_5j66UpCpwteGg4YSxUnt7lPY |
extended |
gen_ai.agent.name | This field is beta and subject to change. Human-readable name of the GenAI agent provided by the application. type: keyword example: Math Tutor; Fiction Writer |
extended |
gen_ai.operation.name | This field is beta and subject to change. The name of the operation being performed. type: keyword example: chat; text_completion; embeddings |
extended |
gen_ai.output.type | This field is beta and subject to change. Represents the content type requested by the client. type: keyword example: text; json; image |
extended |
gen_ai.request.choice.count | This field is beta and subject to change. The target number of candidate completions to return. type: integer example: 3 |
extended |
gen_ai.request.encoding_formats | This field is beta and subject to change. The encoding formats requested in an embeddings operation, if specified. type: nested example: ["float", "binary"] |
extended |
gen_ai.request.frequency_penalty | This field is beta and subject to change. The frequency penalty setting for the GenAI request. type: double example: 0.1 |
extended |
gen_ai.request.max_tokens | This field is beta and subject to change. The maximum number of tokens the model generates for a request. type: integer example: 100 |
extended |
gen_ai.request.model | This field is beta and subject to change. The name of the GenAI model a request is being made to. type: keyword example: gpt-4 |
extended |
gen_ai.request.presence_penalty | This field is beta and subject to change. The presence penalty setting for the GenAI request. type: double example: 0.1 |
extended |
gen_ai.request.seed | This field is beta and subject to change. Requests with same seed value more likely to return same result. type: integer example: 100 |
extended |
gen_ai.request.stop_sequences | This field is beta and subject to change. List of sequences that the model will use to stop generating further tokens. type: nested example: ["forest", "lived"] |
extended |
gen_ai.request.temperature | This field is beta and subject to change. The temperature setting for the GenAI request. type: double example: 0.0 |
extended |
gen_ai.request.top_k | This field is beta and subject to change. The top_k sampling setting for the GenAI request. type: double example: 1.0 |
extended |
gen_ai.request.top_p | This field is beta and subject to change. The top_p sampling setting for the GenAI request. type: double example: 1.0 |
extended |
gen_ai.response.finish_reasons | This field is beta and subject to change. Array of reasons the model stopped generating tokens, corresponding to each generation received. type: nested example: ["stop", "length"] |
extended |
gen_ai.response.id | This field is beta and subject to change. The unique identifier for the completion. type: keyword example: chatcmpl-123 |
extended |
gen_ai.response.model | This field is beta and subject to change. The name of the model that generated the response. type: keyword example: gpt-4-0613 |
extended |
gen_ai.system | This field is beta and subject to change. The Generative AI product as identified by the client or server instrumentation. type: keyword example: openai |
extended |
gen_ai.token.type | This field is beta and subject to change. The type of token being counted. type: keyword example: input; output |
extended |
gen_ai.tool.call.id | This field is beta and subject to change. The tool call identifier. type: keyword example: call_mszuSIzqtI65i1wAUOE8w5H4 |
extended |
gen_ai.tool.name | This field is beta and subject to change. Name of the tool utilized by the agent. type: keyword example: Flights |
extended |
gen_ai.tool.type | This field is beta and subject to change. Type of the tool utilized by the agent type: keyword example: function; extension; datastore |
extended |
gen_ai.usage.input_tokens | This field is beta and subject to change. The number of tokens used in the GenAI input (prompt). type: integer example: 100 |
extended |
gen_ai.usage.output_tokens | This field is beta and subject to change. The number of tokens used in the GenAI response (completion). type: integer example: 180 |
extended |