A task language model (task LM) runs the application’s task. During prompt optimization, it evaluates candidate prompts on validation data; in production, it remains the model configured for the program. A separate prompt LM can generate candidate instructions, allowing a more capable model to assist optimization while a less costly task LM handles frequent production calls. section 6.1.4 section 6.2
Separate prompt generation from task execution
A COPRO setup uses GPT-5 as the prompt LM and gpt-4o-mini as the task LM. MIPROv2 also uses the task LM to score candidate instruction-and-demonstration combinations. section 6.1.4 section 6.2
Figure 6.2 The MIPROv2 algorithm step 3. In steps 1 and 2, we create the candidate sets of demos and candidate instructions. In step 3, we try various ways to combine them until we find the combination that performs best. Because there are often many combinations, this step uses a Bayesian optimization method to determine which combinations to try. In this example, we try set of demos #5 and instructions #3, creating a prompt that is tested on all or part of the validation set with the task LM. The score is recorded, allowing us to track which sets of demos work well, which instructions work well, and which work well together. This helps us determine which other combinations to test in subsequent iterations.
Shows how MIPROv2 tests instruction and demonstration combinations with the task LM, then uses their scores to guide later trials. section 6.2
