@@ -254,15 +254,15 @@ evaluate_program(your_dspy_program)
254254
255255## DSPy Optimizers
256256
257- ### dspy. LabeledFewShot
257+ ### LabeledFewShot
258258``` python
259259from dspy.teleprompt import LabeledFewShot
260260
261- labeled_fewshot_optimizer = dspy. LabeledFewShot(k = 8 )
261+ labeled_fewshot_optimizer = LabeledFewShot(k = 8 )
262262your_dspy_program_compiled = labeled_fewshot_optimizer.compile(student = your_dspy_program, trainset = trainset)
263263```
264264
265- ### dspy. BootstrapFewShot
265+ ### BootstrapFewShot
266266``` python
267267from dspy.teleprompt import BootstrapFewShot
268268
@@ -302,7 +302,7 @@ loaded_program = YourProgramClass()
302302loaded_program.load(path = save_path)
303303```
304304
305- ### dspy. BootstrapFewShotWithRandomSearch
305+ ### BootstrapFewShotWithRandomSearch
306306
307307``` python
308308from dspy.teleprompt import BootstrapFewShotWithRandomSearch
@@ -312,10 +312,10 @@ fewshot_optimizer = BootstrapFewShotWithRandomSearch(metric=your_defined_metric,
312312your_dspy_program_compiled = fewshot_optimizer.compile(student = your_dspy_program, trainset = trainset, valset = devset)
313313
314314```
315- Other custom configurations are similar to customizing the ` dspy. BootstrapFewShot` optimizer.
315+ Other custom configurations are similar to customizing the ` BootstrapFewShot ` optimizer.
316316
317317
318- ### dspy. Ensemble
318+ ### Ensemble
319319
320320``` python
321321from dspy.teleprompt import BootstrapFewShotWithRandomSearch
@@ -329,7 +329,7 @@ programs = [x[-1] for x in your_dspy_program_compiled.candidate_programs]
329329your_dspy_program_compiled_ensemble = ensemble_optimizer.compile(programs[:3 ])
330330```
331331
332- ### dspy. BootstrapFinetune
332+ ### BootstrapFinetune
333333
334334``` python
335335from dspy.teleprompt import BootstrapFewShotWithRandomSearch, BootstrapFinetune
@@ -356,7 +356,7 @@ for p in finetune_program.predictors():
356356 p.activated = False
357357```
358358
359- ### dspy. COPRO
359+ ### COPRO
360360
361361``` python
362362from dspy.teleprompt import COPRO
@@ -368,7 +368,7 @@ copro_teleprompter = COPRO(prompt_model=model_to_generate_prompts, task_model=mo
368368compiled_program_optimized_signature = copro_teleprompter.compile(your_dspy_program, trainset = trainset, eval_kwargs = eval_kwargs)
369369```
370370
371- ### dspy. MIPRO
371+ ### MIPRO
372372
373373
374374``` python
@@ -395,7 +395,7 @@ compiled_program = optimize_signature(
395395).program
396396```
397397
398- ### dspy. KNNFewShot
398+ ### KNNFewShot
399399
400400``` python
401401from dspy.predict import KNN
@@ -406,7 +406,7 @@ knn_optimizer = KNNFewShot(KNN, k=3, trainset=trainset)
406406your_dspy_program_compiled = knn_optimizer.compile(student = your_dspy_program, trainset = trainset, valset = devset)
407407```
408408
409- ### dspy. BootstrapFewShotWithOptuna
409+ ### BootstrapFewShotWithOptuna
410410
411411``` python
412412from dspy.teleprompt import BootstrapFewShotWithOptuna
0 commit comments