liveBook · Manning

Exploitation

As explained in Building LLM Applications with DSPy

In optimization, the selection of candidate configurations expected to perform well based on existing evaluations.

Exploitation uses evaluation results to prioritize candidate configurations expected to perform well. It favors promising candidates over less-tested alternatives, balancing the exploration that helps reveal new possibilities. section 6.2.2 section 6.5.1

In Bayesian optimization, initial random trials provide results to guide later choices. MIPROv2 first emphasizes uncertain combinations, then increasingly tests combinations likely to work well; each trial informs the next. section 6.2.2

In genetic algorithms, exploitation means selecting the strongest candidates from a pool and evaluating variations of them. Pool size matters: too few candidates can reduce diversity, while too many can include weak prompts. section 6.5.1

Prompt optimization

A Bayesian optimization trial can pair a set of demonstrations with an instruction. A genetic algorithm can select a top-performing prompt for variation or combination. section 6.2.2 section 6.5.1

How Building LLM Applications with DSPy covers it

How deep it goes
Contrasts early uncertainty-seeking exploration with later selection of likely high performers, without specifying a quantitative policy.
Examples
Uses demonstration-and-instruction combinations and pools of top-performing prompts as candidates.
What you can do after
Understand how later trials prioritize promising prompt configurations based on evaluation results.
How it connects
Links exploration and exploitation to Bayesian optimization and genetic algorithms for prompt optimization.

Also explained in

Compare how 6 books explain exploitation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building LLM Applications with DSPy. The section links point to the parts of the book it draws on.