Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[bot] RubyLLM.rerank not instrumented

Đang mở
#229 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ả

ruby

<!-- 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

Local repo files inspected

  • lib/braintrust/contrib/ruby_llm/integration.rb (line 49) — patchers returns only [ChatPatcher]
  • lib/braintrust/contrib/ruby_llm/patcher.rb — only defines ChatPatcher
  • lib/braintrust/contrib/ruby_llm/instrumentation/ — contains only chat.rb, common.rb; no rerank.rb
  • Grep for rerank/Rerank across lib/ — 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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của braintrustdata/braintrust-sdk-ruby

Tất cả issue của braintrustdata/braintrust-sdk-ruby

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.