Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[bot] dspy gem (dspy.rb) not instrumented

已关闭
#180 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
ruby

调研方向

先从 lib/braintrust/contrib.rb 中现有的集成注册和 lib/braintrust/contrib/ 下的文件开始,然后检查 dspy.rb 的 Predict、ChainOfThought、ReAct 和 LM API。查看 Appraisals 的设置,了解集成场景是如何执行的;完成标准是:dspy 模块执行和 ReAct 工具调用都能使用所列的输入、输出、模型详细信息和推理数据进行跟踪。

由索引模型根据 Issue 内容生成。

描述

Summary

The dspy gem (dspy.rb, ~70K downloads, v1.0.0, April 2026) is the Ruby port of the DSPy LLM programming framework and is not instrumented by this SDK. Braintrust documents DSPy integration for Python, capturing module-level spans for Predict, ChainOfThought, and other DSPy modules — but there is no equivalent Ruby instrumentation for dspy.rb.

What is missing

No instrumentation exists for any dspy execution surface. Key APIs that should be instrumented:

Module Execution
  • DSPy::Predict#call(**inputs) — single-pass LLM call with typed input/output contract. The core building block of all DSPy programs.
  • DSPy::ChainOfThought#call(**inputs) — LLM call that surfaces intermediate chain-of-thought reasoning steps before the final answer. Produces a richer trace than Predict due to the reasoning span.
  • DSPy::ReAct#call(**inputs) — agentic reasoning loop that interleaves LLM calls with tool executions. May span multiple LLM turns and tool invocations.
Tool Execution (ReAct)
  • Tool calls dispatched within DSPy::ReAct loops should be captured as child spans, including tool name, inputs, and output.
LM Configuration
  • DSPy::LM.new('openai/gpt-4o-mini', ...) — LM adapter configuration, useful for capturing which model and provider is driving each module.
Expected instrumentation

Module execution spans should capture:

  • Module type (Predict, ChainOfThought, ReAct)
  • Signature type name (typed input/output schema)
  • Input fields and values
  • LLM calls made (model, provider, tokens)
  • Intermediate reasoning steps (for ChainOfThought)
  • Tool calls and results (for ReAct)
  • Typed output fields

Braintrust docs status

unclear — Braintrust documents DSPy integration at https://www.braintrust.dev/docs/integrations/sdk-integrations/dspy and captures Predict, ChainOfThought, and other DSPy module spans with full tracing. However, the documented integration requires dspy>=2.6.0 (Python) and covers only Python. No Ruby-specific dspy.rb instrumentation is documented.

Upstream sources

Local repo files inspected

  • lib/braintrust/contrib.rb (lines 195–205) — registers only 4 integrations: OpenAI, RubyOpenAI, RubyLLM, Anthropic. No dspy integration.
  • lib/braintrust/contrib/ — no directory or files for dspy
  • Appraisals — no appraisal scenarios for dspy
  • braintrust.gemspec — no mention of dspy
  • Grep for dspy, DSPy, Predict, ChainOfThought, ReAct across entire codebase returns zero matches
主要语言
Ruby
星标
9
派生
11
平均合并
2 天 3 小时
30 天内合并 PR
5

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

braintrustdata/braintrust-sdk-ruby 的其他 Issue

查看 braintrustdata/braintrust-sdk-ruby 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。