dspy-ruby

Develop LLM applications in Ruby with type-safe DSPy.rb modules.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/hemory/amp --skill dspy-ruby-hemory
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dspy-ruby
Source: https://github.com/hemory/amp/tree/main/.claude/plugins/compound-engineering/skills/dspy-ruby
Command: npx skills add https://github.com/hemory/amp --skill dspy-ruby-hemory

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill simplifies and standardizes the development of LLM-powered applications in Ruby by providing a programmatic framework that replaces manual prompt engineering with type-safe, composable code.

Core Features & Use Cases

  • Type-Safe Signatures: Define clear input/output contracts for LLM operations.
  • Composable Modules: Build reusable, chainable LLM components.
  • Multi-Predictor Support: Utilize Predict, ChainOfThought, ReAct, and CodeAct predictors.
  • Provider Agnostic: Easily configure and switch between OpenAI, Anthropic, Gemini, and Ollama.
  • Multimodal Capabilities: Process images alongside text.
  • Testing & Optimization: Write unit tests and optimize prompts/modules.
  • Use Case: Develop a customer support chatbot that classifies incoming emails, extracts key information, and generates a relevant response, all managed through DSPy.rb modules.

Quick Start

Use the dspy-ruby skill to create a new DSPy.rb module for email classification.

Frequently Asked Questions about dspy-ruby

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

FAQPage Schema
How do I build LLM applications in Ruby without manual prompt engineering?▼

You can build LLM applications in Ruby by using programmatic prompting frameworks that define type-safe signatures and composable modules, replacing manual prompt engineering with structured code.

What is programmatic prompting and how does it work with type-safe signatures?▼

Programmatic prompting uses type-safe signatures to define clear input and output contracts for LLM operations, ensuring predictable interactions and allowing composable modules to chain together reliably.

Can I use different LLM providers like OpenAI, Anthropic, and Ollama in the same Ruby application?▼

Yes, provider-agnostic configurations allow you to easily integrate and switch between OpenAI, Anthropic, Gemini, and Ollama within your Ruby application to build composable AI components.

How do I implement ReAct and ChainOfThought predictors for LLMs in Ruby?▼

You implement ReAct and ChainOfThought predictors in Ruby by utilizing multi-predictor support features within a programmatic LLM framework to build reusable and chainable reasoning components.

Does Ruby support multimodal LLM processing for images and text?▼

Yes, Ruby supports multimodal LLM processing through composable modules that process images alongside text, allowing you to build complex workflows that handle multiple data types simultaneously.