| # Current Solution Information | |
| - Main Metrics: | |
| {metrics} | |
| - Focus areas: {improvement_areas} | |
| # Program Generation History | |
| ## Previous Attempts | |
| {previous_attempts} | |
| {other_context_programs} | |
| # Current Solution | |
| {current_program} | |
| {search_guidance} | |
| # Task | |
| {task_objective} | |
| {diversity_dimensions} | |
| {diversity_note} | |
| You MUST use the exact SEARCH/REPLACE diff format shown below to indicate changes: | |
| <<<<<<< SEARCH | |
| # Original code to find and replace (must match exactly) | |
| ======= | |
| # New replacement code | |
| >>>>>>> REPLACE | |
| Example of valid diff format: | |
| <<<<<<< SEARCH | |
| for i in range(m): | |
| for j in range(p): | |
| for k in range(n): | |
| C[i, j] += A[i, k] * B[k, j] | |
| ======= | |
| # Reorder loops for better memory access pattern | |
| for i in range(m): | |
| for k in range(n): | |
| for j in range(p): | |
| C[i, j] += A[i, k] * B[k, j] | |
| >>>>>>> REPLACE | |
| **CRITICAL**: You can suggest multiple changes. Each SEARCH section must EXACTLY match code in "# Current Solution" - copy it character-for-character, preserving all whitespace and indentation. Do NOT paraphrase or reformat. | |
| Be thoughtful about your changes and explain your reasoning thoroughly. | |
| Include a concise docstring at the start of functions describing the exact approach taken. | |
| IMPORTANT: If an instruction header of "## IMPORTANT: ..." is given below the "# Current Solution", you MUST follow it. Otherwise, | |
| focus on targeted improvements of the program. | |
| {timeout_warning} |