dspy-deep_research 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58c30ff4c120a958e50e1947391f08146d23d292bc6ca1b9c3ef676a6dd96a1d
4
- data.tar.gz: da5679efc54b55b7e2e535c41697055cd98d401ddb8f01fec49765201ee4c991
3
+ metadata.gz: a1fa0999d1f5e1af351f95262b49e959ad64313df55ce446c3946f2b658744f1
4
+ data.tar.gz: 5c1a309953cedbcda771c9a721b808a77d15049fe4e6f75417c845540d74abc6
5
5
  SHA512:
6
- metadata.gz: 7567fe0b6ca805964f9811cf6b335b3cd86b37dd582f1fcd9d3ebfdc2956c51b92444781d921424609e7048c44451eaecaa9dc1521032e787774ccdfa2c35297
7
- data.tar.gz: 4290423909627d6ac1709b6b0672945d8c127cc99ab93cd87b5f971a44f487b43733c04bf77f73255e14729755be02e338efc8cf96a6498672110f0530cdbe4f
6
+ metadata.gz: 6de8503cf3fdd1f64272ab4a1b7613fbf97ad0b60c0f0180ce309be756e49284236c7b43424847e67140c3e209353dd003138f1d083738264a46abb38403d68d
7
+ data.tar.gz: 52b7b01ec814be357750479b1b72ba2b9661a854cb001e188e2fa523012104d30e0fe7cc6d799d421fab62e88a4baaa0bc32fea9900a2d0fab827827820b7f30
data/README.md CHANGED
@@ -3,127 +3,98 @@
3
3
  [![Gem Version](https://img.shields.io/gem/v/dspy)](https://rubygems.org/gems/dspy)
4
4
  [![Total Downloads](https://img.shields.io/gem/dt/dspy)](https://rubygems.org/gems/dspy)
5
5
  [![Build Status](https://img.shields.io/github/actions/workflow/status/vicentereig/dspy.rb/ruby.yml?branch=main&label=build)](https://github.com/vicentereig/dspy.rb/actions/workflows/ruby.yml)
6
- [![Documentation](https://img.shields.io/badge/docs-vicentereig.github.io%2Fdspy.rb-blue)](https://vicentereig.github.io/dspy.rb/)
6
+ [![Documentation](https://img.shields.io/badge/docs-oss.vicente.services%2Fdspy.rb-blue)](https://oss.vicente.services/dspy.rb/)
7
+ [![Discord](https://img.shields.io/discord/1161519468141355160?label=discord&logo=discord&logoColor=white)](https://discord.gg/zWBhrMqn)
7
8
 
8
- > [!NOTE]
9
- > The core Prompt Engineering Framework is production-ready with
10
- > comprehensive documentation. I am focusing now on educational content on systematic Prompt Optimization and Context Engineering.
11
- > Your feedback is invaluable. if you encounter issues, please open an [issue](https://github.com/vicentereig/dspy.rb/issues). If you have suggestions, open a [new thread](https://github.com/vicentereig/dspy.rb/discussions).
12
- >
13
- > If you want to contribute, feel free to reach out to me to coordinate efforts: hey at vicente.services
14
- >
15
- > And, yes, this is 100% a legit project. :)
9
+ **Build reliable LLM applications in idiomatic Ruby using composable, type-safe modules.**
16
10
 
11
+ DSPy.rb is the Ruby port of Stanford's [DSPy](https://dspy.ai). Instead of wrestling with brittle prompt strings, you define typed signatures and let the framework handle the rest. Prompts become functions. LLM calls become predictable.
12
+ The `1.x` line is the stable release track for production Ruby LLM applications.
17
13
 
18
- **Build reliable LLM applications in idiomatic Ruby using composable, type-safe modules.**
14
+ ```ruby
15
+ require 'dspy'
19
16
 
20
- The Ruby framework for programming with large language models. DSPy.rb brings structured LLM programming to Ruby developers, programmatic Prompt Engineering and Context Engineering.
21
- Instead of wrestling with prompt strings and parsing responses, you define typed signatures using idiomatic Ruby to compose and decompose AI Worklows and AI Agents.
17
+ DSPy.configure do |c|
18
+ c.lm = DSPy::LM.new('openai/gpt-4o-mini', api_key: ENV['OPENAI_API_KEY'])
19
+ end
22
20
 
23
- **Prompts are the just Functions.** Traditional prompting is like writing code with string concatenation: it works until it doesn't. DSPy.rb brings you
24
- the programming approach pioneered by [dspy.ai](https://dspy.ai/): instead of crafting fragile prompts, you define modular
25
- signatures and let the framework handle the messy details.
21
+ class Summarize < DSPy::Signature
22
+ description "Summarize the given text in one sentence."
26
23
 
27
- DSPy.rb is an idiomatic Ruby surgical port of Stanford's [DSPy framework](https://github.com/stanfordnlp/dspy). While implementing
28
- the core concepts of signatures, predictors, and the main optimization algorithms from the original Python library, DSPy.rb embraces Ruby
29
- conventions and adds Ruby-specific innovations like Sorbet-base Typed system, ReAct loops, and production-ready integrations like non-blocking Open Telemetry Instrumentation.
24
+ input do
25
+ const :text, String
26
+ end
30
27
 
31
- **What you get?** Ruby LLM applications that actually scale and don't break when you sneeze.
28
+ output do
29
+ const :summary, String
30
+ end
31
+ end
32
32
 
33
- Check the [examples](examples/) and take them for a spin!
33
+ summarizer = DSPy::Predict.new(Summarize)
34
+ result = summarizer.call(text: "DSPy.rb brings structured LLM programming to Ruby...")
35
+ puts result.summary
36
+ ```
34
37
 
35
- ## Your First DSPy Program
36
- ### Installation
38
+ That's it. No prompt templates. No JSON parsing. No prayer-based error handling.
37
39
 
38
- Add to your Gemfile:
40
+ ## Installation
39
41
 
40
42
  ```ruby
43
+ # Gemfile
41
44
  gem 'dspy'
45
+ gem 'dspy-openai' # For OpenAI, OpenRouter, or Ollama
46
+ # gem 'dspy-anthropic' # For Claude
47
+ # gem 'dspy-gemini' # For Gemini
48
+ # gem 'dspy-ruby_llm' # For 12+ providers via RubyLLM
42
49
  ```
43
50
 
44
- and
45
-
46
51
  ```bash
47
52
  bundle install
48
53
  ```
49
54
 
50
- ### Your First Reliable Predictor
55
+ ## Quick Start
51
56
 
52
- ```ruby
57
+ ### Configure Your LLM
53
58
 
54
- # Configure DSPy globablly to use your fave LLM - you can override this on an instance levle.
59
+ ```ruby
60
+ # OpenAI
55
61
  DSPy.configure do |c|
56
62
  c.lm = DSPy::LM.new('openai/gpt-4o-mini',
57
63
  api_key: ENV['OPENAI_API_KEY'],
58
- structured_outputs: true) # Enable OpenAI's native JSON mode
64
+ structured_outputs: true)
59
65
  end
60
66
 
61
- # Define a signature for sentiment classification - instead of writing a full prompt!
62
- class Classify < DSPy::Signature
63
- description "Classify sentiment of a given sentence." # sets the goal of the underlying prompt
64
-
65
- class Sentiment < T::Enum
66
- enums do
67
- Positive = new('positive')
68
- Negative = new('negative')
69
- Neutral = new('neutral')
70
- end
71
- end
72
-
73
- # Structured Inputs: makes sure you are sending only valid prompt inputs to your model
74
- input do
75
- const :sentence, String, description: 'The sentence to analyze'
76
- end
67
+ # Anthropic Claude
68
+ DSPy.configure do |c|
69
+ c.lm = DSPy::LM.new('anthropic/claude-sonnet-4-20250514',
70
+ api_key: ENV['ANTHROPIC_API_KEY'])
71
+ end
77
72
 
78
- # Structured Outputs: your predictor will validate the output of the model too.
79
- output do
80
- const :sentiment, Sentiment, description: 'The sentiment of the sentence'
81
- const :confidence, Float, description: 'A number between 0.0 and 1.0'
82
- end
73
+ # Google Gemini
74
+ DSPy.configure do |c|
75
+ c.lm = DSPy::LM.new('gemini/gemini-2.5-flash',
76
+ api_key: ENV['GEMINI_API_KEY'])
83
77
  end
84
78
 
85
- # Wire it to the simplest prompting technique - a Predictn.
86
- classify = DSPy::Predict.new(Classify)
87
- # it may raise an error if you mess the inputs or your LLM messes the outputs.
88
- result = classify.call(sentence: "This book was super fun to read!")
79
+ # Ollama (local, free)
80
+ DSPy.configure do |c|
81
+ c.lm = DSPy::LM.new('ollama/llama3.2')
82
+ end
89
83
 
90
- puts result.sentiment # => #<Sentiment::Positive>
91
- puts result.confidence # => 0.85
84
+ # OpenRouter (200+ models)
85
+ DSPy.configure do |c|
86
+ c.lm = DSPy::LM.new('openrouter/deepseek/deepseek-chat-v3.1:free',
87
+ api_key: ENV['OPENROUTER_API_KEY'])
88
+ end
92
89
  ```
93
90
 
94
- ### Sibling Gems
95
-
96
- DSPy.rb ships multiple gems from this monorepo so you can opt into features with heavier dependency trees (e.g., datasets pull in Polars/Arrow, MIPROv2 requires `numo-*` BLAS bindings) only when you need them. Add these alongside `dspy`:
91
+ ### Define a Signature
97
92
 
98
- | Gem | Description | Status |
99
- | --- | --- | --- |
100
- | `dspy-schema` | Exposes `DSPy::TypeSystem::SorbetJsonSchema` for downstream reuse. (Still required by the core `dspy` gem; extraction lets other projects depend on it directly.) | **Stable** (v1.0.0) |
101
- | `dspy-code_act` | Think-Code-Observe agents that synthesize and execute Ruby safely. (Add the gem or set `DSPY_WITH_CODE_ACT=1` before requiring `dspy/code_act`.) | **Stable** (v1.0.0) |
102
- | `dspy-datasets` | Dataset helpers plus Parquet/Polars tooling for richer evaluation corpora. (Toggle via `DSPY_WITH_DATASETS`.) | **Stable** (v1.0.0) |
103
- | `dspy-evals` | High-throughput evaluation harness with metrics, callbacks, and regression fixtures. (Toggle via `DSPY_WITH_EVALS`.) | **Stable** (v1.0.0) |
104
- | `dspy-miprov2` | Bayesian optimization + Gaussian Process backend for the MIPROv2 teleprompter. (Install or export `DSPY_WITH_MIPROV2=1` before requiring the teleprompter.) | **Stable** (v1.0.0) |
105
- | `dspy-gepa` | `DSPy::Teleprompt::GEPA`, reflection loops, experiment tracking, telemetry adapters. (Install or set `DSPY_WITH_GEPA=1`.) | **Stable** (v1.0.0) |
106
- | `gepa` | GEPA optimizer core (Pareto engine, telemetry, reflective proposer). | **Stable** (v1.0.0) |
107
- | `dspy-o11y` | Core observability APIs: `DSPy::Observability`, async span processor, observation types. (Install or set `DSPY_WITH_O11Y=1`.) | **Stable** (v1.0.0) |
108
- | `dspy-o11y-langfuse` | Auto-configures DSPy observability to stream spans to Langfuse via OTLP. (Install or set `DSPY_WITH_O11Y_LANGFUSE=1`.) | **Stable** (v1.0.0) |
109
- | `dspy-deep_search` | Production DeepSearch loop with Exa-backed search/read, token budgeting, and instrumentation (Issue #163). | **Beta** (v1.0.0) |
110
- | `dspy-deep_research` | Planner/QA orchestration atop DeepSearch plus the memory supervisor used by the CLI example. | **Beta** (v1.0.0) |
111
-
112
- Set the matching `DSPY_WITH_*` environment variables (see `Gemfile`) to include or exclude each sibling gem when running Bundler locally (for example `DSPY_WITH_GEPA=1` or `DSPY_WITH_O11Y_LANGFUSE=1`). Refer to `adr/013-dependency-tree.md` for the full dependency map and roadmap.
113
- ### Your First Reliable Predictor
93
+ Signatures are typed contracts for LLM operations. Define inputs, outputs, and let DSPy handle the prompt:
114
94
 
115
95
  ```ruby
116
-
117
- # Configure DSPy globablly to use your fave LLM - you can override this on an instance levle.
118
- DSPy.configure do |c|
119
- c.lm = DSPy::LM.new('openai/gpt-4o-mini',
120
- api_key: ENV['OPENAI_API_KEY'],
121
- structured_outputs: true) # Enable OpenAI's native JSON mode
122
- end
123
-
124
- # Define a signature for sentiment classification - instead of writing a full prompt!
125
96
  class Classify < DSPy::Signature
126
- description "Classify sentiment of a given sentence." # sets the goal of the underlying prompt
97
+ description "Classify sentiment of a given sentence."
127
98
 
128
99
  class Sentiment < T::Enum
129
100
  enums do
@@ -132,182 +103,122 @@ class Classify < DSPy::Signature
132
103
  Neutral = new('neutral')
133
104
  end
134
105
  end
135
-
136
- # Structured Inputs: makes sure you are sending only valid prompt inputs to your model
106
+
137
107
  input do
138
108
  const :sentence, String, description: 'The sentence to analyze'
139
109
  end
140
110
 
141
- # Structured Outputs: your predictor will validate the output of the model too.
142
111
  output do
143
- const :sentiment, Sentiment, description: 'The sentiment of the sentence'
144
- const :confidence, Float, description: 'A number between 0.0 and 1.0'
112
+ const :sentiment, Sentiment
113
+ const :confidence, Float
145
114
  end
146
115
  end
147
116
 
148
- # Wire it to the simplest prompting technique - a Predictn.
149
- classify = DSPy::Predict.new(Classify)
150
- # it may raise an error if you mess the inputs or your LLM messes the outputs.
151
- result = classify.call(sentence: "This book was super fun to read!")
117
+ classifier = DSPy::Predict.new(Classify)
118
+ result = classifier.call(sentence: "This book was super fun to read!")
152
119
 
153
- puts result.sentiment # => #<Sentiment::Positive>
154
- puts result.confidence # => 0.85
120
+ result.sentiment # => #<Sentiment::Positive>
121
+ result.confidence # => 0.92
155
122
  ```
156
123
 
157
- ### Access to 200+ Models Across 5 Providers
124
+ ### Chain of Thought
158
125
 
159
- DSPy.rb provides unified access to major LLM providers with provider-specific optimizations:
126
+ For complex reasoning, use `ChainOfThought` to get step-by-step explanations:
160
127
 
161
128
  ```ruby
162
- # OpenAI (GPT-4, GPT-4o, GPT-4o-mini, GPT-5, etc.)
163
- DSPy.configure do |c|
164
- c.lm = DSPy::LM.new('openai/gpt-4o-mini',
165
- api_key: ENV['OPENAI_API_KEY'],
166
- structured_outputs: true) # Native JSON mode
167
- end
129
+ solver = DSPy::ChainOfThought.new(MathProblem)
130
+ result = solver.call(problem: "If a train travels 120km in 2 hours, what's its speed?")
168
131
 
169
- # Google Gemini (Gemini 1.5 Pro, Flash, Gemini 2.0, etc.)
170
- DSPy.configure do |c|
171
- c.lm = DSPy::LM.new('gemini/gemini-2.5-flash',
172
- api_key: ENV['GEMINI_API_KEY'],
173
- structured_outputs: true) # Native structured outputs
174
- end
132
+ result.reasoning # => "Speed = Distance / Time = 120km / 2h = 60km/h"
133
+ result.answer # => "60 km/h"
134
+ ```
175
135
 
176
- # Anthropic Claude (Claude 3.5, Claude 4, etc.)
177
- DSPy.configure do |c|
178
- c.lm = DSPy::LM.new('anthropic/claude-sonnet-4-5-20250929',
179
- api_key: ENV['ANTHROPIC_API_KEY'],
180
- structured_outputs: true) # Tool-based extraction (default)
181
- end
136
+ ### ReAct Agents
182
137
 
183
- # Ollama - Run any local model (Llama, Mistral, Gemma, etc.)
184
- DSPy.configure do |c|
185
- c.lm = DSPy::LM.new('ollama/llama3.2') # Free, runs locally, no API key needed
186
- end
138
+ Build agents that use tools to accomplish tasks:
187
139
 
188
- # OpenRouter - Access to 200+ models from multiple providers
189
- DSPy.configure do |c|
190
- c.lm = DSPy::LM.new('openrouter/deepseek/deepseek-chat-v3.1:free',
191
- api_key: ENV['OPENROUTER_API_KEY'])
140
+ ```ruby
141
+ class SearchTool < DSPy::Tools::Base
142
+ tool_name "search"
143
+ tool_description "Search for information"
144
+
145
+ sig { params(query: String).returns(String) }
146
+ def call(query:)
147
+ # Your search implementation
148
+ "Result 1, Result 2"
149
+ end
192
150
  end
151
+
152
+ agent = DSPy::ReAct.new(ResearchTask, tools: [SearchTool.new], max_iterations: 5)
153
+ result = agent.call(question: "What's the latest on Ruby 3.4?")
193
154
  ```
194
155
 
195
- ## What You Get
196
-
197
- **Developer Experience:**
198
- - LLM provider support using official Ruby clients:
199
- - [OpenAI Ruby](https://github.com/openai/openai-ruby) with vision model support
200
- - [Anthropic Ruby SDK](https://github.com/anthropics/anthropic-sdk-ruby) with multimodal capabilities
201
- - [Google Gemini API](https://ai.google.dev/) with native structured outputs
202
- - [Ollama](https://ollama.com/) via OpenAI compatibility layer for local models
203
- - **Multimodal Support** - Complete image analysis with DSPy::Image, type-safe bounding boxes, vision-capable models
204
- - Runtime type checking with [Sorbet](https://sorbet.org/) including T::Enum and union types
205
- - Type-safe tool definitions for ReAct agents
206
- - Comprehensive instrumentation and observability
207
-
208
- **Core Building Blocks:**
209
- - **Signatures** - Define input/output schemas using Sorbet types with T::Enum and union type support
210
- - **Predict** - LLM completion with structured data extraction and multimodal support
211
- - **Chain of Thought** - Step-by-step reasoning for complex problems with automatic prompt optimization
212
- - **ReAct** - Tool-using agents with type-safe tool definitions and error recovery
213
- - **Module Composition** - Combine multiple LLM calls into production-ready workflows
214
-
215
- **Optimization & Evaluation:**
216
- - **Prompt Objects** - Manipulate prompts as first-class objects instead of strings
217
- - **Typed Examples** - Type-safe training data with automatic validation
218
- - **Evaluation Framework** - Advanced metrics beyond simple accuracy with error-resilient pipelines
219
- - **MIPROv2 Optimization** - Advanced Bayesian optimization with Gaussian Processes, multiple optimization strategies, auto-config presets, and storage persistence
220
-
221
- **Production Features:**
222
- - **Reliable JSON Extraction** - Native structured outputs for OpenAI and Gemini, Anthropic tool-based extraction, and automatic strategy selection with fallback
223
- - **Type-Safe Configuration** - Strategy enums with automatic provider optimization (Strict/Compatible modes)
224
- - **Smart Retry Logic** - Progressive fallback with exponential backoff for handling transient failures
225
- - **Zero-Config Langfuse Integration** - Set env vars and get automatic OpenTelemetry traces in Langfuse
226
- - **Performance Caching** - Schema and capability caching for faster repeated operations
227
- - **File-based Storage** - Optimization result persistence with versioning
228
- - **Structured Logging** - JSON and key=value formats with span tracking
229
-
230
- ## Recent Achievements
231
-
232
- DSPy.rb has rapidly evolved from experimental to production-ready:
233
-
234
- ### Foundation
235
- - ✅ **JSON Parsing Reliability** - Native OpenAI structured outputs with adaptive retry logic and schema-aware fallbacks
236
- - ✅ **Type-Safe Strategy Configuration** - Provider-optimized strategy selection and enum-backed optimizer presets
237
- - ✅ **Core Module System** - Predict, ChainOfThought, ReAct with type safety (add `dspy-code_act` for Think-Code-Observe agents)
238
- - ✅ **Production Observability** - OpenTelemetry, New Relic, and Langfuse integration
239
- - ✅ **Advanced Optimization** - MIPROv2 with Bayesian optimization, Gaussian Processes, and multi-mode search
240
-
241
- ### Recent Advances
242
- - ✅ **MIPROv2 ADE Integrity (v0.29.1)** - Stratified train/val/test splits, honest precision accounting, and enum-driven `--auto` presets with integration coverage
243
- - ✅ **Instruction Deduplication (v0.29.1)** - Candidate generation now filters repeated programs so optimization logs highlight unique strategies
244
- - ✅ **GEPA Teleprompter (v0.29.0)** - Genetic-Pareto reflective prompt evolution with merge proposer scheduling, reflective mutation, and ADE demo parity
245
- - ✅ **Optimizer Utilities Parity (v0.29.0)** - Bootstrap strategies, dataset summaries, and Layer 3 utilities unlock multi-predictor programs on Ruby
246
- - ✅ **Observability Hardening (v0.29.0)** - OTLP exporter runs on a single-thread executor preventing frozen SSL contexts without blocking spans
247
- - ✅ **Documentation Refresh (v0.29.x)** - New GEPA guide plus ADE optimization docs covering presets, stratified splits, and error-handling defaults
248
-
249
- **Current Focus Areas:**
250
-
251
- ### Production Readiness
252
- - 🚧 **Production Patterns** - Real-world usage validation and performance optimization
253
- - 🚧 **Ruby Ecosystem Integration** - Rails integration, Sidekiq compatibility, deployment patterns
254
-
255
- ### Community & Adoption
256
- - 🚧 **Community Examples** - Real-world applications and case studies
257
- - 🚧 **Contributor Experience** - Making it easier to contribute and extend
258
- - 🚧 **Performance Benchmarks** - Comparative analysis vs other frameworks
259
-
260
- **v1.0 Philosophy:**
261
- v1.0 will be released after extensive production battle-testing, not after checking off features.
262
- The API is already stable - v1.0 represents confidence in production reliability backed by real-world validation.
156
+ ## What's Included
157
+
158
+ **Core Modules**: Predict, ChainOfThought, ReAct agents, and composable pipelines.
159
+
160
+ **Type Safety**: Sorbet-based runtime validation. Enums, unions, nested structs—all work.
161
+
162
+ **Multimodal**: Image analysis with `DSPy::Image` for vision-capable models.
263
163
 
164
+ **Observability**: Zero-config Langfuse integration via OpenTelemetry. Non-blocking, production-ready.
165
+
166
+ **Optimization**: MIPROv2 (Bayesian optimization) and GEPA (genetic evolution) for prompt tuning.
167
+
168
+ **Provider Support**: OpenAI, Anthropic, Gemini, Ollama, and OpenRouter via official SDKs.
264
169
 
265
170
  ## Documentation
266
171
 
267
- 📖 **[Complete Documentation Website](https://vicentereig.github.io/dspy.rb/)**
172
+ **[Full Documentation](https://oss.vicente.services/dspy.rb/)** — Getting started, core concepts, advanced patterns.
268
173
 
269
- ### LLM-Friendly Documentation
174
+ **[llms.txt](https://oss.vicente.services/dspy.rb/llms.txt)** LLM-friendly reference for AI assistants.
270
175
 
271
- For LLMs and AI assistants working with DSPy.rb:
272
- - **[llms.txt](https://vicentereig.github.io/dspy.rb/llms.txt)** - Concise reference optimized for LLMs
273
- - **[llms-full.txt](https://vicentereig.github.io/dspy.rb/llms-full.txt)** - Comprehensive API documentation
176
+ ### Claude Skill
274
177
 
275
- ### Getting Started
276
- - **[Installation & Setup](docs/src/getting-started/installation.md)** - Detailed installation and configuration
277
- - **[Quick Start Guide](docs/src/getting-started/quick-start.md)** - Your first DSPy programs
278
- - **[Core Concepts](docs/src/getting-started/core-concepts.md)** - Understanding signatures, predictors, and modules
178
+ A [Claude Skill](https://github.com/vicentereig/dspy-rb-skill) is available to help you build DSPy.rb applications:
279
179
 
280
- ### Prompt Engineering
281
- - **[Signatures & Types](docs/src/core-concepts/signatures.md)** - Define typed interfaces for LLM operations
282
- - **[Predictors](docs/src/core-concepts/predictors.md)** - Predict, ChainOfThought, ReAct, and more
283
- - **[Modules & Pipelines](docs/src/core-concepts/modules.md)** - Compose complex multi-stage workflows
284
- - **[Multimodal Support](docs/src/core-concepts/multimodal.md)** - Image analysis with vision-capable models
285
- - **[Examples & Validation](docs/src/core-concepts/examples.md)** - Type-safe training data
286
- - **[Rich Types](docs/src/advanced/complex-types.md)** - Sorbet type integration with automatic coercion for structs, enums, and arrays
287
- - **[Composable Pipelines](docs/src/advanced/pipelines.md)** - Manual module composition patterns
180
+ ```bash
181
+ # Claude Code install from the vicentereig/engineering marketplace
182
+ claude install-skill vicentereig/engineering --skill dspy-rb
183
+ ```
288
184
 
289
- ### Prompt Optimization
290
- - **[Evaluation Framework](docs/src/optimization/evaluation.md)** - Advanced metrics beyond simple accuracy
291
- - **[Prompt Optimization](docs/src/optimization/prompt-optimization.md)** - Manipulate prompts as objects
292
- - **[MIPROv2 Optimizer](docs/src/optimization/miprov2.md)** - Advanced Bayesian optimization with Gaussian Processes
293
- - **[GEPA Optimizer](docs/src/optimization/gepa.md)** *(beta)* - Reflective mutation with optional reflection LMs
185
+ For Claude.ai Pro/Max, download the [skill ZIP](https://github.com/vicentereig/dspy-rb-skill/archive/refs/heads/main.zip) and upload via Settings > Skills.
294
186
 
295
- ### Context Engineering
296
- - **[Tools](docs/src/core-concepts/toolsets.md)** - Tool wieldint agents.
297
- - **[Agentic Memory](docs/src/core-concepts/memory.md)** - Memory Tools & Agentic Loops
298
- - **[RAG Patterns](docs/src/advanced/rag.md)** - Manual RAG implementation with external services
187
+ ## Examples
299
188
 
300
- ### Production Features
301
- - **[Observability](docs/src/production/observability.md)** - Zero-config Langfuse integration with a dedicated export worker that never blocks your LLMs
302
- - **[Storage System](docs/src/production/storage.md)** - Persistence and optimization result storage
303
- - **[Custom Metrics](docs/src/advanced/custom-metrics.md)** - Proc-based evaluation logic
189
+ The [examples/](examples/) directory has runnable code for common patterns:
304
190
 
191
+ - Sentiment classification
192
+ - ReAct agents with tools
193
+ - Image analysis
194
+ - Prompt optimization
305
195
 
196
+ ```bash
197
+ bundle exec ruby examples/basic_search_agent.rb
198
+ ```
199
+
200
+ ## Optional Gems
306
201
 
202
+ DSPy.rb ships sibling gems for features with heavier dependencies. Add them as needed:
307
203
 
204
+ | Gem | What it does |
205
+ | --- | --- |
206
+ | `dspy-datasets` | Dataset helpers, Parquet/Polars tooling |
207
+ | `dspy-evals` | Evaluation harness with metrics and callbacks |
208
+ | `dspy-miprov2` | Bayesian optimization for prompt tuning |
209
+ | `dspy-gepa` | Genetic-Pareto prompt evolution |
210
+ | `dspy-o11y-langfuse` | Auto-configure Langfuse tracing |
211
+ | `dspy-code_act` | Think-Code-Observe agents |
212
+ | `dspy-deep_search` | Production DeepSearch with Exa |
308
213
 
214
+ See [the full list](https://oss.vicente.services/dspy.rb/getting-started/installation/) in the docs.
309
215
 
216
+ ## Contributing
310
217
 
218
+ Feedback is invaluable. If you encounter issues, [open an issue](https://github.com/vicentereig/dspy.rb/issues). For suggestions, [start a discussion](https://github.com/vicentereig/dspy.rb/discussions).
219
+
220
+ Want to contribute code? Reach out: hey at vicente.services
311
221
 
312
222
  ## License
313
- This project is licensed under the MIT License.
223
+
224
+ MIT License.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module DSPy
4
4
  module DeepResearch
5
- VERSION = "1.0.0"
5
+ VERSION = "1.0.1"
6
6
  end
7
7
  end
@@ -9,7 +9,6 @@ require_relative "deep_research/errors"
9
9
  require_relative "deep_research/signatures"
10
10
  require_relative "deep_research/section_queue"
11
11
  require_relative "deep_research/module"
12
- require_relative "deep_research_with_memory"
13
12
 
14
13
  module DSPy
15
14
  module DeepResearch
@@ -2,6 +2,6 @@
2
2
 
3
3
  module DSPy
4
4
  module DeepSearch
5
- VERSION = "1.0.0"
5
+ VERSION = "1.0.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dspy-deep_research
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vicente Reig Rincón de Arellano
@@ -13,36 +13,36 @@ dependencies:
13
13
  name: dspy
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: '0.30'
19
16
  - - ">="
20
17
  - !ruby/object:Gem::Version
21
18
  version: 0.30.1
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: '2.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - "~>"
27
- - !ruby/object:Gem::Version
28
- version: '0.30'
29
26
  - - ">="
30
27
  - !ruby/object:Gem::Version
31
28
  version: 0.30.1
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: '2.0'
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: dspy-deep_search
34
34
  requirement: !ruby/object:Gem::Requirement
35
35
  requirements:
36
36
  - - '='
37
37
  - !ruby/object:Gem::Version
38
- version: 1.0.0
38
+ version: 1.0.1
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
42
42
  requirements:
43
43
  - - '='
44
44
  - !ruby/object:Gem::Version
45
- version: 1.0.0
45
+ version: 1.0.1
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: sorbet-runtime
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -79,11 +79,11 @@ files:
79
79
  - lib/dspy/deep_search/signatures.rb
80
80
  - lib/dspy/deep_search/token_budget.rb
81
81
  - lib/dspy/deep_search/version.rb
82
- homepage: https://vicentereig.github.io/dspy.rb/
82
+ homepage: https://oss.vicente.services/dspy.rb/
83
83
  licenses:
84
84
  - MIT
85
85
  metadata:
86
- homepage_uri: https://vicentereig.github.io/dspy.rb/
86
+ homepage_uri: https://oss.vicente.services/dspy.rb/
87
87
  source_code_uri: https://github.com/vicentereig/dspy.rb
88
88
  changelog_uri: https://github.com/vicentereig/dspy.rb/blob/main/CHANGELOG.md
89
89
  rdoc_options: []