[bot] RubyLLM.rerank not instrumented
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 62/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- ruby
- Lĩnh vực
- observability
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
<!-- 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
- Ngôn ngữ chính
- Ruby
- Star
- 9
- Fork
- 11
- Merge trung bình
- 3 ngày 43 phút
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của braintrustdata/braintrust-sdk-ruby
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
braintrustdata/braintrust-sdk-ruby#155 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BOT ISSUE] OpenAI Chat Completions missing reasoning model and web search metadata parametersĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
braintrustdata/braintrust-sdk-ruby#143 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
braintrustdata/braintrust-sdk-ruby#137 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ruby
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
braintrustdata/braintrust-sdk-ruby#228 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ruby
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
braintrustdata/braintrust-sdk-ruby#227 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của braintrustdata/braintrust-sdk-ruby
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
temporalio/sdk-ruby#625 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 94/100
zerocracy/judges-action#2803 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
empty tone.rbĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
-
enhancement good first issue
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 92/100
r-uby-dev/llm#296 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày