file_format: resolved/2.0
schema_url: https://openinf.dev/schemas/0.0.1
attribute_catalog:
- key: agent.name
  type: string
  examples:
  - researcher
  brief: The name of the agent that this span represents.
  stability: development
- key: annotation.annotator_kind
  type:
    members:
    - id: human
      value: HUMAN
      brief: A human reviewer.
      stability: development
    - id: llm
      value: LLM
      brief: An LLM judge.
      stability: development
    - id: code
      value: CODE
      brief: A code-based evaluator.
      stability: development
  examples:
  - LLM
  - HUMAN
  brief: 'Judge kind: `HUMAN`, `LLM`, `CODE`, or custom. See [Annotator Kinds](https://github.com/Arize-ai/openinference/blob/main/spec/feedback/annotations.md#annotator-kinds)'
  stability: development
- key: annotation.explanation
  type: string
  examples:
  - The claim is not supported by the context.
  brief: Reason or evidence for the result
  stability: development
- key: annotation.identifier
  type: string
  examples:
  - judge-v2
  - reviewer-42
  brief: Stable result ID for the same name and target
  stability: development
- key: annotation.label
  type: string
  examples:
  - hallucinated
  - relevant
  brief: Categorical result
  stability: development
- key: annotation.metadata
  type: string
  examples:
  - '{"evaluator":"judge-v2"}'
  brief: Additional result or judge data
  stability: development
  annotations:
    openinference:
      encoding: json
- key: annotation.name
  type: string
  examples:
  - hallucination
  - relevance
  brief: Criterion or metric name
  stability: development
- key: annotation.score
  type: double
  examples:
  - 1.0
  - 0.95
  brief: Numeric result.
  note: Instrumentations MAY record an integer; consumers SHOULD accept both integers and floats.
  stability: development
  annotations:
    openinference:
      also_accepts:
      - int
- key: annotations
  type: template[any]
  examples:
  - '[{"annotation.name": "hallucination", "annotation.label": "hallucinated"}]'
  brief: Span-scoped feedback using annotation terminology, flattened as `annotations.0.annotation.*`
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - annotation
- key: audio.mime_type
  type: string
  examples:
  - audio/mpeg
  brief: The MIME type of the audio file.
  stability: development
- key: audio.transcript
  type: string
  examples:
  - Hello, how are you?
  brief: The transcript of the audio file (e.g. a Whisper transcription)
  stability: development
- key: audio.url
  type: string
  examples:
  - https://storage.com/buckets/1/file.wav
  brief: The URL of an audio file (e.g. cloud storage), or a base64 data URI
  stability: development
- key: completion.text
  type: string
  examples:
  - ' + fib(n-3)...'
  brief: The text of a choice returned from a completions API. Used under `llm.choices`.
  stability: development
- key: decision.model_name
  type: string
  examples:
  - jev-1.13.0
  brief: The name of the decision model being utilized. Mirrors `llm.model_name` for `DECISION` spans.
  stability: development
- key: decision.provider
  type:
    members:
    - id: typesafe
      value: typesafe
      brief: TypeSafe AI
      stability: development
    - id: openai
      value: openai
      brief: OpenAI
      stability: development
  examples:
  - typesafe
  brief: 'The hosting provider of the decision model: who runs the hardware that answered, e.g. `typesafe` when calling TypeSafe directly, `openai` for the OpenAI Decisions API, or the cloud or self-hosting provider for a model served elsewhere. Distinct from `decision.system`, which names the API shape. The well-known values alias the matching `llm.provider` values.'
  stability: development
- key: decision.request.model_name
  type: string
  examples:
  - jev-latest
  brief: The decision model requested by the caller, as sent in the request. May differ from `decision.response.model_name` when the provider resolves an alias or routes the request.
  stability: development
- key: decision.response.model_name
  type: string
  examples:
  - jev-1.13.0
  brief: The decision model that actually produced the response, as reported by the provider. May differ from `decision.request.model_name`.
  stability: development
- key: decision.system
  type:
    members:
    - id: typesafe
      value: typesafe
      brief: '[TypeSafe AI System One / Jev API](https://typesafe.ai/blog/introducing-system-one-models-and-jev), including Jev-compatible servers such as vLLM''s `/v1/systemone`'
      stability: development
    - id: openai
      value: openai
      brief: '[OpenAI Decisions API](https://openai.com/index/devday-2026-recap/)'
      stability: development
  examples:
  - typesafe
  brief: 'The decision API ecosystem the call conforms to, i.e. which request/response shape the client speaks, as identified by the client or server instrumentation: `typesafe` for the TypeSafe System One / Jev API, `openai` for the OpenAI Decisions API. A self-hosted vLLM server answering the Jev-compatible `/v1/systemone` shape is still `typesafe`. Distinct from `decision.provider`, which says who hosts the model. The well-known values alias the matching `llm.system` values.'
  stability: development
- key: decision.token_count.input
  type: int
  examples:
  - 412
  brief: 'The number of input tokens consumed by a decision model call: the state, questions, and candidate options. Maps to `usage.input_tokens` in TypeSafe System One responses.'
  stability: development
- key: decision.token_count.output
  type: int
  examples:
  - 2
  brief: The number of output tokens produced by a decision model call. Decision models emit typed answers rather than text, so this is typically small. Maps to `usage.output_tokens` in TypeSafe System One responses.
  stability: development
- key: document.content
  type: string
  examples:
  - This is a sample document content.
  brief: 'The text content of a document: a retrieved passage, or an inline text document passed to a model (e.g. an Anthropic `text` source)'
  stability: development
- key: document.id
  type: string
  examples:
  - '1234'
  - '1'
  - file-abc123
  brief: 'Unique identifier for a document: a retrieved document or chunk in a retrieval system, or the provider file id (e.g. an OpenAI or Anthropic Files API id) for a document passed to a model.'
  note: Instrumentations MAY record an integer id; consumers SHOULD accept both strings and integers.
  stability: development
  annotations:
    openinference:
      also_accepts:
      - int
- key: document.metadata
  type: string
  examples:
  - '{''author'': ''John Doe'', ''date'': ''2023-09-09''}'
  brief: Metadata associated with a document
  stability: development
  annotations:
    openinference:
      encoding: json
- key: document.mime_type
  type: string
  examples:
  - application/pdf
  brief: The MIME type of a file document such as a PDF
  stability: development
- key: document.name
  type: string
  examples:
  - invoice.pdf
  brief: 'The name supplied with a document, copied verbatim: a file name (OpenAI `filename`) or a title (Anthropic `title`, Bedrock `name`, Gemini `display_name`); not a unique identifier'
  stability: development
- key: document.score
  type: double
  examples:
  - 0.98
  brief: Score representing the relevance of a document
  stability: development
- key: document.url
  type: string
  examples:
  - https://example.com/report.pdf
  brief: The URL, object-store URI, or base64 data URI of a file document such as a PDF
  stability: development
- key: embedding.embeddings
  type: template[any]
  examples:
  - '[{"embedding.vector": [...], "embedding.text": "hello"}]'
  brief: List of embedding objects including text and vector data
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_attributes:
      - embedding.text
      - embedding.vector
- key: embedding.invocation_parameters
  type: string
  examples:
  - '{"model": "text-embedding-3-small", "encoding_format": "float"}'
  brief: Parameters used during the invocation of an embedding model or API (excluding input)
  stability: development
  annotations:
    openinference:
      encoding: json
- key: embedding.model_name
  type: string
  examples:
  - BERT-base
  brief: Name of the embedding model used
  stability: development
- key: embedding.text
  type: string
  examples:
  - hello world
  brief: The text represented in the embedding
  stability: development
- key: embedding.vector
  type: double[]
  examples:
  - - 0.123
    - 0.456
  brief: The embedding vector consisting of a list of floats
  stability: development
- key: evaluation.annotator_kind
  type:
    members:
    - id: human
      value: HUMAN
      brief: A human reviewer.
      stability: development
    - id: llm
      value: LLM
      brief: An LLM judge.
      stability: development
    - id: code
      value: CODE
      brief: A code-based evaluator.
      stability: development
  examples:
  - LLM
  - HUMAN
  brief: 'Judge kind: `HUMAN`, `LLM`, `CODE`, or custom. See [Annotator Kinds](https://github.com/Arize-ai/openinference/blob/main/spec/feedback/annotations.md#annotator-kinds)'
  stability: development
- key: evaluation.explanation
  type: string
  examples:
  - The claim is not supported by the context.
  brief: Reason or evidence for the result
  stability: development
- key: evaluation.identifier
  type: string
  examples:
  - judge-v2
  - reviewer-42
  brief: Stable result ID for the same name and target
  stability: development
- key: evaluation.label
  type: string
  examples:
  - hallucinated
  - relevant
  brief: Categorical result
  stability: development
- key: evaluation.metadata
  type: string
  examples:
  - '{"evaluator":"judge-v2"}'
  brief: Additional result or judge data
  stability: development
  annotations:
    openinference:
      encoding: json
- key: evaluation.name
  type: string
  examples:
  - hallucination
  - relevance
  brief: Criterion or metric name
  stability: development
- key: evaluation.score
  type: double
  examples:
  - 1.0
  - 0.95
  brief: Numeric result.
  note: Instrumentations MAY record an integer; consumers SHOULD accept both integers and floats.
  stability: development
  annotations:
    openinference:
      also_accepts:
      - int
- key: evaluations
  type: template[any]
  examples:
  - '[{"evaluation.name": "relevance", "evaluation.score": 0.95}]'
  brief: Span-scoped feedback using evaluation or eval terminology, flattened as `evaluations.0.evaluation.*`
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - evaluation
- key: graph.node.id
  type: string
  examples:
  - search_api_0
  brief: The id of the node in the execution graph. This along with `graph.node.parent_id` are used to visualize the execution graph.
  stability: development
- key: graph.node.name
  type: string
  examples:
  - Search API
  brief: The name of the node in the execution graph. Use this to present a human readable name for the node. Optional
  stability: development
- key: graph.node.parent_id
  type: string
  examples:
  - router_0
  brief: This references the id of the parent node. Leaving this unset or set as empty string implies that the current span is the root node.
  stability: development
- key: image.url
  type: string
  examples:
  - https://sample-link-to-image.jpg
  brief: The link to the image or its base64 encoding
  stability: development
- key: input.documents
  type: template[any]
  examples:
  - '[{"document.url": "https://example.com/report.pdf", "document.mime_type": "application/pdf"}]'
  brief: File document (e.g. PDF) inputs to an operation, independent of span kind, e.g. `input.documents.0.document.url`. See [Multimodal Content](https://github.com/Arize-ai/openinference/blob/main/spec/content/multimodal.md#span-kind-independent-documents)
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - document
- key: input.images
  type: template[any]
  examples:
  - '[{"image.url": "https://sample-link-to-image.jpg"}]'
  brief: Image inputs to an operation, independent of span kind, e.g. `input.images.0.image.url`. See [Multimodal Content](https://github.com/Arize-ai/openinference/blob/main/spec/content/multimodal.md#span-kind-independent-images)
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - image
- key: input.mime_type
  type:
    members:
    - id: text
      value: text/plain
      brief: Plain text. The default when unspecified.
      stability: development
    - id: json
      value: application/json
      brief: A string holding serialized JSON.
      stability: development
  examples:
  - text/plain
  - application/json
  brief: MIME type of `input.value`, usually `application/json`.
  stability: development
- key: input.mime_type
  type:
    members:
    - id: text
      value: text/plain
      brief: Plain text. The default when unspecified.
      stability: development
    - id: json
      value: application/json
      brief: A string holding serialized JSON.
      stability: development
  examples:
  - text/plain
  - application/json
  brief: MIME type representing the format of `input.value`
  stability: development
- key: input.value
  type: string
  examples:
  - '{''query'': ''What is the weather today?''}'
  brief: The input value to an operation
  stability: development
- key: input.value
  type: string
  examples:
  - '{''query'': ''What is the weather today?''}'
  brief: The raw input as a JSON string (text strings or token ID arrays).
  stability: development
- key: input.value
  type: string
  examples:
  - '{''query'': ''What is the weather today?''}'
  brief: The raw input, usually a JSON string.
  stability: development
- key: input.value
  type: string
  examples:
  - '{''query'': ''What is the weather today?''}'
  brief: The raw request as a JSON string, including the candidate options.
  stability: development
- key: llm.choices
  type: template[any]
  examples:
  - '[{"completion.text": " + fib(n-3)..."}]'
  brief: Text choices returned from a completions API, e.g. `llm.choices.0.completion.text`
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - completion
- key: llm.cost.completion
  type: double
  examples:
  - 0.0045
  brief: Total cost of all output tokens generated by the LLM in USD
  stability: development
- key: llm.cost.completion_details.audio
  type: double
  examples:
  - 0.0012
  brief: Cost of audio tokens in the completion in USD
  stability: development
- key: llm.cost.completion_details.output
  type: double
  examples:
  - 0.0009
  brief: Total cost of output tokens in USD
  stability: development
- key: llm.cost.completion_details.reasoning
  type: double
  examples:
  - 0.0024
  brief: Cost of reasoning steps in the completion in USD
  stability: development
- key: llm.cost.prompt
  type: double
  examples:
  - 0.0021
  brief: Total cost of all input tokens sent to the LLM in USD
  stability: development
- key: llm.cost.prompt_details.audio
  type: double
  examples:
  - 0.0003
  brief: Cost of audio tokens in the prompt in USD
  stability: development
- key: llm.cost.prompt_details.cache_input
  type: double
  examples:
  - 0.0006
  brief: Cost of input tokens in the prompt that were cached in USD
  stability: development
- key: llm.cost.prompt_details.cache_read
  type: double
  examples:
  - 0.0003
  brief: Cost of prompt tokens read from cache in USD
  stability: development
- key: llm.cost.prompt_details.cache_write
  type: double
  examples:
  - 0.0006
  brief: Cost of prompt tokens written to cache in USD
  stability: development
- key: llm.cost.prompt_details.input
  type: double
  examples:
  - 0.0003
  brief: Total cost of input tokens in USD
  stability: development
- key: llm.cost.total
  type: double
  examples:
  - 0.0066
  brief: Total cost of the LLM call in USD (prompt + completion)
  stability: development
- key: llm.finish_reason
  type: string
  examples:
  - stop
  - length
  brief: The reason the model stopped generating tokens.
  stability: development
- key: llm.function_call
  type: string
  examples:
  - '{function_name: ''add'', args: [1, 2]}'
  brief: Object recording details of a function call in models or APIs
  stability: development
  deprecated:
    reason: uncategorized
    note: Use `message.tool_calls` instead.
  annotations:
    openinference:
      encoding: json
- key: llm.input_messages
  type: template[any]
  examples:
  - '[{"message.role": "user", "message.content": "hello"}]'
  brief: List of messages sent to the LLM in a chat API request, e.g. `llm.input_messages.0.message.role`. See [Messages](https://github.com/Arize-ai/openinference/blob/main/spec/content/messages.md)
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - message
- key: llm.invocation_parameters
  type: string
  examples:
  - '{model_name: ''gpt-3'', temperature: 0.7}'
  brief: Parameters used during the invocation of an LLM or API
  stability: development
  annotations:
    openinference:
      encoding: json
- key: llm.model_name
  type: string
  examples:
  - gpt-3.5-turbo
  brief: The name of the language model being utilized
  stability: development
- key: llm.output_messages
  type: template[any]
  examples:
  - '[{"message.role": "assistant", "message.content": "hello"}]'
  brief: List of messages received from the LLM in a chat API response, e.g. `llm.output_messages.0.message.role`. See [Messages](https://github.com/Arize-ai/openinference/blob/main/spec/content/messages.md)
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - message
- key: llm.prompt_template.template
  type: string
  examples:
  - Weather forecast for {city} on {date}
  brief: Template used to generate prompts (e.g., using `{variable}` placeholder syntax)
  stability: development
  annotations:
    openinference:
      constant_key: llm.prompt_template
- key: llm.prompt_template.variables
  type: string
  examples:
  - '{ context: "<context from retrieval>", subject: "math" }'
  brief: JSON of key value pairs applied to the prompt template
  stability: development
  annotations:
    openinference:
      encoding: json
- key: llm.prompt_template.version
  type: string
  examples:
  - v1.0
  brief: The version of the prompt template
  stability: development
- key: llm.prompts
  type: template[any]
  examples:
  - '[{"prompt.text": "def fib(n):..."}]'
  brief: Prompts provided to a completions API, e.g. `llm.prompts.0.prompt.text`
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_attributes:
      - prompt.text
- key: llm.provider
  type:
    members:
    - id: openai
      value: openai
      brief: OpenAI
      stability: development
    - id: anthropic
      value: anthropic
      brief: Anthropic
      stability: development
    - id: mistralai
      value: mistralai
      brief: Mistral AI
      stability: development
    - id: cohere
      value: cohere
      brief: Cohere
      stability: development
    - id: google
      value: google
      brief: Google (Vertex)
      stability: development
    - id: aws
      value: aws
      brief: AWS Bedrock
      stability: development
    - id: azure
      value: azure
      brief: Azure
      stability: development
    - id: xai
      value: xai
      brief: xAI
      stability: development
    - id: deepseek
      value: deepseek
      brief: DeepSeek
      stability: development
    - id: groq
      value: groq
      brief: Groq
      stability: development
    - id: fireworks
      value: fireworks
      brief: Fireworks AI
      stability: development
    - id: moonshot
      value: moonshot
      brief: Moonshot AI
      stability: development
    - id: cerebras
      value: cerebras
      brief: Cerebras
      stability: development
    - id: perplexity
      value: perplexity
      brief: Perplexity
      stability: development
    - id: together
      value: together
      brief: Together AI
      stability: development
    - id: ollama
      value: ollama
      brief: Ollama
      stability: development
    - id: meta
      value: meta
      brief: Meta AI
      stability: development
    - id: zai
      value: zai
      brief: Z.ai (GLM)
      stability: development
    - id: minimax
      value: minimax
      brief: MiniMax
      stability: development
    - id: oracle
      value: oracle
      brief: Oracle (OCI Generative AI)
      stability: development
    - id: ibm
      value: ibm
      brief: IBM (watsonx.ai)
      stability: development
    - id: typesafe
      value: typesafe
      brief: TypeSafe AI
      stability: development
    - id: doubleword
      value: doubleword
      brief: Doubleword
      stability: development
  examples:
  - openai
  - azure
  brief: The hosting provider of the LLM, e.g. `azure`. See [well-known values](https://github.com/Arize-ai/openinference/blob/main/spec/attributes/semantic-conventions.md#llm-provider-values).
  stability: development
- key: llm.request.model_name
  type: string
  examples:
  - claude-opus-5
  brief: The model requested by the caller, as sent in the request. May differ from `llm.response.model_name` when the provider routes the request to a different model.
  stability: development
- key: llm.response.model_name
  type: string
  examples:
  - claude-opus-4-8
  brief: The model that actually generated the response, as reported by the provider. May differ from `llm.request.model_name` when the provider routes the request to a different model.
  stability: development
- key: llm.system
  type:
    members:
    - id: openai
      value: openai
      brief: OpenAI
      stability: development
    - id: anthropic
      value: anthropic
      brief: Anthropic
      stability: development
    - id: mistralai
      value: mistralai
      brief: Mistral AI
      stability: development
    - id: cohere
      value: cohere
      brief: Cohere
      stability: development
    - id: vertexai
      value: vertexai
      brief: Vertex AI
      stability: development
    - id: deepseek
      value: deepseek
      brief: DeepSeek
      stability: development
    - id: amazon
      value: amazon
      brief: Amazon Bedrock native
      stability: development
    - id: meta
      value: meta
      brief: Meta (Llama)
      stability: development
    - id: ai21
      value: ai21
      brief: AI21 Labs
      stability: development
    - id: typesafe
      value: typesafe
      brief: TypeSafe AI
      stability: development
    - id: xai
      value: xai
      brief: xAI (Grok)
      stability: development
  examples:
  - anthropic
  - openai
  brief: The AI product as identified by the client or server instrumentation. See [well-known values](https://github.com/Arize-ai/openinference/blob/main/spec/attributes/semantic-conventions.md#llm-system-values).
  stability: development
- key: llm.token_count.completion
  type: int
  examples:
  - 15
  brief: The number of tokens in the completion
  stability: development
- key: llm.token_count.completion_details.audio
  type: int
  examples:
  - 10
  brief: The number of audio tokens generated by the model
  stability: development
- key: llm.token_count.completion_details.reasoning
  type: int
  examples:
  - 10
  brief: The number of tokens used for model reasoning
  stability: development
- key: llm.token_count.prompt
  type: int
  examples:
  - 10
  brief: Number of tokens in the input.
  stability: development
- key: llm.token_count.prompt
  type: int
  examples:
  - 10
  brief: The number of tokens in the prompt
  stability: development
- key: llm.token_count.prompt_details.audio
  type: int
  examples:
  - 10
  brief: The number of audio input tokens presented in the prompt
  stability: development
- key: llm.token_count.prompt_details.cache_input
  type: int
  examples:
  - 5
  brief: The number of input tokens in the prompt that were cached
  stability: development
- key: llm.token_count.prompt_details.cache_read
  type: int
  examples:
  - 5
  brief: The number of prompt tokens successfully retrieved from cache (cache hits). Maps to `cached_tokens` in OpenAI responses
  stability: development
- key: llm.token_count.prompt_details.cache_write
  type: int
  examples:
  - 0
  brief: The number of prompt tokens not found in cache that were written to cache (cache misses). Maps to `cache_write_tokens` in OpenAI responses
  stability: development
- key: llm.token_count.total
  type: int
  examples:
  - 20
  brief: Total number of tokens used.
  stability: development
- key: llm.token_count.total
  type: int
  examples:
  - 20
  brief: Total number of tokens, including prompt and completion
  stability: development
- key: llm.tools
  type: template[any]
  examples:
  - '[{"tool.name": "get_weather", "tool.json_schema": "{\"type\": \"function\", \"function\": {\"name\": \"get_weather\"}}"}]'
  brief: List of tools that are advertised to the LLM to be able to call, e.g. `llm.tools.0.tool.name`, `llm.tools.0.tool.description`, `llm.tools.0.tool.json_schema`. See [Tool Calling](https://github.com/Arize-ai/openinference/blob/main/spec/content/tool-calling.md)
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_attributes:
      - tool.name
      - tool.description
      - tool.json_schema
- key: message.content
  type: string
  examples:
  - What's the weather today?
  brief: The content of a message in a chat
  stability: development
- key: message.contents
  type: template[any]
  examples:
  - '[{"message_content.type": "text", "message_content.text": "Hello"}]'
  brief: The message contents to the LLM, an array of `message_content` objects. Use this form when a message has multiple content items or when item ordering matters.
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - message_content
- key: message.function_call_arguments_json
  type: string
  examples:
  - '{ ''x'': 2 }'
  brief: The arguments to the function call in JSON
  stability: development
  deprecated:
    reason: uncategorized
    note: Use `message.tool_calls` instead.
  annotations:
    openinference:
      encoding: json
- key: message.function_call_name
  type: string
  examples:
  - multiply
  brief: Function call function name
  stability: development
  deprecated:
    reason: uncategorized
    note: Use `message.tool_calls` instead.
- key: message.name
  type: string
  examples:
  - multiply
  brief: The name of the function or tool that produced a tool/function role message. Used when `message.role` is `"tool"` or `"function"` to identify the origin.
  stability: development
- key: message.role
  type: string
  examples:
  - user
  - system
  brief: Role of the entity in a message (e.g., user, system)
  stability: development
- key: message.tool_call_id
  type: string
  examples:
  - call_62136355
  brief: Tool call result identifier corresponding to `tool_call.id`
  stability: development
- key: message.tool_calls
  type: template[any]
  examples:
  - '[{"tool_call.function.name": "get_current_weather"}]'
  brief: List of tool calls (e.g. function calls) generated by the LLM, e.g. `llm.output_messages.0.message.tool_calls.0.tool_call.id`
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - tool_call
- key: message_content.audio
  type: template[any]
  examples:
  - '{"audio.url": "https://example.com/audio.mp3"}'
  brief: The audio content of the message, if the type is `"audio"`. Nested leaves are `audio.url` and `audio.transcript`.
  stability: development
  annotations:
    openinference:
      encoding: flattened_object
      item_namespaces:
      - audio
- key: message_content.data
  type: string
  examples:
  - EmwKAhgBEgy3...
  brief: Opaque vendor-issued data captured verbatim. Maps to Anthropic `redacted_thinking.data`.
  stability: development
- key: message_content.document
  type: template[any]
  examples:
  - '{"document.url": "data:application/pdf;base64,JVBERi0...", "document.mime_type": "application/pdf"}'
  brief: The document content of the message (e.g. a PDF, an uploaded file, or inline text), if the type is `"document"`. Nested leaves are `document.url`, `document.content`, `document.mime_type`, `document.id`, and `document.name`.
  stability: development
  annotations:
    openinference:
      encoding: flattened_object
      item_namespaces:
      - document
- key: message_content.encrypted_content
  type: string
  examples:
  - gAAAAA...==
  brief: OpenAI `encrypted_content` captured verbatim.
  stability: development
- key: message_content.id
  type: string
  examples:
  - rs_abc123
  brief: Provider-assigned identifier for this message content item. For OpenAI Responses reasoning items, this maps to `ResponseReasoningItem.id` and should be preserved for stateless replay.
  stability: development
- key: message_content.image
  type: template[any]
  examples:
  - '{"image.url": "https://sample-link-to-image.jpg"}'
  brief: The image content of the message, if the type is `"image"`.
  stability: development
  annotations:
    openinference:
      encoding: flattened_object
      item_namespaces:
      - image
- key: message_content.signature
  type: string
  examples:
  - EuYBCkQYAiJA...
  brief: Opaque vendor-issued signature captured verbatim. Maps to provider `signature` fields, and to Gemini `thoughtSignature` fields when the signature is attached to a non-tool content part such as text.
  stability: development
- key: message_content.text
  type: string
  examples:
  - This is a sample text
  brief: The text content of the message. Used when `message_content.type` is `"text"` or `"reasoning"` (visible reasoning or summary text). For OpenAI `summary_text` arrays, concatenate the array items into this single text value for now.
  stability: development
- key: message_content.type
  type:
    members:
    - id: text
      value: text
      brief: Text content.
      stability: development
    - id: image
      value: image
      brief: Image content.
      stability: development
    - id: audio
      value: audio
      brief: Audio content.
      stability: development
    - id: video
      value: video
      brief: Video content.
      stability: development
    - id: document
      value: document
      brief: Document content, e.g. a PDF, an uploaded file, or inline text.
      stability: development
    - id: reasoning
      value: reasoning
      brief: Reasoning or thinking content, including redacted reasoning.
      stability: development
    - id: tool_use
      value: tool_use
      brief: A tool call returned as an ordered content part.
      stability: development
  examples:
  - text
  - image
  - audio
  - video
  - document
  - reasoning
  - tool_use
  brief: The type of the content. Use `"reasoning"` for reasoning/thinking content, including Anthropic `redacted_thinking` blocks. Use `"tool_use"` when a provider returns a tool call as an ordered content part.
  stability: development
- key: message_content.video
  type: template[any]
  examples:
  - '{"video.url": "gs://bucket/clip.mp4"}'
  brief: The video content of the message, if the type is `"video"`. The nested leaf is `video.url`. Consumers infer MIME type from the URL path extension or a data URI prefix.
  stability: development
  annotations:
    openinference:
      encoding: flattened_object
      item_namespaces:
      - video
- key: metadata
  type: string
  examples:
  - '{''author'': ''John Doe'', ''date'': ''2023-09-09''}'
  brief: Metadata associated with a span
  stability: development
  annotations:
    openinference:
      encoding: json
- key: openinference.project.name
  type: string
  examples:
  - default
  - my-llm-app
  brief: The name of the project that the telemetry belongs to.
  note: Recorded as a resource attribute, not a span attribute. Identifies the `openinference.project` entity.
  stability: development
- key: openinference.span.kind
  type:
    members:
    - id: llm
      value: LLM
      brief: A call to a large language model.
      stability: development
    - id: chain
      value: CHAIN
      brief: A link between application steps, or the start of a request.
      stability: development
    - id: tool
      value: TOOL
      brief: Execution of a tool or function.
      stability: development
    - id: retriever
      value: RETRIEVER
      brief: A query to a vector store, search engine, or database.
      stability: development
    - id: reranker
      value: RERANKER
      brief: Reordering of candidate documents by relevance.
      stability: development
    - id: embedding
      value: EMBEDDING
      brief: Generation of vector embeddings.
      stability: development
    - id: agent
      value: AGENT
      brief: A reasoning step that acts on tools using an LLM's guidance.
      stability: development
    - id: guardrail
      value: GUARDRAIL
      brief: An input or output moderation check.
      stability: development
    - id: evaluator
      value: EVALUATOR
      brief: An evaluation of a model's output.
      stability: development
    - id: prompt
      value: PROMPT
      brief: The rendering of a prompt template.
      stability: development
    - id: decision
      value: DECISION
      brief: A call to a decision model.
      stability: development
    - id: unknown
      value: UNKNOWN
      brief: Fallback used by SDKs when the kind of an operation cannot be determined.
      stability: development
  brief: The role an operation plays in an AI application.
  note: |
    Required on every OpenInference span. It is distinct from OpenTelemetry's own `SpanKind`.
    See [Span Kinds](https://github.com/Arize-ai/openinference/blob/main/spec/general/span-kinds.md).
  stability: development
- key: output.documents
  type: template[any]
  examples:
  - '[{"document.url": "https://example.com/filled-form.pdf", "document.mime_type": "application/pdf"}]'
  brief: File document (e.g. PDF) outputs of an operation, independent of span kind, e.g. `output.documents.0.document.url`. See [Multimodal Content](https://github.com/Arize-ai/openinference/blob/main/spec/content/multimodal.md#span-kind-independent-documents)
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - document
- key: output.images
  type: template[any]
  examples:
  - '[{"image.url": "data:image/png;base64,iVBORw0KGgo..."}]'
  brief: Image outputs of an operation, independent of span kind, e.g. `output.images.0.image.url`. See [Multimodal Content](https://github.com/Arize-ai/openinference/blob/main/spec/content/multimodal.md#span-kind-independent-images)
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - image
- key: output.mime_type
  type:
    members:
    - id: text
      value: text/plain
      brief: Plain text. The default when unspecified.
      stability: development
    - id: json
      value: application/json
      brief: A string holding serialized JSON.
      stability: development
  examples:
  - text/plain
  - application/json
  brief: MIME type of `output.value`, usually `application/json`.
  stability: development
- key: output.mime_type
  type:
    members:
    - id: text
      value: text/plain
      brief: Plain text. The default when unspecified.
      stability: development
    - id: json
      value: application/json
      brief: A string holding serialized JSON.
      stability: development
  examples:
  - text/plain
  - application/json
  brief: MIME type representing the format of `output.value`
  stability: development
- key: output.value
  type: string
  examples:
  - Hello, World!
  brief: The output value of an operation
  stability: development
- key: output.value
  type: string
  examples:
  - Hello, World!
  brief: The raw output (embedding vectors as JSON or base64-encoded).
  stability: development
- key: output.value
  type: string
  examples:
  - Hello, World!
  brief: The raw output, usually a JSON string.
  stability: development
- key: output.value
  type: string
  examples:
  - Hello, World!
  brief: The raw response as a JSON string, including the selection or scores.
  stability: development
- key: prompt.id
  type: string
  examples:
  - '1234'
  brief: A vendor-specific id used to identify the prompt.
  stability: development
- key: prompt.text
  type: string
  examples:
  - def fib(n):...
  brief: The text of a prompt in a completions API request. Used under `llm.prompts`.
  stability: development
- key: prompt.url
  type: string
  examples:
  - https://smith.langchain.com/prompts/naive-prompt
  brief: A vendor-specific URL used to locate the prompt via the web
  stability: development
- key: prompt.vendor
  type: string
  examples:
  - langchain
  brief: The vendor or origin of the prompt, e.g. `langsmith`, `portkey`, `arize-phoenix`
  stability: development
- key: reranker.input_documents
  type: template[any]
  examples:
  - '[{"document.id": "1", "document.score": 0.9, "document.content": "..."}]'
  brief: List of documents as input to the reranker
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - document
- key: reranker.model_name
  type: string
  examples:
  - cross-encoder/ms-marco-MiniLM-L-12-v2
  brief: Model name of the reranker
  stability: development
- key: reranker.output_documents
  type: template[any]
  examples:
  - '[{"document.id": "1", "document.score": 0.9, "document.content": "..."}]'
  brief: List of documents outputted by the reranker
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - document
- key: reranker.query
  type: string
  examples:
  - How to format timestamp?
  brief: Query parameter of the reranker
  stability: development
- key: reranker.top_k
  type: int
  examples:
  - 3
  brief: Top K parameter of the reranker
  stability: development
- key: retrieval.documents
  type: template[any]
  examples:
  - '[{"document.id": "1", "document.score": 0.9, "document.content": "..."}]'
  brief: List of retrieved documents
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - document
- key: session.annotations
  type: template[any]
  examples:
  - '[{"annotation.name": "conversational_coherence", "annotation.label": "coherent"}]'
  brief: Session-scoped feedback using annotation terminology, flattened as `session.annotations.0.annotation.*`; requires `session.id`
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - annotation
- key: session.evaluations
  type: template[any]
  examples:
  - '[{"evaluation.name": "conversational_coherence", "evaluation.label": "coherent"}]'
  brief: Session-scoped feedback using evaluation terminology, flattened as `session.evaluations.0.evaluation.*`; requires `session.id`
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - evaluation
- key: session.id
  type: string
  examples:
  - 00112233-4455-6677-8899-aabbccddeeff
  brief: Unique identifier for a session, such as a multi-turn conversation.
  stability: development
  provenance:
    source: 0
- key: tag.tags
  type: string[]
  examples:
  - - shopping
    - travel
  brief: List of tags to give the span a category
  stability: development
- key: tool.description
  type: string
  examples:
  - An API to get weather data.
  brief: Description of the tool's purpose and functionality. On a `TOOL` span, the tool being invoked; under `llm.tools.<index>`, an advertised tool definition
  stability: development
- key: tool.id
  type: string
  examples:
  - call_62136355
  brief: The identifier for the result of the tool call (corresponding to `tool_call.id`)
  stability: development
- key: tool.json_schema
  type: string
  examples:
  - '{''type'': ''function'', ''function'': {''name'': ''get_weather''}}'
  brief: The JSON schema of a tool input
  stability: development
  annotations:
    openinference:
      encoding: json
- key: tool.name
  type: string
  examples:
  - WeatherAPI
  brief: The name of the tool. On a `TOOL` span, the tool being invoked; under `llm.tools.<index>`, the name of an advertised tool definition
  stability: development
- key: tool.parameters
  type: string
  examples:
  - '{ ''a'': ''int'' }'
  brief: The parameters definition for invoking the tool
  stability: development
  annotations:
    openinference:
      encoding: json
- key: tool_call.function.arguments
  type: string
  examples:
  - '{''city'': ''London''}'
  brief: The arguments for the function being invoked by a tool call
  stability: development
  annotations:
    openinference:
      constant_key: tool_call.function.arguments_json
      encoding: json
- key: tool_call.function.name
  type: string
  examples:
  - get_current_weather
  brief: The name of the function being invoked by a tool call
  stability: development
- key: tool_call.id
  type: string
  examples:
  - call_62136355
  brief: The id of a tool call (useful when there is more than one call at the same time)
  stability: development
- key: tool_call.reasoning_signature
  type: string
  examples:
  - CiQB...
  brief: Opaque vendor-issued reasoning echo token attached to a tool call. Used by Gemini, which puts `thoughtSignature` on `functionCall` parts rather than on the reasoning summary.
  stability: development
- key: trace.annotations
  type: template[any]
  examples:
  - '[{"annotation.name": "retrieval_quality", "annotation.score": 0.92}]'
  brief: Trace-scoped feedback using annotation terminology, flattened as `trace.annotations.0.annotation.*`
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - annotation
- key: trace.evaluations
  type: template[any]
  examples:
  - '[{"evaluation.name": "retrieval_quality", "evaluation.score": 0.92}]'
  brief: Trace-scoped feedback using evaluation terminology, flattened as `trace.evaluations.0.evaluation.*`
  stability: development
  annotations:
    openinference:
      encoding: flattened_list
      item_namespaces:
      - evaluation
- key: user.id
  type: string
  examples:
  - S-1-5-21-202424912787-2692429404-2351956786-1000
  brief: Unique identifier for a user.
  stability: development
  provenance:
    source: 0
- key: video.url
  type: string
  examples:
  - gs://bucket/clip.mp4
  brief: The URL, object-store URI, or base64 data URI of a video. Consumers infer MIME type from the path extension (`.mp4` to `video/mp4`, `.webm` to `video/webm`, `.ogv` to `video/ogg`, `.avi` to `video/x-msvideo`) or from a data URI prefix.
  stability: development
registry:
  attributes:
  - 0
  - 1
  - 2
  - 3
  - 4
  - 5
  - 6
  - 7
  - 8
  - 9
  - 10
  - 11
  - 12
  - 13
  - 14
  - 15
  - 16
  - 17
  - 18
  - 19
  - 20
  - 21
  - 22
  - 23
  - 24
  - 25
  - 26
  - 27
  - 28
  - 29
  - 30
  - 31
  - 32
  - 33
  - 34
  - 35
  - 36
  - 37
  - 38
  - 39
  - 40
  - 41
  - 42
  - 43
  - 44
  - 45
  - 47
  - 48
  - 52
  - 53
  - 54
  - 55
  - 56
  - 57
  - 58
  - 59
  - 60
  - 61
  - 62
  - 63
  - 64
  - 65
  - 66
  - 67
  - 68
  - 69
  - 70
  - 71
  - 72
  - 73
  - 74
  - 75
  - 76
  - 77
  - 78
  - 79
  - 80
  - 82
  - 83
  - 84
  - 85
  - 86
  - 88
  - 89
  - 90
  - 91
  - 92
  - 93
  - 94
  - 95
  - 96
  - 97
  - 98
  - 99
  - 100
  - 101
  - 102
  - 103
  - 104
  - 105
  - 106
  - 107
  - 108
  - 109
  - 110
  - 111
  - 112
  - 114
  - 115
  - 119
  - 120
  - 121
  - 122
  - 123
  - 124
  - 125
  - 126
  - 127
  - 128
  - 129
  - 130
  - 132
  - 133
  - 134
  - 135
  - 136
  - 137
  - 138
  - 139
  - 140
  - 141
  - 142
  - 143
  - 145
  attribute_groups: []
  spans:
  - type: openinference.agent
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the agent.
    attributes:
    - base: 0
      requirement_level: recommended
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 40
      requirement_level:
        recommended: When the agent is part of an execution graph.
    - base: 41
      requirement_level:
        recommended: When the agent is part of an execution graph.
    - base: 42
      requirement_level:
        recommended: When the agent is part of an execution graph and the node is not the root.
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A span that encompasses calls to LLMs and tools. An agent describes a reasoning block that acts on tools using the guidance of an LLM.
    note: |
      `openinference.span.kind` MUST be `AGENT`.
    stability: development
  - type: openinference.chain
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the step, e.g. the function or component name.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A starting point or a link between different LLM application steps, for example the beginning of a request to an LLM application, or the glue code that passes context from a retriever to an LLM call.
    note: |
      `openinference.span.kind` MUST be `CHAIN`.
    stability: development
  - type: openinference.decision
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the operation.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 13
      requirement_level: recommended
    - base: 14
      requirement_level:
        recommended: When the hosting provider differs from the system.
    - base: 15
      requirement_level:
        recommended: When the requested model can differ from the model that served the response.
    - base: 16
      requirement_level:
        recommended: When the requested model can differ from the model that served the response.
    - base: 17
      requirement_level: required
    - base: 18
      requirement_level: recommended
    - base: 19
      requirement_level: recommended
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 46
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 51
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 113
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 118
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A call to a decision model, which scores or selects among candidate options provided in the request rather than generating free-form text.
    note: |
      `openinference.span.kind` MUST be `DECISION`.

      Decision spans do not use the `llm.*` identification and token count
      attributes; the `decision.*` attributes take their place.

      See [Decision Spans](https://github.com/Arize-ai/openinference/blob/main/spec/spans/decision.md).
    stability: development
    annotations:
      openinference:
        spec: '[Decision Spans](https://github.com/Arize-ai/openinference/blob/main/spec/spans/decision.md)'
  - type: openinference.embedding
    kind: internal
    name:
      note: |
        **Span name** MUST be `CreateEmbeddings`.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 27
      requirement_level: recommended
    - base: 28
      requirement_level: recommended
    - base: 29
      requirement_level: recommended
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 46
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 49
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 81
      requirement_level: recommended
    - base: 87
      requirement_level: recommended
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 113
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 116
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A call to an LLM or embedding service that converts text or token IDs into dense float vectors.
    note: |
      `openinference.span.kind` MUST be `EMBEDDING`.

      Embedding spans do not use `llm.system` or `llm.provider`.

      See [Embedding Spans](https://github.com/Arize-ai/openinference/blob/main/spec/spans/embedding.md).
    stability: development
    annotations:
      openinference:
        spec: '[Embedding Spans](https://github.com/Arize-ai/openinference/blob/main/spec/spans/embedding.md)'
  - type: openinference.evaluator
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the evaluator.
    attributes:
    - base: 8
      requirement_level:
        recommended: When the span carries feedback using annotation terminology.
    - base: 39
      requirement_level:
        recommended: When the span carries feedback using evaluation terminology.
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A call to a function or process that evaluates a language model's outputs, for example assessing the relevance, correctness, or helpfulness of its answers.
    note: |
      `openinference.span.kind` MUST be `EVALUATOR`.

      An evaluator span is the recommended carrier for post-hoc feedback. See
      [Annotations and Evaluations](https://github.com/Arize-ai/openinference/blob/main/spec/feedback/annotations.md).
    stability: development
    annotations:
      openinference:
        spec: '[Annotations and Evaluations](https://github.com/Arize-ai/openinference/blob/main/spec/feedback/annotations.md)'
  - type: openinference.guardrail
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the guardrail.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A call to a component that protects against jailbreak prompts or undesirable output, by modifying or rejecting an LLM's input or response.
    note: |
      `openinference.span.kind` MUST be `GUARDRAIL`.
    stability: development
  - type: openinference.llm
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the operation, e.g. `ChatCompletion`.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 46
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 50
      requirement_level: recommended
    - base: 52
      requirement_level:
        recommended: For completions (non-chat) API calls.
    - base: 53
      requirement_level: opt_in
    - base: 54
      requirement_level: opt_in
    - base: 55
      requirement_level: opt_in
    - base: 56
      requirement_level: opt_in
    - base: 57
      requirement_level: opt_in
    - base: 58
      requirement_level: opt_in
    - base: 59
      requirement_level: opt_in
    - base: 60
      requirement_level: opt_in
    - base: 61
      requirement_level: opt_in
    - base: 62
      requirement_level: opt_in
    - base: 63
      requirement_level: opt_in
    - base: 64
      requirement_level: recommended
    - base: 66
      requirement_level:
        recommended: For chat API calls.
    - base: 67
      requirement_level: recommended
    - base: 68
      requirement_level: recommended
    - base: 69
      requirement_level:
        recommended: For chat API calls.
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 73
      requirement_level:
        recommended: For completions (non-chat) API calls.
    - base: 74
      requirement_level:
        recommended: When the hosting provider differs from the system.
    - base: 75
      requirement_level:
        recommended: When the requested model can differ from the model that served the response.
    - base: 76
      requirement_level:
        recommended: When the requested model can differ from the model that served the response.
    - base: 77
      requirement_level: required
    - base: 78
      requirement_level: recommended
    - base: 79
      requirement_level:
        recommended: When reported by the provider.
    - base: 80
      requirement_level:
        recommended: When reported by the provider.
    - base: 82
      requirement_level: recommended
    - base: 83
      requirement_level:
        recommended: When reported by the provider.
    - base: 84
      requirement_level:
        recommended: When reported by the provider.
    - base: 85
      requirement_level:
        recommended: When reported by the provider.
    - base: 86
      requirement_level:
        recommended: When reported by the provider.
    - base: 88
      requirement_level: recommended
    - base: 89
      requirement_level:
        recommended: When tools are advertised to the model.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 113
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 117
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A call to a large language model, such as a chat completion or a text completion request. It captures the request sent to the provider and the response that came back.
    note: |
      `openinference.span.kind` MUST be `LLM`.

      A completions (non-chat) API call records `llm.prompts` and `llm.choices`
      in place of `llm.input_messages` and `llm.output_messages`.

      See [LLM Spans](https://github.com/Arize-ai/openinference/blob/main/spec/spans/llm.md).
    stability: development
    annotations:
      openinference:
        spec: '[LLM Spans](https://github.com/Arize-ai/openinference/blob/main/spec/spans/llm.md)'
  - type: openinference.prompt
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the prompt.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level: recommended
    - base: 71
      requirement_level: recommended
    - base: 72
      requirement_level: recommended
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 119
      requirement_level:
        recommended: When the prompt comes from a prompt management system.
    - base: 121
      requirement_level:
        recommended: When the prompt comes from a prompt management system.
    - base: 122
      requirement_level:
        recommended: When the prompt comes from a prompt management system.
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      The rendering of a prompt template, for example substituting variables into a template to produce the final prompt sent to an LLM.
    note: |
      `openinference.span.kind` MUST be `PROMPT`.
    stability: development
  - type: openinference.reranker
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the reranker.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 123
      requirement_level: recommended
    - base: 124
      requirement_level: recommended
    - base: 125
      requirement_level: recommended
    - base: 126
      requirement_level: recommended
    - base: 127
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      The reranking of a set of input documents, for example by a cross-encoder that scores the documents against a query and returns the top K.
    note: |
      `openinference.span.kind` MUST be `RERANKER`.
    stability: development
  - type: openinference.retriever
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the retriever.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 128
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A data retrieval step, for example a call to a vector store or a database to fetch documents or information.
    note: |
      `openinference.span.kind` MUST be `RETRIEVER`. `input.value` usually holds the query.
    stability: development
  - type: openinference.tool
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD be the name of the tool.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 133
      requirement_level: recommended
    - base: 134
      requirement_level:
        recommended: When the tool is executed in response to a tool call that has an id.
    - base: 136
      requirement_level: recommended
    - base: 137
      requirement_level: recommended
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A call to an external tool such as a calculator or a weather API, or any function execution invoked by an LLM or agent.
    note: |
      `openinference.span.kind` MUST be `TOOL`.

      See [Tool Calling](https://github.com/Arize-ai/openinference/blob/main/spec/content/tool-calling.md)
      for how the LLM side of a tool call is recorded.
    stability: development
    annotations:
      openinference:
        spec: '[Tool Calling](https://github.com/Arize-ai/openinference/blob/main/spec/content/tool-calling.md)'
  metrics: []
  events: []
  entities:
  - type: openinference.project
    identity:
    - 109
    requirement_level: recommended
    brief: |
      The project that telemetry is grouped under in an OpenInference-compatible backend.
    stability: development
refinements:
  spans:
  - id: openinference.agent
    type: openinference.agent
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the agent.
    attributes:
    - base: 0
      requirement_level: recommended
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 40
      requirement_level:
        recommended: When the agent is part of an execution graph.
    - base: 41
      requirement_level:
        recommended: When the agent is part of an execution graph.
    - base: 42
      requirement_level:
        recommended: When the agent is part of an execution graph and the node is not the root.
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A span that encompasses calls to LLMs and tools. An agent describes a reasoning block that acts on tools using the guidance of an LLM.
    note: |
      `openinference.span.kind` MUST be `AGENT`.
    stability: development
  - id: openinference.chain
    type: openinference.chain
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the step, e.g. the function or component name.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A starting point or a link between different LLM application steps, for example the beginning of a request to an LLM application, or the glue code that passes context from a retriever to an LLM call.
    note: |
      `openinference.span.kind` MUST be `CHAIN`.
    stability: development
  - id: openinference.decision
    type: openinference.decision
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the operation.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 13
      requirement_level: recommended
    - base: 14
      requirement_level:
        recommended: When the hosting provider differs from the system.
    - base: 15
      requirement_level:
        recommended: When the requested model can differ from the model that served the response.
    - base: 16
      requirement_level:
        recommended: When the requested model can differ from the model that served the response.
    - base: 17
      requirement_level: required
    - base: 18
      requirement_level: recommended
    - base: 19
      requirement_level: recommended
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 46
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 51
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 113
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 118
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A call to a decision model, which scores or selects among candidate options provided in the request rather than generating free-form text.
    note: |
      `openinference.span.kind` MUST be `DECISION`.

      Decision spans do not use the `llm.*` identification and token count
      attributes; the `decision.*` attributes take their place.

      See [Decision Spans](https://github.com/Arize-ai/openinference/blob/main/spec/spans/decision.md).
    stability: development
    annotations:
      openinference:
        spec: '[Decision Spans](https://github.com/Arize-ai/openinference/blob/main/spec/spans/decision.md)'
  - id: openinference.embedding
    type: openinference.embedding
    kind: internal
    name:
      note: |
        **Span name** MUST be `CreateEmbeddings`.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 27
      requirement_level: recommended
    - base: 28
      requirement_level: recommended
    - base: 29
      requirement_level: recommended
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 46
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 49
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 81
      requirement_level: recommended
    - base: 87
      requirement_level: recommended
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 113
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 116
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A call to an LLM or embedding service that converts text or token IDs into dense float vectors.
    note: |
      `openinference.span.kind` MUST be `EMBEDDING`.

      Embedding spans do not use `llm.system` or `llm.provider`.

      See [Embedding Spans](https://github.com/Arize-ai/openinference/blob/main/spec/spans/embedding.md).
    stability: development
    annotations:
      openinference:
        spec: '[Embedding Spans](https://github.com/Arize-ai/openinference/blob/main/spec/spans/embedding.md)'
  - id: openinference.evaluator
    type: openinference.evaluator
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the evaluator.
    attributes:
    - base: 8
      requirement_level:
        recommended: When the span carries feedback using annotation terminology.
    - base: 39
      requirement_level:
        recommended: When the span carries feedback using evaluation terminology.
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A call to a function or process that evaluates a language model's outputs, for example assessing the relevance, correctness, or helpfulness of its answers.
    note: |
      `openinference.span.kind` MUST be `EVALUATOR`.

      An evaluator span is the recommended carrier for post-hoc feedback. See
      [Annotations and Evaluations](https://github.com/Arize-ai/openinference/blob/main/spec/feedback/annotations.md).
    stability: development
    annotations:
      openinference:
        spec: '[Annotations and Evaluations](https://github.com/Arize-ai/openinference/blob/main/spec/feedback/annotations.md)'
  - id: openinference.guardrail
    type: openinference.guardrail
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the guardrail.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A call to a component that protects against jailbreak prompts or undesirable output, by modifying or rejecting an LLM's input or response.
    note: |
      `openinference.span.kind` MUST be `GUARDRAIL`.
    stability: development
  - id: openinference.llm
    type: openinference.llm
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the operation, e.g. `ChatCompletion`.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 46
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 50
      requirement_level: recommended
    - base: 52
      requirement_level:
        recommended: For completions (non-chat) API calls.
    - base: 53
      requirement_level: opt_in
    - base: 54
      requirement_level: opt_in
    - base: 55
      requirement_level: opt_in
    - base: 56
      requirement_level: opt_in
    - base: 57
      requirement_level: opt_in
    - base: 58
      requirement_level: opt_in
    - base: 59
      requirement_level: opt_in
    - base: 60
      requirement_level: opt_in
    - base: 61
      requirement_level: opt_in
    - base: 62
      requirement_level: opt_in
    - base: 63
      requirement_level: opt_in
    - base: 64
      requirement_level: recommended
    - base: 66
      requirement_level:
        recommended: For chat API calls.
    - base: 67
      requirement_level: recommended
    - base: 68
      requirement_level: recommended
    - base: 69
      requirement_level:
        recommended: For chat API calls.
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 73
      requirement_level:
        recommended: For completions (non-chat) API calls.
    - base: 74
      requirement_level:
        recommended: When the hosting provider differs from the system.
    - base: 75
      requirement_level:
        recommended: When the requested model can differ from the model that served the response.
    - base: 76
      requirement_level:
        recommended: When the requested model can differ from the model that served the response.
    - base: 77
      requirement_level: required
    - base: 78
      requirement_level: recommended
    - base: 79
      requirement_level:
        recommended: When reported by the provider.
    - base: 80
      requirement_level:
        recommended: When reported by the provider.
    - base: 82
      requirement_level: recommended
    - base: 83
      requirement_level:
        recommended: When reported by the provider.
    - base: 84
      requirement_level:
        recommended: When reported by the provider.
    - base: 85
      requirement_level:
        recommended: When reported by the provider.
    - base: 86
      requirement_level:
        recommended: When reported by the provider.
    - base: 88
      requirement_level: recommended
    - base: 89
      requirement_level:
        recommended: When tools are advertised to the model.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 113
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 117
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A call to a large language model, such as a chat completion or a text completion request. It captures the request sent to the provider and the response that came back.
    note: |
      `openinference.span.kind` MUST be `LLM`.

      A completions (non-chat) API call records `llm.prompts` and `llm.choices`
      in place of `llm.input_messages` and `llm.output_messages`.

      See [LLM Spans](https://github.com/Arize-ai/openinference/blob/main/spec/spans/llm.md).
    stability: development
    annotations:
      openinference:
        spec: '[LLM Spans](https://github.com/Arize-ai/openinference/blob/main/spec/spans/llm.md)'
  - id: openinference.prompt
    type: openinference.prompt
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the prompt.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level: recommended
    - base: 71
      requirement_level: recommended
    - base: 72
      requirement_level: recommended
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 119
      requirement_level:
        recommended: When the prompt comes from a prompt management system.
    - base: 121
      requirement_level:
        recommended: When the prompt comes from a prompt management system.
    - base: 122
      requirement_level:
        recommended: When the prompt comes from a prompt management system.
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      The rendering of a prompt template, for example substituting variables into a template to produce the final prompt sent to an LLM.
    note: |
      `openinference.span.kind` MUST be `PROMPT`.
    stability: development
  - id: openinference.reranker
    type: openinference.reranker
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the reranker.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 123
      requirement_level: recommended
    - base: 124
      requirement_level: recommended
    - base: 125
      requirement_level: recommended
    - base: 126
      requirement_level: recommended
    - base: 127
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      The reranking of a set of input documents, for example by a cross-encoder that scores the documents against a query and returns the top K.
    note: |
      `openinference.span.kind` MUST be `RERANKER`.
    stability: development
  - id: openinference.retriever
    type: openinference.retriever
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD identify the retriever.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 128
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A data retrieval step, for example a call to a vector store or a database to fetch documents or information.
    note: |
      `openinference.span.kind` MUST be `RETRIEVER`. `input.value` usually holds the query.
    stability: development
  - id: openinference.tool
    type: openinference.tool
    kind: internal
    name:
      note: |
        **Span name** is not constrained. It SHOULD be the name of the tool.
    attributes:
    - base: 8
      requirement_level: opt_in
    - base: 39
      requirement_level: opt_in
    - base: 44
      requirement_level:
        recommended: When the operation takes file documents as input outside of a message.
    - base: 45
      requirement_level:
        recommended: When the operation takes images as input outside of a message.
    - base: 47
      requirement_level:
        recommended: When `input.value` is set and is not plain text.
    - base: 48
      requirement_level: recommended
    - base: 70
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 71
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 72
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 108
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 110
      requirement_level: required
    - base: 111
      requirement_level:
        recommended: When the operation produces file documents outside of a message.
    - base: 112
      requirement_level:
        recommended: When the operation produces images outside of a message.
    - base: 114
      requirement_level:
        recommended: When `output.value` is set and is not plain text.
    - base: 115
      requirement_level: recommended
    - base: 129
      requirement_level: opt_in
    - base: 130
      requirement_level: opt_in
    - base: 131
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 132
      requirement_level:
        recommended: When present in the instrumentation context.
    - base: 133
      requirement_level: recommended
    - base: 134
      requirement_level:
        recommended: When the tool is executed in response to a tool call that has an id.
    - base: 136
      requirement_level: recommended
    - base: 137
      requirement_level: recommended
    - base: 142
      requirement_level: opt_in
    - base: 143
      requirement_level: opt_in
    - base: 144
      requirement_level:
        recommended: When present in the instrumentation context.
    requirement_level: recommended
    brief: |
      A call to an external tool such as a calculator or a weather API, or any function execution invoked by an LLM or agent.
    note: |
      `openinference.span.kind` MUST be `TOOL`.

      See [Tool Calling](https://github.com/Arize-ai/openinference/blob/main/spec/content/tool-calling.md)
      for how the LLM side of a tool call is recorded.
    stability: development
    annotations:
      openinference:
        spec: '[Tool Calling](https://github.com/Arize-ai/openinference/blob/main/spec/content/tool-calling.md)'
  metrics: []
  events: []
  entities:
  - id: openinference.project
    type: openinference.project
    identity:
    - 109
    requirement_level: recommended
    brief: |
      The project that telemetry is grouped under in an OpenInference-compatible backend.
    stability: development
dependencies:
- https://opentelemetry.io/schemas/1.45.0
