DSPy.rb Interview: The DSPy Paradigm and Ruby's MVC Moment for AI

Key Takeaways

  • DSPy is an MVC moment for AI. Just like MVC gave structure to web development 20 years ago, DSPy provides the right abstractions and conventions for building AI applications.
  • Port surgically, not completely. Rather than porting Rails to Python (impossible), focus on surgically porting the parts of DSPy that matter most for your ecosystem.
  • BAML shines with rich signatures. The token savings from BAML become significant when you have deep input/output schemas - not for simple prompts.
  • Manage optimized prompts like database migrations. Version control your optimized prompts with planned decision checkpoints that can be deployed and flipped on in production.
  • Education drives adoption. Stop coding features and invest in short, digestible tutorials that help people understand why they need Signatures over string interpolation.
Slide 1

DSPy.rb Interview

DSPy Interview Series - Episode 3

Vicente Reig, https://vicente.services

Slide 2

Deep dive into DSPy.rb

Origin story, design decisions, and the road ahead

Interview with Ankur on the DSPy Interview Series podcast

Slide 3

Topics Covered

  • Origin story: From GPT APIs to DSPy paradigm
  • Why Ruby needed DSPy (not another prompt library)
  • BAML integration and benchmarking results
  • Porting strategy: surgical vs complete ports
  • Ruby LLM ecosystem and Stainless SDKs
  • Managing optimized prompts as database migrations
  • Rails integration roadmap
  • Education-first approach to adoption
Slide 4

“DSPy is an MVC moment for AI”

The right abstractions to build tools and the right conventions to build an ecosystem

Slide 5

Key Timestamps

Time Topic
0:00 Introduction
0:43 Origin story and background
1:35 Why Ruby needed DSPy
3:56 BAML adoption and benchmarks
6:56 Tune format discussion
9:39 Porting strategy decisions
11:35 Database migrations for prompts
15:02 Project work and consulting
19:14 Ruby LLM integration
24:50 Agentic workflows vs agents
27:21 DSPy.rb roadmap
31:01 AI industry predictions
Slide 6

On Porting Strategy

“I had two options: either implement Rails in Python - and Rails is like 20 years old with thousands of contributors, I think that’s impossible - or try to surgically port parts of DSPy the Python library into Ruby.”

Slide 7

On BAML Benefits

“BAML really shines when you have a rich signature - like you have a deep input schema and an output schema with objects. That’s where the savings come.”

Slide 8

On Managing Optimized Prompts

“What I’m doing is working on an interface around optimizers to manage optimized prompts as if they were database migrations… you keep track of migration files, you run the migration, and you’ve got a file with the schema as the source of truth.”

Slide 9

On Agent vs Workflow Confusion

“There’s still a lot of people conflating agents and workflows, conflating the need for an agent when they actually just need a workflow, maybe a three or four step workflow.”

Slide 10

On AI Productivity

“I can think strategically. I can zoom out as a software engineer… I’m building a cathedral and I can actually get in my drone and look at people using the cathedral.”

Slide 11

Watch the Full Interview