A real LLM application is almost never a single prompt. It’s a pipeline — several language-model calls strung together, each doing one piece of the job. A retrieval-augmented question answerer might first generate a search query, then retrieve documents, then read them and answer. Each of those steps is a separate prompt that needs its own instructions and its own examples.
For each of those prompts, you have two knobs you can turn:
- The instruction — the natural-language description of what this prompt should do.
- The few-shot examples — sample input/output pairs that demonstrate the behaviour.
Tuning these by hand is painful for one prompt, and quickly impossible for several. The instruction in step 2 depends on what step 1 produces, and good examples for step 3 depend on what step 2 returns. The knobs are coupled. So the question is: can we automate this? That’s exactly what MIPROv2 does.
Click any module below to see what MIPROv2 will optimize for it.