Repository navigation
Change gen_ai.request.top_k type to int and split out gen_ai.retrieval.top_k - #217
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR clarifies the meaning of gen_ai.request.top_k as a top-K sampling/decoding parameter and distinguishes it from OpenAI’s top_logprobs response-shaping option.
Changes:
- Updates the source GenAI registry entry for
gen_ai.request.top_kwith clearer wording, a note, and a more realistic example. - Regenerates affected GenAI documentation and schema snapshot references.
- Adds a changelog clarification entry.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
model/gen-ai/registry.yaml |
Updates the source attribute definition for gen_ai.request.top_k. |
schema-snapshot/registry.yaml |
Refreshes generated schema snapshot entries for the updated attribute. |
docs/registry/attributes/gen-ai.md |
Regenerates the GenAI attribute registry documentation. |
docs/gen-ai/gen-ai-spans.md |
Regenerates span documentation that references top_k. |
docs/gen-ai/gen-ai-events.md |
Regenerates event documentation that references top_k. |
docs/gen-ai/openai.md |
Regenerates OpenAI-specific documentation references. |
docs/gen-ai/azure-ai-inference.md |
Regenerates Azure AI Inference documentation references. |
docs/gen-ai/aws-bedrock.md |
Regenerates AWS Bedrock documentation references. |
docs/gen-ai/anthropic.md |
Regenerates Anthropic documentation references. |
CHANGELOG.md |
Adds an Unreleased clarification entry. |
gen_ai.request.top_k type to int and split out gen_ai.retrieval.top_k
trask
marked this pull request as ready for review
May 29, 2026 17:26
lmolkova
approved these changes
May 31, 2026
MikeGoldsmith
approved these changes
Jun 4, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Jun 4, 2026
This was referenced Jun 27, 2026
3 tasks done
alexander-akhmetov
added a commit
to grafana/agento11y
that referenced
this pull request
Aug 26, 2026
Fix `gen_ai.request.top_k` type, it should be an [integer](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/docs/registry/attributes/gen-ai.md#gen-ai-request-top-k) ([changed](open-telemetry/semantic-conventions-genai#217)).
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
gen_ai.request.top_ktype fromdoubletointsince K is always a positive integer.Splits retrieval out of
gen_ai.request.top_kby introducing a newgen_ai.retrieval.top_kattribute for the maximum number of documents a retriever is asked to return. Thegen_ai.retrieval.clientspan now referencesgen_ai.retrieval.top_kinstead of overloadinggen_ai.request.top_k.Also clarifies that
gen_ai.request.top_kis the top-K decoding parameter (e.g., Anthropictop_k, Coherek, GoogletopK) and not OpenAI'stop_logprobsoutput-shaping parameter.Fixes #10.
Related to #18.