dspy

Build declarative language model programs with structured signatures and optimization workflows.

Updated May 14, 2026
One-click install
npx skills add https://github.com/SethyPagna/Secretary-Jarvis --skill dspy-sethypagna
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy
Source: https://github.com/SethyPagna/Secretary-Jarvis/tree/main/src/capabilities/skills/mlops/research/dspy
Command: npx skills add https://github.com/SethyPagna/Secretary-Jarvis --skill dspy-sethypagna

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you replace brittle manual prompt writing with declarative language model programs that are easier to build, optimize, and maintain.

Core Features & Use Cases

  • Declarative LM Programming: Define tasks as signatures and modules instead of hand-crafting prompts.
  • Optimization Workflows: Improve outputs with teleprompters such as BootstrapFewShot, MIPRO, COPRO, and BootstrapFinetune.
  • Agent and RAG Systems: Build multi-step assistants, retrieval pipelines, and structured classifiers with reusable components.
  • Use Case: A research team can turn a rough question-answer prototype into a tuned RAG system with evaluation metrics, few-shot demonstrations, and stronger reasoning behavior.

Quick Start

Ask the skill to design a DSPy module for your task, then optimize it with your available examples and evaluation metric.

Frequently Asked Questions about dspy

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

FAQPage Schema
How do I replace manual prompt engineering with declarative LM programming?

Declarative LM programming replaces manual prompt writing by defining tasks as reusable signatures and modules. You structure multi-stage AI workflows into composable components, enabling easier maintenance and optimization across RAG pipelines, agents, and classifiers without hand-crafting prompts.

What is teleprompting and how does it optimize language model pipelines?

Teleprompting optimizes language model pipelines using automated optimizers like BootstrapFewShot, MIPRO, and COPRO. It applies metric-driven evaluation and few-shot demonstration generation to tune module behavior, improving reasoning and output quality without manual prompt adjustments.

Can I build RAG systems and multi-step agents using structured signatures?

Yes, you can build RAG systems and multi-step agents using structured signatures. Signatures define retrieval and reasoning steps declaratively, allowing you to compose multi-stage AI workflows with reusable components for assistants, extraction, and summarization tasks.

Do I need evaluation metrics to optimize a declarative language model program?

Yes, metric-driven evaluation is required to optimize a declarative language model program. You must supply an evaluation metric and available examples so teleprompters can automatically generate few-shot demonstrations and instruction optimizations for your modules.

What's the best way to structure a multi-stage AI workflow for summarization and extraction?

The best way to structure multi-stage AI workflows for summarization and extraction is using declarative module composition. Define each stage as a signature, chain the modules together, and apply instruction or few-shot optimization to refine the structured outputs.

When should I avoid declarative programming for language model pipelines?

You should avoid declarative programming for language model pipelines when you lack defined evaluation metrics or available examples for optimization. Without metric-driven evaluation, teleprompters cannot automatically tune modules, making the declarative approach less effective than direct prompting.