from dspy.teleprompt import BootstrapFewShot # Simple optimizer example. I am explicitly stating the default values for max_bootstrapped_demos and max_labeled_demos for demonstration purposes optimizer = BootstrapFewShot(metric=dspy.evaluate.answer_exact_match, max_bootstrapped_demos=4) # Compile! compiled_rag = optimizer.compile(RAG(), trainset=trainset)