DSPy BootstrapFewShot example
This example shows DSPy compiling a predictor with BootstrapFewShot using a local deterministic LM.
Requirements
- Python 3.10+
Steps for running this example in the shell
- Install dependencies:
bash
python -m venv .venv
# macOS/Linux:
source .venv/bin/activate
# Windows Command Prompt:
.venv\Scripts\activate.bat
# Windows PowerShell:
.venv\Scripts\Activate.ps1
pip install -r requirements.txt- Run the script:
bash
python bootstrap_few_shot.py