Skip to content

Class: BootstrapFewShot

Bootstraps demos by running the teacher program (dspy.BootstrapFewShot).

URI: dspy:BootstrapFewShot

 classDiagram
    class BootstrapFewShot
    click BootstrapFewShot href "../BootstrapFewShot/"
      Teleprompter <|-- BootstrapFewShot
        click Teleprompter href "../Teleprompter/"


      BootstrapFewShot <|-- BootstrapFewShotWithRandomSearch
        click BootstrapFewShotWithRandomSearch href "../BootstrapFewShotWithRandomSearch/"
      BootstrapFewShot <|-- BootstrapFewShotWithOptuna
        click BootstrapFewShotWithOptuna href "../BootstrapFewShotWithOptuna/"
      BootstrapFewShot <|-- KNNFewShot
        click KNNFewShot href "../KNNFewShot/"
      BootstrapFewShot <|-- InferRules
        click InferRules href "../InferRules/"


      BootstrapFewShot : description

      BootstrapFewShot : id

      BootstrapFewShot : max_bootstrapped_demos

      BootstrapFewShot : max_errors

      BootstrapFewShot : max_labeled_demos

      BootstrapFewShot : max_rounds

      BootstrapFewShot : metric

      BootstrapFewShot : metric_threshold

      BootstrapFewShot : name

      BootstrapFewShot : teacher_settings





        BootstrapFewShot --> "0..1" Any : teacher_settings
        click Any href "../Any/"



Inheritance

Slots

Name Cardinality and Range Description Inheritance
metric_threshold 0..1
Float
direct
teacher_settings 0..1
Any
direct
max_bootstrapped_demos 0..1
Integer
direct
max_labeled_demos 0..1
Integer
direct
max_rounds 0..1
Integer
direct
max_errors 0..1
Integer
direct
metric 0..1
String
Dotted import path of the metric callable (or its name) Teleprompter
id 1
Identifier
Stable opaque identifier for an instance NamedThing
name 0..1
String
Short human-readable name NamedThing
description 0..1
String
Free-form description NamedThing

In Subsets

Identifier and Mapping Information

Annotations

property value
dspy_source_paths ['dspy/teleprompt/bootstrap.py']
dspy_source_urls ['https://github.com/stanfordnlp/dspy/blob/main/dspy/teleprompt/bootstrap.py']

Schema Source

Mappings

Mapping Type Mapped Value
self dspy:BootstrapFewShot
native dspy:BootstrapFewShot

LinkML Source

Direct

name: BootstrapFewShot
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/teleprompt/bootstrap.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/teleprompt/bootstrap.py
description: Bootstraps demos by running the teacher program (``dspy.BootstrapFewShot``).
in_subset:
- teleprompt
from_schema: https://w3id.org/lmodel/dspy
is_a: Teleprompter
slots:
- metric_threshold
- teacher_settings
- max_bootstrapped_demos
- max_labeled_demos
- max_rounds
- max_errors

Induced

name: BootstrapFewShot
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/teleprompt/bootstrap.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/teleprompt/bootstrap.py
description: Bootstraps demos by running the teacher program (``dspy.BootstrapFewShot``).
in_subset:
- teleprompt
from_schema: https://w3id.org/lmodel/dspy
is_a: Teleprompter
attributes:
  metric_threshold:
    name: metric_threshold
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: BootstrapFewShot
    domain_of:
    - BestOfN
    - Refine
    - BootstrapFewShot
    - COPRO
    - MIPROv2
    range: float
  teacher_settings:
    name: teacher_settings
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: BootstrapFewShot
    domain_of:
    - BootstrapFewShot
    - MIPROv2
    - BootstrapFinetune
    range: Any
  max_bootstrapped_demos:
    name: max_bootstrapped_demos
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    ifabsent: int(4)
    owner: BootstrapFewShot
    domain_of:
    - BootstrapFewShot
    - MIPROv2
    - SIMBA
    - GEPA
    range: integer
    minimum_value: 0
  max_labeled_demos:
    name: max_labeled_demos
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    ifabsent: int(16)
    owner: BootstrapFewShot
    domain_of:
    - LabeledFewShot
    - BootstrapFewShot
    - MIPROv2
    - SIMBA
    - GEPA
    range: integer
    minimum_value: 0
  max_rounds:
    name: max_rounds
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    ifabsent: int(1)
    owner: BootstrapFewShot
    domain_of:
    - BootstrapFewShot
    range: integer
    minimum_value: 1
  max_errors:
    name: max_errors
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: BootstrapFewShot
    domain_of:
    - Parallel
    - BootstrapFewShot
    - Evaluate
    - Settings
    range: integer
    minimum_value: 0
  metric:
    name: metric
    description: Dotted import path of the metric callable (or its name).
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: BootstrapFewShot
    domain_of:
    - Teleprompter
    - Evaluate
    range: string
  id:
    name: id
    description: Stable opaque identifier for an instance.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: schema:identifier
    identifier: true
    owner: BootstrapFewShot
    domain_of:
    - NamedThing
    range: Identifier
    required: true
  name:
    name: name
    description: Short human-readable name.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: rdfs:label
    owner: BootstrapFewShot
    domain_of:
    - NamedThing
    - LMToolCallPart
    - LMMessage
    - LMToolSpec
    range: string
  description:
    name: description
    description: Free-form description.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: dct:description
    owner: BootstrapFewShot
    domain_of:
    - NamedThing
    - LMToolSpec
    range: string