dspy 0.23.0 → 0.24.0
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 +4 -4
- data/README.md +4 -5
- data/lib/dspy/teleprompt/gepa.rb +11 -2
- data/lib/dspy/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8fb5750b0bc898e3bfb2b64305e5b7eb186c494aba525fd8b739822385e7129
|
4
|
+
data.tar.gz: 530f9d8163c914845a2b472cdacce848ba187b9e69f9304d8743966b744ddf9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f8e5fa70b1be656f174e5370f529086cb6c836030382c04fd1392e79998c43e93b71db7dbc47ec3cf424254cbd42343ac6f1447f800185d6ce499204dec05f2
|
7
|
+
data.tar.gz: 95971087479ca0efa66da1bb6084e94a6cb2120203721c2a949c6fc002d152da9f4587061e8e67c246760dbee5167718f8a6f067024e61106d9fa94c1bd0cd55
|
data/README.md
CHANGED
@@ -5,16 +5,15 @@
|
|
5
5
|
[](https://github.com/vicentereig/dspy.rb/actions/workflows/ruby.yml)
|
6
6
|
[](https://vicentereig.github.io/dspy.rb/)
|
7
7
|
|
8
|
-
**Build reliable LLM applications in Ruby using composable, type-safe modules.**
|
8
|
+
**Build reliable LLM applications in idiomatic Ruby using composable, type-safe modules.**
|
9
9
|
|
10
|
-
DSPy.rb brings structured LLM programming to Ruby developers. Instead of wrestling with prompt strings and parsing
|
11
|
-
responses, you define typed signatures and compose them into pipelines that just work.
|
10
|
+
The Ruby framework for programming with large language models. DSPy.rb brings structured LLM programming to Ruby developers. 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.
|
12
11
|
|
13
|
-
Traditional prompting is like writing code with string concatenation: it works until it doesn't. DSPy.rb brings you
|
12
|
+
**Prompts are the just Functions.** Traditional prompting is like writing code with string concatenation: it works until it doesn't. DSPy.rb brings you
|
14
13
|
the programming approach pioneered by [dspy.ai](https://dspy.ai/): instead of crafting fragile prompts, you define modular
|
15
14
|
signatures and let the framework handle the messy details.
|
16
15
|
|
17
|
-
DSPy.rb is an idiomatic Ruby port of Stanford's [DSPy framework](https://github.com/stanfordnlp/dspy). While implementing
|
16
|
+
DSPy.rb is an idiomatic Ruby surgical port of Stanford's [DSPy framework](https://github.com/stanfordnlp/dspy). While implementing
|
18
17
|
the core concepts of signatures, predictors, and optimization from the original Python library, DSPy.rb embraces Ruby
|
19
18
|
conventions and adds Ruby-specific innovations like CodeAct agents and enhanced production instrumentation.
|
20
19
|
|
data/lib/dspy/teleprompt/gepa.rb
CHANGED
@@ -1699,8 +1699,17 @@ module DSPy
|
|
1699
1699
|
end
|
1700
1700
|
secondary_scores[:token_efficiency] = calculate_token_efficiency(mock_traces, predictions.size)
|
1701
1701
|
|
1702
|
-
# Response consistency
|
1703
|
-
response_texts = predictions.map
|
1702
|
+
# Response consistency - use first output field for any signature
|
1703
|
+
response_texts = predictions.map do |p|
|
1704
|
+
pred = p[:prediction]
|
1705
|
+
if pred && pred.respond_to?(:class) && pred.class.respond_to?(:props)
|
1706
|
+
# Get first output field name and value
|
1707
|
+
first_field = pred.class.props.keys.first
|
1708
|
+
first_field ? (pred.send(first_field)&.to_s || '') : ''
|
1709
|
+
else
|
1710
|
+
''
|
1711
|
+
end
|
1712
|
+
end
|
1704
1713
|
secondary_scores[:consistency] = calculate_consistency(response_texts)
|
1705
1714
|
|
1706
1715
|
# Latency performance
|
data/lib/dspy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dspy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vicente Reig Rincón de Arellano
|
@@ -177,8 +177,10 @@ dependencies:
|
|
177
177
|
- - "~>"
|
178
178
|
- !ruby/object:Gem::Version
|
179
179
|
version: '0.30'
|
180
|
-
description: The Ruby framework for programming with large language models.
|
181
|
-
|
180
|
+
description: The Ruby framework for programming with large language models. DSPy.rb
|
181
|
+
brings structured LLM programming to Ruby developers. Instead of wrestling with
|
182
|
+
prompt strings and parsing responses, you define typed signatures using idiomatic
|
183
|
+
Ruby to compose and decompose AI Worklows and AI Agents.
|
182
184
|
email:
|
183
185
|
- hey@vicente.services
|
184
186
|
executables: []
|