Trick

DSPy — the actively maintained option (2023–ongoing)

optimization · works with Any model · via PrompVite

The prompt

A declarative framework: you define pipeline modules instead of raw prompt strings, and DSPy's compiler automatically tunes the prompts and few-shot examples across every stage of a chained, multi-step pipeline — not just one isolated prompt. Install with `pip install dspy`. Bring your own LLM API key; it works with Claude.

Expected result

An optimized multi-step pipeline, with prompts and few-shot examples tuned end-to-end for your task rather than one prompt in isolation.

Why it works

The only one of these four that's actively maintained, with real docs, a real community, and production use — thousands of stars, not an abandoned research repo. Setup is low-to-medium effort. This is the one to actually build with, especially for anything with multiple chained LLM calls.

Open in PrompVite to copy, rate, and discuss this prompt →