DSPy 3.4.0 adds an experimental way to tune how a language-model program turns probability estimates into decisions. Its ReAnchor optimizer fits decision thresholds, score cutoffs and category weights while leaving instructions and examples unchanged, so a developer can adjust the decision rule without rewriting prompts.
ReAnchor evaluates changes against the whole program's chosen metric. A setting must improve the training score and pass a held-out fold check before it is retained. The returned program is a separate copy, so the original remains available for comparison.