dspy

Compile task signatures into optimized language model pipelines with DSPy.

247|22|Updated Dec 11, 2024
One-click install
npx skills add https://github.com/graniet/kheish --skill dspy-graniet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy
Source: https://github.com/graniet/kheish/tree/main/skills/mlops/research/dspy
Command: npx skills add https://github.com/graniet/kheish --skill dspy-graniet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the tedious, error-prone process of manual prompt engineering for building complex language model systems like RAG pipelines, AI agents, and classifiers, enabling systematic, data-driven improvement of LM performance.

Core Features & Use Cases

  • Declarative System Definition: Define LM tasks using type-safe signatures instead of hand-written prompts.
  • Automatic Prompt Optimization: Use training data to automatically improve prompts and few-shot examples with built-in teleprompters.
  • Modular Pipeline Building: Compose reusable components for RAG, multi-agent systems, and multi-stage workflows.
  • Multi-Provider Support: Works with OpenAI, Anthropic Claude, and local models via Ollama for flexible deployment.
  • Use Case: A developer building a customer support RAG system can use this Skill to define the retrieval and generation task structure, automatically optimize prompts with historical support tickets, and deploy a maintainable, high-accuracy pipeline in a fraction of the time.

Quick Start

Use the dspy skill to build a chain-of-thought question-answering module and optimize it with your training data for better accuracy.

Frequently Asked Questions about dspy

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

FAQPage Schema
What is automatic prompt optimization for language model systems?

Automatic prompt optimization uses training data to systematically improve LM prompts and few-shot examples, eliminating manual prompt engineering overhead for complex LM pipelines.

How do I build a RAG pipeline without manual prompt engineering?

You can build a RAG pipeline by defining retrieval and generation tasks using declarative type-safe signatures, then applying built-in teleprompters to automatically optimize the prompts using your historical training data.

Does declarative LM programming work with Anthropic and local models?

Declarative LM programming supports Anthropic Claude, OpenAI, and local models via Ollama, allowing you to compile task signatures into optimized pipelines across multiple configured language model providers.

What is the best way to structure multi-stage AI agent workflows?

The best way to structure multi-stage AI agent workflows is using modular pipeline building, composing reusable declarative components for tool-using agents and multi-stage language model workflows requiring systematic optimization.

Do I need training data to optimize language model pipelines?

Yes, you need training data such as historical support tickets to automatically improve prompts and few-shot examples using built-in teleprompters for production-ready language model pipelines.