Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

Update BootstrapFewShot.md

arnavsinghvi116618e6147d99
diff --git a/docs/api/optimizers/BootstrapFewShot.md b/docs/api/optimizers/BootstrapFewShot.md
index 14b2deff5..a621ef15b 100644
--- a/docs/api/optimizers/BootstrapFewShot.md
+++ b/docs/api/optimizers/BootstrapFewShot.md
@@ -10,7 +10,7 @@ The constructor initializes the `BootstrapFewShot` class and sets up parameters
```python
class BootstrapFewShot(Teleprompter):
- def __init__(self, metric=None, teacher_settings={}, max_bootstrapped_demos=4, max_labeled_demos=16, max_rounds=1):
+ def __init__(self, metric=None, metric_threshold=None, teacher_settings={}, max_bootstrapped_demos=4, max_labeled_demos=16, max_rounds=1, max_errors=5):
self.metric = metric
self.teacher_settings = teacher_settings
@@ -21,10 +21,12 @@ class BootstrapFewShot(Teleprompter):
**Parameters:**
- `metric` (_callable_, _optional_): Metric function to evaluate examples during bootstrapping. Defaults to `None`.
+- `metric_threshold` (_float_, _optional_): Score threshold for metric to determine successful example. Defaults to `None`.
- `teacher_settings` (_dict_, _optional_): Settings for teacher predictor. Defaults to empty dictionary.
- `max_bootstrapped_demos` (_int_, _optional_): Maximum number of bootstrapped demonstrations per predictor. Defaults to 4.
- `max_labeled_demos` (_int_, _optional_): Maximum number of labeled demonstrations per predictor. Defaults to 16.
- `max_rounds` (_int_, _optional_): Maximum number of bootstrapping rounds. Defaults to 1.
+- `max_errors` (_int_): Maximum errors permitted during evaluation. Halts run with the latest error message. Defaults to 5. Configure to 1 if no evaluation run error is desired.
### Method