dspy-metrics-and-feedback

Design DSPy optimization metrics and GEPA reflection loop feedback.

1|Updated Jun 4, 2026
One-click install
npx skills add https://github.com/hung-phan/ml-skills --skill dspy-metrics-and-feedback
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy-metrics-and-feedback
Source: https://github.com/hung-phan/ml-skills/tree/main/skills/ml-review/references/ml-libraries/dspy/metrics-and-feedback
Command: npx skills add https://github.com/hung-phan/ml-skills --skill dspy-metrics-and-feedback

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides metric design patterns for DSPy optimization and feedback mechanisms for GEPA's reflection loop, enhancing the effectiveness of the optimization process.

Core Features & Use Cases

  • Metric Design: Offers various metric designs like F1, semantic similarity, and LLM-as-judge for DSPy optimization.
  • Feedback for GEPA: Guides in designing feedback for GEPA's reflection loop, improving the reflective learning process.
  • Use Case: When developing or fine-tuning a DSPy model and need to ensure that the metrics used are effective and provide meaningful feedback for model improvement.

Quick Start

Generate a metric for a given prediction using the provided example.

Frequently Asked Questions about dspy-metrics-and-feedback

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

FAQPage Schema
How do I design custom metrics for DSPy optimization?

Designing custom metrics for DSPy optimization involves selecting patterns like F1, semantic similarity, or LLM-as-judge to effectively evaluate model predictions and guide fine-tuning improvements.

What is GEPA's reflection loop and how does feedback improve it?

GEPA's reflection loop is a reflective learning process where structured feedback guides model adjustments, enhancing the effectiveness of DSPy optimization by providing meaningful performance signals.

How do I integrate LLM-as-judge metrics into DSPy model development?

Integrate LLM-as-judge metrics into DSPy model development by applying the provided metric design patterns to evaluate prediction quality and generate feedback for the reflection loop.

When do I need fine-grained metric design for DSPy models?

Fine-grained metric design for DSPy models is needed when developing or fine-tuning models to ensure evaluation metrics are effective and provide meaningful feedback for performance improvement.

What is the best way to evaluate DSPy model performance during optimization?

The best way to evaluate DSPy model performance during optimization is using structured metrics like F1 or semantic similarity, paired with feedback mechanisms designed for GEPA's reflection loop.

Can I use semantic similarity metrics for DSPy optimization feedback?

Yes, semantic similarity metrics can be used for DSPy optimization feedback by measuring prediction relevance and feeding those evaluation signals into GEPA's reflective learning process.