Loading

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

OTel Badge match gen_ai.agent.description
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

OTel Badge match gen_ai.agent.id
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

OTel Badge match gen_ai.agent.name
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

OTel Badge match gen_ai.operation.name
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

OTel Badge match gen_ai.output.type
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

OTel Badge match gen_ai.request.choice.count
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"]

OTel Badge match gen_ai.request.encoding_formats
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

OTel Badge match gen_ai.request.frequency_penalty
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

OTel Badge match gen_ai.request.max_tokens
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

OTel Badge match gen_ai.request.model
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

OTel Badge match gen_ai.request.presence_penalty
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

OTel Badge match gen_ai.request.seed
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"]

OTel Badge match gen_ai.request.stop_sequences
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

OTel Badge match gen_ai.request.temperature
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

OTel Badge match gen_ai.request.top_k
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

OTel Badge match gen_ai.request.top_p
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"]

OTel Badge match gen_ai.response.finish_reasons
extended
gen_ai.response.id This field is beta and subject to change. The unique identifier for the completion.

type: keyword

example: chatcmpl-123

OTel Badge match gen_ai.response.id
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

OTel Badge match gen_ai.response.model
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

OTel Badge match gen_ai.system
extended
gen_ai.token.type This field is beta and subject to change. The type of token being counted.

type: keyword

example: input; output

OTel Badge match gen_ai.token.type
extended
gen_ai.tool.call.id This field is beta and subject to change. The tool call identifier.

type: keyword

example: call_mszuSIzqtI65i1wAUOE8w5H4

OTel Badge match gen_ai.tool.call.id
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

OTel Badge match gen_ai.tool.name
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

OTel Badge match gen_ai.tool.type
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

OTel Badge match gen_ai.usage.input_tokens
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

OTel Badge match gen_ai.usage.output_tokens
extended