[bot] RubyLLM.rerank not instrumented
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 62/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- ruby
- Área
- observability
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
<!-- 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
- Lenguaje dominante
- Ruby
- Estrellas
- 9
- Forks
- 11
- Merge medio
- 3 d 43 min
- PR fusionados (30 d)
- 9
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de braintrustdata/braintrust-sdk-ruby
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
braintrustdata/braintrust-sdk-ruby#155 ·
Los mantenedores suelen responder en 1 día
-
[BOT ISSUE] OpenAI Chat Completions missing reasoning model and web search metadata parametersAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
braintrustdata/braintrust-sdk-ruby#143 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
braintrustdata/braintrust-sdk-ruby#137 ·
Los mantenedores suelen responder en 1 día
-
ruby
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
braintrustdata/braintrust-sdk-ruby#228 ·
Los mantenedores suelen responder en 1 día
-
ruby
Dificultad 3/5 1-2 días Aptitud para principiantes 50/100
braintrustdata/braintrust-sdk-ruby#227 ·
Los mantenedores suelen responder en 1 día
Todos los issues de braintrustdata/braintrust-sdk-ruby
Issues similares
-
Windows: packaged_agent_ruby? never matches 'Puppet Labs\Puppet', so the openvox gem is not foundAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
Falha nos links do postAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
puppetlabs/puppetlabs-postgresql#1721 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
temporalio/sdk-ruby#625 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 94/100
zerocracy/judges-action#2803 ·
Los mantenedores suelen responder en 5 días