dspy

Construct declarative language model programming pipelines for AI tasks.

1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/bailynlove/STARK-TOWER --skill dspy-bailynlove
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy
Source: https://github.com/bailynlove/STARK-TOWER/tree/main/opencrew/skills/mlops/research/dspy
Command: npx skills add https://github.com/bailynlove/STARK-TOWER --skill dspy-bailynlove

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill allows users to construct sophisticated AI systems using declarative programming, automating complex tasks, and optimizing language model interactions.

Core Features & Use Cases

  • Complex AI System Construction: Design multi-component AI systems with a high degree of configurability.
  • Declarative Programming: Avoid manual prompt engineering by defining AI tasks declaratively.
  • Automated Prompt Optimization: Use data-driven methods to automatically enhance prompts.
  • Modular AI Pipelines: Create maintainable and portable AI systems with reusable modules.
  • Use Case: Develop a system that automates customer support interactions, leveraging a combination of text retrieval, reasoning, and personalized responses.

Quick Start

To get started, install dspy using the command 'pip install dspy'. Then, define your AI task signature and configure your language model. For example:

import dspy
dspy.settings.configure(lm=dspy.Claude(model="claude-sonnet-4-5-20250929"))

Frequently Asked Questions about dspy

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

FAQPage Schema
How do I automate prompt engineering for complex AI systems?

Automate prompt engineering by defining AI tasks declaratively, which allows the system to systematically optimize prompt design and language model interactions without manual tuning.

What is declarative language model programming and when do I need it?

Declarative language model programming constructs AI pipelines by defining task signatures instead of manual prompts, needed when building modular, maintainable multi-component AI systems.

Can I use OpenAI and Anthropic models with declarative LM programming pipelines?

Yes, declarative LM programming pipelines execute and manage interactions using both OpenAI and Anthropic models, requiring both dependencies installed to configure and run the language models.

What's the best way to build modular AI pipelines for customer support automation?

Build modular AI pipelines by defining declarative task signatures that combine text retrieval, reasoning, and personalized responses, creating portable and reusable modules for customer support systems.

Do I need to install dspy to optimize prompts automatically?

Yes, you must install dspy via pip to use data-driven methods for automated prompt optimization and to configure language model settings for your declarative AI tasks.

Why does manual prompt engineering fail for multi-component AI systems?

Manual prompt engineering fails because multi-component systems require systematic optimization, which declarative programming solves by automating prompt design through data-driven methods and reusable modules.