| sidebar_position | 1 |
|---|
DSPy Optimizers (formerly Teleprompters)
A DSPy optimizer is an algorithm that can tune the parameters of a DSPy program (i.e., the prompts and/or the LM weights) to maximize the metrics you specify, like accuracy.
A typical DSPy optimizer takes three things:
- Your DSPy program. This may be a single module (e.g.,
dspy.Predict) or a complex multi-module program. - Your metric. This is a function that evaluates the output of your program, and assigns it a score (higher is better).
- A few training inputs. This may be very small (i.e., only 5 or 10 examples) and incomplete (only inputs to your program, without any labels). If you happen to have a lot of data, DSPy can leverage that. But you can start small and get strong results.
Note: Formerly called teleprompters. We are making an official name update, which will be reflected throughout the library and documentation.