DSPy 3.4.1 changes the default instruction proposer in GEPA, its feedback-driven prompt optimizer. The change affects what the reflection model receives and how its answer is parsed. An upgrade can change optimization results even with the same random seed.

Structured examples reach the reflection model

GEPA runs a task program, collects outputs and feedback, then asks a reflection model to write revised instructions. Previously, the default proposer flattened those examples into a raw prompt and extracted instructions from backticks.

The new InstructionProposer uses dspy.Predict with JSONAdapter, which formats requests and parses JSON responses. Histories, tool trajectories, and images can reach the reflection model as structured content. The release says the underlying reflection instructions are unchanged.

The version-pinned implementation exposes current_instruction and examples_with_feedback as inputs, with new_instruction as the output. This makes the proposal step an inspectable DSPy program itself.

A completed run can still have failed proposals

The release warns that a plain Python function passed as reflection_lm no longer works with the default proposer. Use dspy.LM or a compatible dspy.BaseLM whose responses the JSON adapter can parse.

If proposal calls fail, GEPA logs the failures and retains the current candidate. A run can finish with the starting program unchanged. Inspect proposal errors and saved instructions before treating an unchanged score as evidence that optimization found nothing better.

The proposer also supports max_chars. An oversized instruction gets one compression attempt, then validation; it is never silently sliced to length. That extra reflection call belongs in the experiment’s cost accounting.

Proposed exercise: trace one proposal without inference

Open the pinned source and follow ProposeInstruction, InstructionProposer.__call__, and _enforce_length. Sketch the path from one training failure to a validated instruction. Mark where JSON parsing, an empty answer, or an oversized revision could reject it.

Write an acceptance checklist for a future run: inspect proposal failures, compare baseline and selected instructions, and record versions and reflection costs. Use validation data to select candidates. Reserve the final test set for the fixed comparison.

Caveat: these are documented behavior changes and inspected code, not measured accuracy gains or a locally executed optimization.

Continue with GEPA feedback and held-out tests or return to Start here.