DSPy: The framework for programming—not prompting—language models
Python
Small tutorial adjustment
Omar Khattab846c495eb1a1
diff --git a/docs/docs/tutorials/rag/index.ipynb b/docs/docs/tutorials/rag/index.ipynbindex 36aa2f03c..79cb6a070 100644--- a/docs/docs/tutorials/rag/index.ipynb+++ b/docs/docs/tutorials/rag/index.ipynb@@ -1035,1005 +1035,9 @@},{"cell_type": "code",- "execution_count": 18,+ "execution_count": null,"metadata": {},- "outputs": [- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:17 INFO dspy.teleprompt.mipro_optimizer_v2: \n",- "RUNNING WITH THE FOLLOWING MEDIUM AUTO RUN SETTINGS:\n",- "num_trials: 25\n",- "minibatch: True\n",- "num_candidates: 19\n",- "valset size: 160\n",- "\n",- "2024/11/23 22:13:17 INFO dspy.teleprompt.mipro_optimizer_v2: \n",- "==> STEP 1: BOOTSTRAP FEWSHOT EXAMPLES <==\n",- "2024/11/23 22:13:17 INFO dspy.teleprompt.mipro_optimizer_v2: These will be used as few-shot example candidates for our program and for creating instructions.\n",- "\n",- "2024/11/23 22:13:17 INFO dspy.teleprompt.mipro_optimizer_v2: Bootstrapping N=19 sets of demonstrations...\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapping set 1/19\n",- "Bootstrapping set 2/19\n",- "Bootstrapping set 3/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 10%|█ | 4/40 [00:00<00:04, 8.97it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 2 full traces after 4 examples for up to 1 rounds, amounting to 4 attempts.\n",- "Bootstrapping set 4/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 15%|█▌ | 6/40 [00:00<00:03, 8.98it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 1 full traces after 6 examples for up to 1 rounds, amounting to 6 attempts.\n",- "Bootstrapping set 5/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 2%|▎ | 1/40 [00:00<00:04, 9.16it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 1 full traces after 1 examples for up to 1 rounds, amounting to 1 attempts.\n",- "Bootstrapping set 6/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 8%|▊ | 3/40 [00:00<00:04, 9.16it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 1 full traces after 3 examples for up to 1 rounds, amounting to 3 attempts.\n",- "Bootstrapping set 7/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 5%|▌ | 2/40 [00:00<00:03, 9.53it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 1 full traces after 2 examples for up to 1 rounds, amounting to 2 attempts.\n",- "Bootstrapping set 8/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 12%|█▎ | 5/40 [00:00<00:03, 8.94it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 1 full traces after 5 examples for up to 1 rounds, amounting to 5 attempts.\n",- "Bootstrapping set 9/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 5%|▌ | 2/40 [00:00<00:04, 9.15it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 2 full traces after 2 examples for up to 1 rounds, amounting to 2 attempts.\n",- "Bootstrapping set 10/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 8%|▊ | 3/40 [00:00<00:04, 9.11it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 1 full traces after 3 examples for up to 1 rounds, amounting to 3 attempts.\n",- "Bootstrapping set 11/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 8%|▊ | 3/40 [00:00<00:04, 8.67it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 1 full traces after 3 examples for up to 1 rounds, amounting to 3 attempts.\n",- "Bootstrapping set 12/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 5%|▌ | 2/40 [00:00<00:04, 8.49it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 1 full traces after 2 examples for up to 1 rounds, amounting to 2 attempts.\n",- "Bootstrapping set 13/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 5%|▌ | 2/40 [00:00<00:04, 8.91it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 1 full traces after 2 examples for up to 1 rounds, amounting to 2 attempts.\n",- "Bootstrapping set 14/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 2%|▎ | 1/40 [00:00<00:04, 9.13it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 1 full traces after 1 examples for up to 1 rounds, amounting to 1 attempts.\n",- "Bootstrapping set 15/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 2%|▎ | 1/40 [00:00<00:04, 9.16it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 1 full traces after 1 examples for up to 1 rounds, amounting to 1 attempts.\n",- "Bootstrapping set 16/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 5%|▌ | 2/40 [00:00<00:04, 9.24it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 1 full traces after 2 examples for up to 1 rounds, amounting to 2 attempts.\n",- "Bootstrapping set 17/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 25%|██▌ | 10/40 [00:01<00:03, 8.74it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 2 full traces after 10 examples for up to 1 rounds, amounting to 10 attempts.\n",- "Bootstrapping set 18/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 8%|▊ | 3/40 [00:00<00:04, 8.40it/s]\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 2 full traces after 3 examples for up to 1 rounds, amounting to 3 attempts.\n",- "Bootstrapping set 19/19\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- " 8%|▊ | 3/40 [00:00<00:04, 8.64it/s]\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: \n",- "==> STEP 2: PROPOSE INSTRUCTION CANDIDATES <==\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: We will use the few-shot examples from the previous step, a generated dataset summary, a summary of the program code, and a randomly selected prompting tip to propose instructions.\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: \n",- "Proposing instructions...\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: Proposed Instructions for Predictor 0:\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 0: Given the fields `context`, `question`, produce the fields `response`.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 1: Using the provided `context` about Mac OS X commands and the `question` related to troubleshooting or file management, generate a detailed response. Begin by outlining the reasoning process step-by-step, then provide a comprehensive answer that not only addresses the question but also includes practical applications and comparisons where relevant.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 2: You are a technical support assistant. Given the fields `context` and `question`, analyze the provided context to extract relevant information and produce a detailed and coherent `response` that answers the question based on the information available.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 3: You are a technical support assistant. Given the fields `context` and `question`, provide a clear and structured `response` that outlines the methods for locking the screen in the XFCE desktop environment, using the information available in the `context`. Make sure to highlight the most effective methods and include any relevant details to enhance user understanding.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 4: You are a technical expert in data integrity and security. Given the fields `context` and `question`, produce a well-reasoned `response` that clearly explains the differences between a hash function and a checksum, incorporating relevant details from the context provided.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 5: You are a shell scripting expert. Given the context that provides various examples and explanations related to temporary files in shell scripting, along with a specific question about how to create a temporary file, produce a detailed response that includes a code snippet demonstrating the use of the `mktemp` command and how to properly manage the temporary file within a shell script. Make sure to emphasize the importance of cleanup after the file is used.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 6: Using the provided `context` and `question`, analyze the information and generate a detailed yet concise `response` that effectively summarizes the main arguments and conclusions regarding the practice of commenting every line of code. Ensure that the response reflects the nuances of the context and provides a clear stance on the issue.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 7: Using the provided `context` which contains detailed information about transferring photos from an iPhone to a computer, and the `question` regarding how to transfer edited photos specifically, generate a comprehensive `response` that outlines the necessary steps or methods to effectively transfer the edited photos. Ensure to highlight any limitations of direct import methods and suggest alternative approaches such as AirDrop, emailing, or using iCloud Photo Library for a successful transfer of edited images.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 8: Imagine you are a technical support specialist assisting a user who is facing issues with their Mac OS X commands. They have a critical deadline and need reliable solutions to their questions. Your task is to provide detailed, accurate responses based on the given context and questions. Given the fields `context`, `question`, produce the fields `response` to help the user understand complex technical concepts and troubleshoot effectively.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 9: Imagine you are a technical support agent assisting a user who has lost important data on their LG G2 device and needs to recover their TWRP backups urgently. Given the fields `context`, which contains vital information about where TWRP backups can be stored, and `question`, which asks specifically about the locations of these backups, produce a detailed `response` that guides the user on how to locate their backups effectively.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 10: Using the provided `context` that contains information about deleting empty directories, and the `question` regarding how to recursively delete empty directories in the user's home directory, generate a detailed `response` that includes the appropriate command and an explanation of its components. Ensure to highlight the use of options like `-type`, `-empty`, and `-exec` in the command, and consider providing variations for additional clarity, such as including the verbose option for user feedback.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 11: Based on the provided context and question, generate a detailed response that outlines the steps necessary to export a private key from a Java Keytool keystore. Include commands for converting the keystore from JKS to PKCS#12 format and for using OpenSSL to extract the private key. Emphasize the security implications of handling private keys and provide clear instructions on replacing placeholders with actual values.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 12: You are a technical support assistant with expertise in Mac OS X commands. Given the fields `context` and `question`, provide a detailed and informative `response` that clarifies the distinctions or relationships between the concepts discussed in the context.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 13: You are a privacy advocate explaining why someone would trust DuckDuckGo or similar providers with a privacy policy. Given the fields `context` and `question`, provide a detailed response that outlines the reasons for this trust, incorporating aspects such as the clarity of the privacy policy, technical implementations, user control, legal accountability, and community feedback.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 14: Using the provided `context` and `question`, generate a detailed and coherent `response` that explains the reasons someone might trust DuckDuckGo or similar privacy-focused providers based on their privacy policies and practices.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 15: Using the provided `context` that contains detailed information about Mac OS X commands and locations related to user account pictures, along with the `question` regarding where Mac stores these account pictures, generate a structured and informative `response`. Ensure that your response accurately summarizes the key locations and relevant details mentioned in the context, and clearly addresses the question posed.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 16: Using the provided `context` and `question`, generate a comprehensive `response` that summarizes the key points, compares the advantages and disadvantages of the concepts discussed, and offers practical insights based on the information available. Ensure that the response is clear, organized, and addresses the user's inquiry effectively.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 17: Given the context that describes various methods for creating temporary files in shell scripts, along with a specific question about how to create a temporary file, generate a detailed response that includes examples of using the `mktemp` command, ensuring to explain the importance of cleanup after file usage.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: 18: You are a technical support assistant. Given the fields `context`, `question`, produce the fields `response`. Ensure that your response is detailed and provides step-by-step guidance based on the context provided.\n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: \n",- "\n",- "2024/11/23 22:13:23 INFO dspy.teleprompt.mipro_optimizer_v2: Evaluating the default program...\n",- "\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Bootstrapped 2 full traces after 3 examples for up to 1 rounds, amounting to 3 attempts.\n",- "Average Metric: 89.01 / 160 (55.6%): 100%|██████████| 160/160 [00:04<00:00, 37.54it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:27 INFO dspy.evaluate.evaluate: Average Metric: 89.0075423349221 / 160 (55.6%)\n",- "2024/11/23 22:13:27 INFO dspy.teleprompt.mipro_optimizer_v2: Default program score: 55.63\n",- "\n",- "2024/11/23 22:13:27 INFO dspy.teleprompt.mipro_optimizer_v2: ==> STEP 3: FINDING OPTIMAL PROMPT PARAMETERS <==\n",- "2024/11/23 22:13:27 INFO dspy.teleprompt.mipro_optimizer_v2: We will evaluate the program over a series of trials with different combinations of instructions and few-shot examples to find the optimal combination using Bayesian Optimization.\n",- "\n",- "/opt/anaconda3/envs/jun2024_py310/lib/python3.10/site-packages/optuna/samplers/_tpe/sampler.py:319: ExperimentalWarning: ``multivariate`` option is an experimental feature. The interface can change in the future.\n",- " warnings.warn(\n",- "2024/11/23 22:13:27 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 1 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 14.72 / 25 (58.9%): 100%|██████████| 25/25 [00:00<00:00, 96.95it/s] "- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:27 INFO dspy.evaluate.evaluate: Average Metric: 14.719867707788584 / 25 (58.9%)\n",- "2024/11/23 22:13:27 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 58.88 on minibatch of size 25 with parameters ['Predictor 0: Instruction 12', 'Predictor 0: Few-Shot Set 7'].\n",- "2024/11/23 22:13:27 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88]\n",- "2024/11/23 22:13:27 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63]\n",- "2024/11/23 22:13:27 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 55.63\n",- "2024/11/23 22:13:27 INFO dspy.teleprompt.mipro_optimizer_v2: ============================\n",- "\n",- "\n",- "2024/11/23 22:13:27 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 2 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 13.88 / 25 (55.5%): 100%|██████████| 25/25 [00:00<00:00, 99.17it/s] "- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:28 INFO dspy.evaluate.evaluate: Average Metric: 13.87639947083419 / 25 (55.5%)\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 55.51 on minibatch of size 25 with parameters ['Predictor 0: Instruction 10', 'Predictor 0: Few-Shot Set 7'].\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51]\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63]\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 55.63\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: ============================\n",- "\n",- "\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 3 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 15.56 / 25 (62.3%): 100%|██████████| 25/25 [00:00<00:00, 99.46it/s] "- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:28 INFO dspy.evaluate.evaluate: Average Metric: 15.563671185234691 / 25 (62.3%)\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 62.25 on minibatch of size 25 with parameters ['Predictor 0: Instruction 7', 'Predictor 0: Few-Shot Set 18'].\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25]\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63]\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 55.63\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: ============================\n",- "\n",- "\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 4 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 14.54 / 25 (58.2%): 100%|██████████| 25/25 [00:00<00:00, 97.02it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:28 INFO dspy.evaluate.evaluate: Average Metric: 14.542840231125426 / 25 (58.2%)\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 58.17 on minibatch of size 25 with parameters ['Predictor 0: Instruction 15', 'Predictor 0: Few-Shot Set 2'].\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17]\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63]\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 55.63\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: ============================\n",- "\n",- "\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 5 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 15.75 / 25 (63.0%): 100%|██████████| 25/25 [00:00<00:00, 104.42it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:28 INFO dspy.evaluate.evaluate: Average Metric: 15.746005444613344 / 25 (63.0%)\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 62.98 on minibatch of size 25 with parameters ['Predictor 0: Instruction 8', 'Predictor 0: Few-Shot Set 18'].\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98]\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63]\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 55.63\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: ============================\n",- "\n",- "\n",- "2024/11/23 22:13:28 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 6 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 14.68 / 25 (58.7%): 100%|██████████| 25/25 [00:00<00:00, 107.78it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:29 INFO dspy.evaluate.evaluate: Average Metric: 14.683617165143385 / 25 (58.7%)\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 58.73 on minibatch of size 25 with parameters ['Predictor 0: Instruction 7', 'Predictor 0: Few-Shot Set 1'].\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73]\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63]\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 55.63\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: ============================\n",- "\n",- "\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 7 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 15.93 / 25 (63.7%): 100%|██████████| 25/25 [00:00<00:00, 106.66it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:29 INFO dspy.evaluate.evaluate: Average Metric: 15.934088959267559 / 25 (63.7%)\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 63.74 on minibatch of size 25 with parameters ['Predictor 0: Instruction 7', 'Predictor 0: Few-Shot Set 12'].\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74]\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63]\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 55.63\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: ============================\n",- "\n",- "\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 8 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 15.52 / 25 (62.1%): 100%|██████████| 25/25 [00:00<00:00, 100.22it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:29 INFO dspy.evaluate.evaluate: Average Metric: 15.52144781700213 / 25 (62.1%)\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 62.09 on minibatch of size 25 with parameters ['Predictor 0: Instruction 11', 'Predictor 0: Few-Shot Set 13'].\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09]\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63]\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 55.63\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: ============================\n",- "\n",- "\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 9 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 15.54 / 25 (62.2%): 100%|██████████| 25/25 [00:00<00:00, 104.70it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:29 INFO dspy.evaluate.evaluate: Average Metric: 15.541098318140321 / 25 (62.2%)\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 62.16 on minibatch of size 25 with parameters ['Predictor 0: Instruction 5', 'Predictor 0: Few-Shot Set 4'].\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16]\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63]\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 55.63\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: ============================\n",- "\n",- "\n",- "2024/11/23 22:13:29 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 10 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 12.33 / 25 (49.3%): 100%|██████████| 25/25 [00:00<00:00, 72.31it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:30 INFO dspy.evaluate.evaluate: Average Metric: 12.332086462618921 / 25 (49.3%)\n",- "2024/11/23 22:13:30 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 49.33 on minibatch of size 25 with parameters ['Predictor 0: Instruction 14', 'Predictor 0: Few-Shot Set 1'].\n",- "2024/11/23 22:13:30 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33]\n",- "2024/11/23 22:13:30 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63]\n",- "2024/11/23 22:13:30 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 55.63\n",- "2024/11/23 22:13:30 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:30 INFO dspy.teleprompt.mipro_optimizer_v2: ===== Full Eval 1 =====\n",- "2024/11/23 22:13:30 INFO dspy.teleprompt.mipro_optimizer_v2: Doing full eval on next top averaging program (Avg Score: 63.74) from minibatch trials...\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 98.06 / 160 (61.3%): 100%|██████████| 160/160 [00:01<00:00, 139.10it/s]\n"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:31 INFO dspy.evaluate.evaluate: Average Metric: 98.06249092576995 / 160 (61.3%)\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: \u001b[92mNew best full eval score!\u001b[0m Score: 61.29\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29]\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: =======================\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: \n",- "\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 11 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "Average Metric: 15.61 / 25 (62.5%): 100%|██████████| 25/25 [00:00<00:00, 105.23it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:31 INFO dspy.evaluate.evaluate: Average Metric: 15.612633878081091 / 25 (62.5%)\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 62.45 on minibatch of size 25 with parameters ['Predictor 0: Instruction 0', 'Predictor 0: Few-Shot Set 12'].\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45]\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29]\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 12 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 15.03 / 25 (60.1%): 100%|██████████| 25/25 [00:00<00:00, 100.46it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:31 INFO dspy.evaluate.evaluate: Average Metric: 15.03300812819276 / 25 (60.1%)\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 60.13 on minibatch of size 25 with parameters ['Predictor 0: Instruction 6', 'Predictor 0: Few-Shot Set 18'].\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13]\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29]\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:31 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 13 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 14.43 / 25 (57.7%): 100%|██████████| 25/25 [00:00<00:00, 112.91it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:32 INFO dspy.evaluate.evaluate: Average Metric: 14.430989267101385 / 25 (57.7%)\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 57.72 on minibatch of size 25 with parameters ['Predictor 0: Instruction 7', 'Predictor 0: Few-Shot Set 12'].\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13, 57.72]\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29]\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 14 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 14.68 / 25 (58.7%): 100%|██████████| 25/25 [00:00<00:00, 95.62it/s] "- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:32 INFO dspy.evaluate.evaluate: Average Metric: 14.681540371022235 / 25 (58.7%)\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 58.73 on minibatch of size 25 with parameters ['Predictor 0: Instruction 8', 'Predictor 0: Few-Shot Set 5'].\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13, 57.72, 58.73]\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29]\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 15 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 14.54 / 25 (58.2%): 100%|██████████| 25/25 [00:00<00:00, 100.56it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:32 INFO dspy.evaluate.evaluate: Average Metric: 14.53865209268966 / 25 (58.2%)\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 58.15 on minibatch of size 25 with parameters ['Predictor 0: Instruction 8', 'Predictor 0: Few-Shot Set 14'].\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13, 57.72, 58.73, 58.15]\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29]\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 16 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 14.83 / 25 (59.3%): 100%|██████████| 25/25 [00:00<00:00, 108.11it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:32 INFO dspy.evaluate.evaluate: Average Metric: 14.832026371762414 / 25 (59.3%)\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 59.33 on minibatch of size 25 with parameters ['Predictor 0: Instruction 8', 'Predictor 0: Few-Shot Set 18'].\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13, 57.72, 58.73, 58.15, 59.33]\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29]\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:32 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 17 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 17.22 / 25 (68.9%): 100%|██████████| 25/25 [00:00<00:00, 105.12it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:33 INFO dspy.evaluate.evaluate: Average Metric: 17.216978671345192 / 25 (68.9%)\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 68.87 on minibatch of size 25 with parameters ['Predictor 0: Instruction 16', 'Predictor 0: Few-Shot Set 6'].\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13, 57.72, 58.73, 58.15, 59.33, 68.87]\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29]\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 18 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 15.12 / 25 (60.5%): 100%|██████████| 25/25 [00:00<00:00, 97.80it/s] "- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:33 INFO dspy.evaluate.evaluate: Average Metric: 15.123535939830598 / 25 (60.5%)\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 60.49 on minibatch of size 25 with parameters ['Predictor 0: Instruction 1', 'Predictor 0: Few-Shot Set 6'].\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13, 57.72, 58.73, 58.15, 59.33, 68.87, 60.49]\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29]\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 19 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 15.26 / 25 (61.0%): 100%|██████████| 25/25 [00:00<00:00, 99.12it/s] "- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:33 INFO dspy.evaluate.evaluate: Average Metric: 15.256960301954985 / 25 (61.0%)\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 61.03 on minibatch of size 25 with parameters ['Predictor 0: Instruction 16', 'Predictor 0: Few-Shot Set 14'].\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13, 57.72, 58.73, 58.15, 59.33, 68.87, 60.49, 61.03]\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29]\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:33 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 20 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 14.61 / 25 (58.4%): 100%|██████████| 25/25 [00:00<00:00, 102.38it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:34 INFO dspy.evaluate.evaluate: Average Metric: 14.607005004992326 / 25 (58.4%)\n",- "2024/11/23 22:13:34 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 58.43 on minibatch of size 25 with parameters ['Predictor 0: Instruction 2', 'Predictor 0: Few-Shot Set 9'].\n",- "2024/11/23 22:13:34 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13, 57.72, 58.73, 58.15, 59.33, 68.87, 60.49, 61.03, 58.43]\n",- "2024/11/23 22:13:34 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29]\n",- "2024/11/23 22:13:34 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:34 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:34 INFO dspy.teleprompt.mipro_optimizer_v2: ===== Full Eval 2 =====\n",- "2024/11/23 22:13:34 INFO dspy.teleprompt.mipro_optimizer_v2: Doing full eval on next top averaging program (Avg Score: 68.87) from minibatch trials...\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 97.23 / 160 (60.8%): 100%|██████████| 160/160 [00:11<00:00, 14.01it/s] "- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:45 INFO dspy.evaluate.evaluate: Average Metric: 97.22622109571304 / 160 (60.8%)\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29, 60.77]\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: =======================\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: \n",- "\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 21 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 16.54 / 25 (66.2%): 100%|██████████| 25/25 [00:00<00:00, 112.10it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:45 INFO dspy.evaluate.evaluate: Average Metric: 16.54482901646923 / 25 (66.2%)\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 66.18 on minibatch of size 25 with parameters ['Predictor 0: Instruction 16', 'Predictor 0: Few-Shot Set 6'].\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13, 57.72, 58.73, 58.15, 59.33, 68.87, 60.49, 61.03, 58.43, 66.18]\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29, 60.77]\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 22 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 14.84 / 25 (59.4%): 100%|██████████| 25/25 [00:00<00:00, 113.00it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:45 INFO dspy.evaluate.evaluate: Average Metric: 14.837814582612035 / 25 (59.4%)\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 59.35 on minibatch of size 25 with parameters ['Predictor 0: Instruction 16', 'Predictor 0: Few-Shot Set 6'].\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13, 57.72, 58.73, 58.15, 59.33, 68.87, 60.49, 61.03, 58.43, 66.18, 59.35]\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29, 60.77]\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:45 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 23 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 14.71 / 25 (58.8%): 100%|██████████| 25/25 [00:00<00:00, 105.76it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:46 INFO dspy.evaluate.evaluate: Average Metric: 14.711485027993763 / 25 (58.8%)\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 58.85 on minibatch of size 25 with parameters ['Predictor 0: Instruction 3', 'Predictor 0: Few-Shot Set 15'].\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13, 57.72, 58.73, 58.15, 59.33, 68.87, 60.49, 61.03, 58.43, 66.18, 59.35, 58.85]\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29, 60.77]\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 24 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 15.14 / 25 (60.6%): 100%|██████████| 25/25 [00:00<00:00, 95.66it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:46 INFO dspy.evaluate.evaluate: Average Metric: 15.144601379869599 / 25 (60.6%)\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 60.58 on minibatch of size 25 with parameters ['Predictor 0: Instruction 18', 'Predictor 0: Few-Shot Set 8'].\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13, 57.72, 58.73, 58.15, 59.33, 68.87, 60.49, 61.03, 58.43, 66.18, 59.35, 58.85, 60.58]\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29, 60.77]\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: == Minibatch Trial 25 / 25 ==\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 14.26 / 25 (57.0%): 100%|██████████| 25/25 [00:00<00:00, 103.69it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:46 INFO dspy.evaluate.evaluate: Average Metric: 14.257718170019547 / 25 (57.0%)\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: Score: 57.03 on minibatch of size 25 with parameters ['Predictor 0: Instruction 16', 'Predictor 0: Few-Shot Set 0'].\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: Minibatch scores so far: [58.88, 55.51, 62.25, 58.17, 62.98, 58.73, 63.74, 62.09, 62.16, 49.33, 62.45, 60.13, 57.72, 58.73, 58.15, 59.33, 68.87, 60.49, 61.03, 58.43, 66.18, 59.35, 58.85, 60.58, 57.03]\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29, 60.77]\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: =============================\n",- "\n",- "\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: ===== Full Eval 3 =====\n",- "2024/11/23 22:13:46 INFO dspy.teleprompt.mipro_optimizer_v2: Doing full eval on next top averaging program (Avg Score: 62.45) from minibatch trials...\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n",- "Average Metric: 95.14 / 160 (59.5%): 100%|██████████| 160/160 [00:01<00:00, 143.17it/s]"- ]- },- {- "name": "stderr",- "output_type": "stream",- "text": [- "2024/11/23 22:13:47 INFO dspy.evaluate.evaluate: Average Metric: 95.13659459156446 / 160 (59.5%)\n",- "2024/11/23 22:13:47 INFO dspy.teleprompt.mipro_optimizer_v2: Full eval scores so far: [55.63, 61.29, 60.77, 59.46]\n",- "2024/11/23 22:13:47 INFO dspy.teleprompt.mipro_optimizer_v2: Best full score so far: 61.29\n",- "2024/11/23 22:13:47 INFO dspy.teleprompt.mipro_optimizer_v2: =======================\n",- "2024/11/23 22:13:47 INFO dspy.teleprompt.mipro_optimizer_v2: \n",- "\n",- "2024/11/23 22:13:47 INFO dspy.teleprompt.mipro_optimizer_v2: Returning best identified program with score 61.29!\n"- ]- },- {- "name": "stdout",- "output_type": "stream",- "text": [- "\n"- ]- }- ],+ "outputs": [],"source": ["tp = dspy.MIPROv2(metric=metric, auto=\"medium\", num_threads=24) # use fewer threads if your rate limit is small\n","\n",