Skip to content

GEPA's DSPy profile refuses options DSPy allows #204

Open

Description

@deepfates

Since 0.5.0, Imp.Optimizer.GEPA defaults to DSPy's behaviour (execution_profile: :gepa_v0_1_4_merge; use_merge: false gives :gepa_v0_1_4), and Imp's own search is execution_profile: :beam_native. The DSPy profiles are sealed, so some options that dspy.GEPA accepts currently require :beam_native: component_selector "all" or a custom selector, candidate_selection_strategy="current_best", and a custom instruction_proposer. Allowing them under the DSPy profiles needs the profile's reflection-call budget reworked, since it assumes one component per iteration.

Also from the same change, to check against DSPy:

  • Imp draws the reflected step with a keyed seed (phash2({seed, candidate, component, example})) because its adapter is immutable; DSPy advances one RNG stream. Reproducible, but the same parent on the same example always draws the same step.
  • For ReActV2 turns that end by a finish_on tool or by extraction, the final answer isn't in the Context block (ReActV2 doesn't write those outputs into its history). An agent nested inside a custom module falls back to the step's own history snapshot.
  • ReActV2's extraction step shares :main's metadata, so it can be drawn as a :main call; DSPy filters trace instances by signature.

Activity

  1. added
    enhancement
    on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions