Skip to content

πŸ“• Bootstrap (DSPY β„–6)Β #115

Description

@github-actions

Repo or source

https://github.com/stanfordnlp/dspy

What to explain

The first optimizer: BootstrapFewShot.compile (dspy/teleprompt/bootstrap.py) makes a reset_copy student and a deepcopy teacher (optionally seeded with LabeledFewShot demos), runs the teacher on the trainset while dspy.settings.trace records every predictor's (inputs, outputs), keeps only runs the metric accepts, and installs the surviving per-predictor steps as demos on the matching student predictors via named_predictors. Cover BootstrapFewShotWithRandomSearch (random_search.py) as the wrapper that tries many bootstrapped candidates and keeps the best-scoring one. The idea to land: the program teaches itself few-shot examples from its own successful executions.

This book is part of the series "DSPY" (book 6 of 8) β€” pass --series "DSPY" --series-order 6 to video.mjs.

Cover title

Bootstrap

Subtitle (optional)

Teacher, Student, and the Trace

Cover animal (optional)

kangaroo

Accent color (optional hex)

#f97316

Model

(claude-fable-5)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    new-bookIssue β†’ generate one explainer book

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions