HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
vicentereig
dspy.rb
Ruby2025–2025
vicentereig / dspy.rb

dspy.rb

The Ruby framework for programming—rather than prompting—language models.

2Distinct people
3Mentions
0Explicit recommenders
241GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The Ruby framework for programming—rather than prompting—language models.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week3 dated mentions

Observed mentions: 2025-10-13 11:37:10 UTC to 2025-12-27 10:45:42 UTC. Weeks start Monday, UTC.

0122025-10-13 00:00:00 UTC to 2025-10-20 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsOct 132025-10-20 00:00:00 UTC to 2025-10-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-10-27 00:00:00 UTC to 2025-11-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-11-03 00:00:00 UTC to 2025-11-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-11-10 00:00:00 UTC to 2025-11-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-11-17 00:00:00 UTC to 2025-11-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsNov 172025-11-24 00:00:00 UTC to 2025-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-12-01 00:00:00 UTC to 2025-12-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-12-08 00:00:00 UTC to 2025-12-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-12-15 00:00:00 UTC to 2025-12-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-12-22 00:00:00 UTC to 2025-12-29 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsDec 22

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Oct 132025-10-13 00:00:00 UTC2025-10-20 00:00:00 UTC101
Oct 202025-10-20 00:00:00 UTC2025-10-27 00:00:00 UTC000
Oct 272025-10-27 00:00:00 UTC2025-11-03 00:00:00 UTC000
Nov 32025-11-03 00:00:00 UTC2025-11-10 00:00:00 UTC000
Nov 102025-11-10 00:00:00 UTC2025-11-17 00:00:00 UTC000
Nov 172025-11-17 00:00:00 UTC2025-11-24 00:00:00 UTC000
Nov 242025-11-24 00:00:00 UTC2025-12-01 00:00:00 UTC000
Dec 12025-12-01 00:00:00 UTC2025-12-08 00:00:00 UTC000
Dec 82025-12-08 00:00:00 UTC2025-12-15 00:00:00 UTC000
Dec 152025-12-15 00:00:00 UTC2025-12-22 00:00:00 UTC000
Dec 222025-12-22 00:00:00 UTC2025-12-29 00:00:00 UTC202

What Hacker News says

3 sources
Thanks for sharing your experience! I know there's many of us out there dabbling with LLMs and some solid businesess built on Ruby, lurking in the background without publishing much. Your single-tool approach is a solid starting point. As it grows, you might hit context window limits and find the prompt getting unwieldy. Things like why is this prompt choking on 1.5MB of JSON coming from this other API/Tool? When you look at systems like Codex CLI, they run at least four separate LLM subsystems: (1) the main agent prompt, (2) a summarizer model that watches the reasoning trace and produces user-facing updates like "Searching for test files...", (3) compaction and (4) a reviewer agent. Each one only sees the context it needs. Like a function with their inputs and outputs. Total tokens stay similar, but signal density per prompt goes up. DS
Read the rest
Py.rb[0] enables this pattern in Ruby: define typed Signatures for each concern, compose them as Modules/Prompting Techniques (simple predictor, CoT, ReAct, CodeAct, your own, ...), and let each maintain its own memory scope. Three articles that show this: - "Ephemeral Memory Chat"[1] — the Two-Struct pattern (rich storage vs. lean prompt context) plus cost-based routing between cheap and expensive models. - "Evaluator Loops"[2] — decompose generation from evaluation: a cheap model drafts, a smarter model critiques, each with its own focused signature. - "Workflow Router"[3] — route requests to the right model based on complexity, only escalate to expensive LLMs when needed. And since you're already using RubyLLM, the dspy-ruby_llm adapter lets you keep your provider setup while gaining the decomposition benefits. Thanks for coming to my TED talk. Let me know if you need someone to bounce ideas off. [0] https://github.com/vicentereig/dspy.rb [1] https://oss.vicente.services/dspy.rb/blog/articles/ephemeral... [2] https://oss.vicente.services/dspy.rb/blog/articles/evaluator... [3] https://oss.vicente.services/dspy.rb/blog/articles/workflow-... (edit: minor formatting)
In Building an AI agent inside a 7-year-old Rails monolith
I work with DSPy in Python and felt it was missing in the Ruby ecosystem. So I started https://github.com/vicentereig/dspy.rb: a composable, type-safe version built for Rubyists who want to design and optimize prompts, and reuse LLM pipelines without leaving their language of choice. Working with DSPy::Signatures reminds me a bit of designing a db schema with an ORM. It’s still early, but it already lets you define structured modules, instrument them in Langfuse, wire them up like functional components, and experiment with signature optimization. All in plain Ruby.
In Ask HN: What are you working on? (October 2025)

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.