dspy-ruby

Define typed signatures and modular components for DSPy.rb LLM applications in Ruby.

10|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/aimi-so/aimi-engineering-plugin --skill dspy-ruby-aimi-so
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy-ruby
Source: https://github.com/aimi-so/aimi-engineering-plugin/tree/main/plugins/aimi-engineering/skills/dspy-ruby
Command: npx skills add https://github.com/aimi-so/aimi-engineering-plugin --skill dspy-ruby-aimi-so

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

Build robust, type-safe LLM applications in Ruby by providing DSPy.rb’s signature, module, and predictor tooling.

Core Features & Use Cases

  • Type-safe signatures (T::Struct/T::Enum) for deterministic prompts and outputs
  • Modular composition of signatures, modules, tools, and predictors with per-tool LM configuration
  • Observability and optimization integrations (Langfuse, GEPA, MIPROv2)
  • Real-world use case: orchestrating autonomous tasks with agents in Ruby apps

Quick Start

Define a simple signature and call a predictor to observe a structured, typed result.

Frequently Asked Questions about dspy-ruby

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build type-safe LLM applications in Ruby?

You can build type-safe LLM applications in Ruby by defining typed signatures using T::Struct and T::Enum, which ensures deterministic prompts and structured outputs. This approach provides modular composition of predictors and tools for reliable execution.

What is DSPy.rb used for in Ruby LLM apps?

DSPy.rb is used for orchestrating autonomous tasks with agents in Ruby apps by providing signature and module tooling. It enables defining structured signatures, composing modular components, and configuring language model providers per tool.

Can I configure different language models for individual tools in Ruby?

Yes, you can configure different language models for individual tools through per-tool LM configuration. This allows you to assign specific providers to distinct modular components within your Ruby LLM application architecture.

Does DSPy.rb support observability and optimization integrations?

DSPy.rb supports observability and optimization integrations including Langfuse, GEPA, and MIPROv2. These integrations enable monitoring and optimizing your type-safe Ruby LLM applications across modular components.

How do I define modular signatures and predictors for Ruby LLM projects?

You define modular signatures and predictors by using DSPy.rb's DSLs for tools and modules alongside the typed type system. This enables modular composition of signatures, modules, and predictors for structured LLM outputs.

What are the limitations of using typed signatures for Ruby LLM applications?

Typed signatures require using T::Struct and T::Enum for deterministic prompts and outputs, meaning your Ruby project must support this typed type system. This constraint ensures structured outputs but requires strict type definitions across your modular components.