dspy-ruby

Build type-safe LLM applications in Ruby with Sorbet signatures.

Updated Mar 23, 2026
One-click install
npx skills add https://github.com/apollostreetcompany/codex-compound --skill dspy-ruby-apollostreetcompany
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy-ruby
Source: https://github.com/apollostreetcompany/codex-compound/tree/main/plugins/compound-engineering/skills/dspy-ruby
Command: npx skills add https://github.com/apollostreetcompany/codex-compound --skill dspy-ruby-apollostreetcompany

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dspy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a framework for building type-safe language model applications with Ruby, allowing for programmatic prompts, modular components, and automated optimization.

Core Features & Use Cases

  • Type-safe Signatures: Define input and output interfaces with Sorbet types for compile-time and runtime type safety.
  • Modular Components: Create and compose LLM logic with tools, agents, and modules.
  • Optimization: Use data to improve prompts and optimize LLM-powered functionality.
  • Use Case: Imagine you want to develop a Ruby application that uses a language model to classify customer support emails. This Skill allows you to define the input and output types, create modular components for the classification process, and optimize the prompts for better accuracy.

Quick Start

Use the dspy-ruby skill to create a type-safe signature for classifying customer support emails.

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?

Build type-safe LLM applications in Ruby by defining input and output interfaces with Sorbet types, creating modular components for LLM logic, and automating prompt optimization for structured language model outputs.

How do I create programmatic prompts for structured LLM outputs in Ruby?

Create programmatic prompts in Ruby by using type-safe signatures to define inputs and outputs, composing modular components for the LLM logic, and using data to optimize prompt accuracy for structured results.

Can I use Ruby to classify customer support emails with a language model?

Yes, you can classify customer support emails with a language model in Ruby by defining input and output types, creating modular components for the classification process, and optimizing prompts for better accuracy.

Does dspy-ruby require the dspy dependency to work?

Yes, dspy-ruby requires the dspy dependency to provide its Ruby framework for building type-safe language model applications with programmatic prompts, modular components, and automated optimization capabilities.

What is the best way to optimize LLM prompts in a Ruby application?

The best way to optimize LLM prompts in a Ruby application is using a framework that leverages data to improve prompts and automate optimization, ensuring better accuracy for language model-powered functionality.