dspy-output-refinement-constraints

Installation
SKILL.md

DSPy Output Refinement & Constraints

Goal

Improve output quality using iterative refinement (dspy.Refine) and best-of-N selection (dspy.BestOfN) with custom constraint validation.

When to Use

  • Outputs need format validation (JSON, specific structure)
  • Length constraints (max tokens, word count)
  • Content requirements (must include X, avoid Y)
  • Quality improvement through multiple attempts
  • Replacing deprecated Assert/Suggest patterns

Related Skills

Installs
31
GitHub Stars
120
First Seen
Jan 27, 2026
dspy-output-refinement-constraints — omidzamani/dspy-skills