One-click install
npx skills add https://github.com/cabezno/bmb-encover-agent --skill dspy-cabezno
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy
Source: https://github.com/cabezno/bmb-encover-agent/tree/main/skills/mlops/research/dspy
Command: npx skills add https://github.com/cabezno/bmb-encover-agent --skill dspy-cabezno

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

DSPy helps you stop manually hand-crafting prompts by letting you describe the task declaratively and then automatically optimize the prompts using your data and evaluation metrics.

Core Features & Use Cases

  • Declarative LM programs: Define tasks using signatures (inputs → outputs) and compose them into modules like predictors and pipelines.
  • Automatic prompt optimization: Compile and improve modules using teleprompters (e.g., BootstrapFewShot, MIPRO) driven by a validation metric.
  • RAG and agentic workflows: Build retrieval-augmented generation, reranking, and multi-hop pipelines using DSPy’s built-in primitives.
  • Provider-agnostic LM configuration: Switch between OpenAI, Anthropic, or local models (e.g., Ollama) without rewriting your logic.

Quick Start

Configure DSPy with your preferred model, define a signature for a question-answering task, and run a prediction to get an answer.

Frequently Asked Questions about dspy

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

FAQPage Schema
How do I stop manually optimizing prompts for RAG pipelines?

Automated prompt optimization replaces manual tuning by using teleprompters like BootstrapFewShot or MIPRO to compile declarative LM programs, automatically improving prompts for RAG pipelines using your validation metrics and training examples.

What is declarative programming for language models?

Declarative programming for language models involves defining tasks using signatures for inputs and outputs, then composing them into modules like predictors and pipelines. This approach shifts focus from hand-crafting prompts to data-driven module optimization.

Can I build multi-hop retrieval-augmented generation workflows?

Yes, you can build multi-hop retrieval-augmented generation workflows. The framework provides built-in primitives for constructing RAG pipelines, allowing you to integrate retrieval and reranking components to satisfy data-driven accuracy requirements.

Does prompt optimization work with local models or only specific providers?

Prompt optimization works with multiple LM providers including OpenAI, Anthropic, and local models like Ollama. The provider-agnostic configuration allows you to switch between models without rewriting your declarative module logic.

How do I evaluate the accuracy of optimized prompts?

To evaluate the accuracy of optimized prompts, you compile and improve your modules using a validation metric driven by training examples. This data-driven approach ensures repeatable improvements and reliable text generation.

When should I use automated prompt optimization instead of manual tuning?

Automated prompt optimization is ideal for question answering, classification, and tool-using agent patterns where you need repeatable improvements. It replaces manual tuning when you have evaluation metrics and training examples to drive accuracy.