[bot] RubyLLM.rerank not instrumented
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- Ein halber Tag
- Anfängerfreundlichkeit
- 62/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- ruby
- Bereich
- observability
Rechercherichtung
Start with patchers in lib/braintrust/contrib/ruby_llm/integration.rb (around line 49), which currently returns only ChatPatcher, and read patcher.rb and instrumentation/chat.rb to see how that patcher is structured. Add a rerank patcher and instrumentation alongside them that wraps RubyLLM::Rerank.rerank and records the query, document count, provider, model, top_n and returned scores. Done when a rerank call produces a span with those attributes.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
<!-- provider-gap-audit: ruby-llm-rerank-not-instrumented -->
Summary
ruby_llm ships a standalone reranking API, RubyLLM.rerank / RubyLLM::Rerank.rerank, available across multiple provider backends (Cohere, Bedrock, Vertex AI, Azure, OpenRouter, GPUStack). Like embeddings, it is a distinct, non-streaming model-inference call (query + candidate documents in, relevance-ordered results + scores out) outside Chat, and it is completely uninstrumented.
This is the same category of gap already tracked for RubyLLM.embed/.paint/.transcribe in #136, which did not cover reranking.
What is missing
The ruby_llm integration registers exactly one patcher (ChatPatcher; see lib/braintrust/contrib/ruby_llm/integration.rb:49), and lib/braintrust/contrib/ruby_llm/instrumentation/ contains only chat.rb and common.rb. There is no patcher for RubyLLM::Rerank.rerank.
RubyLLM.rerank(query, documents, model:, provider: nil, top_n: nil, ...) requires an explicit model: (no default, since rerank catalogs differ per provider) and returns a RubyLLM::Rerank::Result set with index, document, score per entry, plus model and raw provider response. Expected instrumentation: a span per rerank call capturing the query, document count, resolved provider/model, top_n, and the returned ordering/scores — mirroring the model/provider/usage capture already done for ChatPatcher.
Braintrust docs status
not_found — https://www.braintrust.dev/docs/integrations/sdk-integrations/ruby-llm documents chat completion spans, tool execution spans, token usage, streaming, and multimodal content for the ruby_llm integration. No mention of reranking anywhere on the page, and no embedding-specific surface is mentioned either (consistent with #136 covering that gap separately).
Upstream sources
- Official guide: https://rubyllm.com/rerank/
- API reference: https://rubyllm.com/api/RubyLLM/Rerank.html
- Release notes: https://github.com/crmne/ruby_llm/releases — v2.0.0 (2026-09-18) describes provider rerank support (e.g. Cohere: "Standalone operations cover text and image embeddings, reranking, transcription"); v2.0.0.rc3 (2026-09-14) already fixes rerank edge cases ("Reject invalid reranking document indices..."), confirming the feature is a stable, released surface by the SDK's current
ruby_llm >= 2.0"latest" appraisal target
Local repo files inspected
lib/braintrust/contrib/ruby_llm/integration.rb(line 49) —patchersreturns only[ChatPatcher]lib/braintrust/contrib/ruby_llm/patcher.rb— only definesChatPatcherlib/braintrust/contrib/ruby_llm/instrumentation/— contains onlychat.rb,common.rb; norerank.rb- Grep for
rerank/Rerankacrosslib/— zero matches Appraisals—ruby_llm"latest" constraint is>= 2.0, i.e. the version range this SDK already tests against includes rerank support
- Vorherrschende Sprache
- Ruby
- Sterne
- 9
- Forks
- 10
- Ø Merge
- 3 T. 43 Min.
- Gemergte PRs (30 T.)
- 9
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus braintrustdata/braintrust-sdk-ruby
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
braintrustdata/braintrust-sdk-ruby#155 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BOT ISSUE] OpenAI Chat Completions missing reasoning model and web search metadata parametersOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
braintrustdata/braintrust-sdk-ruby#143 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
braintrustdata/braintrust-sdk-ruby#137 ·
Maintainer antworten meist innerhalb von 1 Tag
-
ruby
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
braintrustdata/braintrust-sdk-ruby#228 ·
Maintainer antworten meist innerhalb von 1 Tag
-
ruby
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 50/100
braintrustdata/braintrust-sdk-ruby#227 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in braintrustdata/braintrust-sdk-ruby
Ähnliche Issues
-
enhancement help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
ecosyste-ms/repos#1215 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
WikiEducationFoundation/WikiEduDashboard#7157 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
r-uby-dev/llm#292 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 4 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
aws/homebrew-aws#68 ·