Skip to content

Commit 2f3e6ac

Browse files
feat(mipro): Expand MIPROv2 optimizer to tune instructions and examples (#453)
The MIPROv2 optimizer was previously only optimizing for model temperature and the number of bootstrapped demos. This change expands the optimizer's search space to include instruction selection and the number of labeled examples, which is closer to the intended implementation described in the DSPy paper. The key changes are: - The `compilePython` method now generates a list of instruction candidates. - The optimization request sent to the Python backend now includes the instruction candidates as a categorical parameter and the number of labeled examples as an integer parameter. - The trial loop now applies the instruction and labeled example count suggested by the optimizer to a cloned program instance for evaluation. - The final optimized program is now created with the best-performing instruction and example configuration. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent d36ddd6 commit 2f3e6ac

File tree

4 files changed

+93
-66
lines changed

4 files changed

+93
-66
lines changed

package-lock.json

Lines changed: 30 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)