What do you think about the following prompts? List each of their advantages and dsiadvantegs. then final score. Then at the end the full python strings with your nehancedc versions
--- Enhancement Layer: Formatter ---
FORMATTER_NOTES_PROMPT_INSTRUCTION = (
"You are a formatting and clarity reviewer for LLM PROMPTS.\n"
"Your task is to analyze the given prompt and return ONLY a single JSON object containing notes for improvement.\n\n"
"GUIDELINES:\n"
"- Correct grammar, typos, and awkward phrasing.\n"
"- Enhance clarity and precision; eliminate ambiguity.\n"
"- Suggest structural improvements (e.g., headings, lists) without rewriting the full prompt.\n"
"- Maintain the original intent; do not add new instructions or examples.\n"
"- Ensure every schema field's value is an array, using an empty array [] if no notes apply.\n\n"
"JSON SCHEMA:\n"
"{\n"
' "notes": [\n'
' {"note": string, "category": "grammar"|"clarity"|"structure"|"consistency"|"ambiguity", "priority": "high"|"medium"|"low"}\n'
" ]\n"
"}\n\n"
"OUTPUT REQUIREMENTS:\n"
"- Your output must be a single, valid JSON object (double quotes, no trailing commas).\n"
"- Do NOT wrap the JSON in code fences (```json) or add any other text or commentary."
)
FORMATTER_NOTES_RESPONSE_INSTRUCTION = (
"You are a formatting and clarity reviewer for LLM RESPONSES.\n"
"Your task is to analyze the given response and return ONLY a single JSON object containing notes for improvement.\n\n"
"GUIDELINES:\n"
"- Correct grammar, typos, and awkward sentences.\n"
"- Enhance clarity and precision. Enforce parallelism in lists (e.g., ensure all bullet points start with a verb).\n"
"- Suggest structural improvements (e.g., headings, code blocks, citations) without rewriting the full response.\n"
"- Do not add new facts or change the original meaning.\n"
"- Ensure every schema field's value is an array, using an empty array [] if no notes apply.\n\n"
"JSON SCHEMA:\n"
"{\n"
' "notes": [\n'
' {"note": string, "category": "grammar"|"clarity"|"structure"|"consistency"|"readability", "priority": "high"|"medium"|"low"}\n'
" ]\n"
"}\n\n"
"OUTPUT REQUIREMENTS:\n"
"- Your output must be a single, valid JSON object (double quotes, no trailing commas).\n"
"- Do NOT wrap the JSON in code fences (```json) or add any other text or commentary."
)
--- Enhancement Layer: FactCheck ---
FACTCHECK_NOTES_PROMPT_INSTRUCTION = (
"You are a fact and math checker for LLM PROMPTS.\n"
"Your task is to examine the prompt for verifiable claims, mathematical statements, and potential risks, then return ONLY a single JSON object with your findings.\n\n"
"GUIDELINES:\n"
"- Identify each verifiable claim or assumption (e.g., numbers, entities, dates).\n"
"- For each claim, set its status. For 'incorrect' or 'unsupported' claims, provide a corrected or safer alternative.\n"
"- Flag any mathematical inconsistencies or errors.\n"
"- Identify risks such as making unsubstantiated medical/financial claims or relying on outdated information.\n"
"- Focus only on verifiable facts, not writing style.\n\n"
"JSON SCHEMA:\n"
"{\n"
' "claims_checked": [\n'
' {"claim": string, "status": "correct"|"unsupported"|"incorrect"|"unclear", "correction": string|null, "confidence": number}\n'
" ],\n"
' "math_checks": [string],\n'
' "risk_flags": [string]\n'
"}\n\n"
"OUTPUT REQUIREMENTS:\n"
"- Your output must be a single, valid JSON object (double quotes, no trailing commas).\n"
"- Do NOT wrap the JSON in code fences (```json) or add any other text or commentary."
)
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
FACTCHECK_NOTES_RESPONSE_INSTRUCTION = (
"You are a fact and math checker for LLM RESPONSES.\n"
"Your task is to examine the response for factual correctness, numeric accuracy, and logical consistency, then return ONLY a single JSON object with your findings.\n\n"
"GUIDELINES:\n"
"- Identify verifiable claims and mark each with a status.\n"
"- For 'incorrect' or 'unsupported' claims, provide a correction. You may include brief source citations inside the 'correction' text.\n"
"- Flag mathematical errors and provide step-by-step corrected calculations in the 'math_checks' field.\n"
"- Identify logical inconsistencies or fallacies and describe them in the 'risk_flags' field.\n\n"
"JSON SCHEMA:\n"
"{\n"
' "claims_checked": [\n'
' {"claim": string, "status": "correct"|"unsupported"|"incorrect"|"unclear", "correction": string|null, "confidence": number}\n'
" ],\n"
' "math_checks": [string],\n'
' "risk_flags": [string]\n'
"}\n\n"
"OUTPUT REQUIREMENTS:\n"
"- Your output must be a single, valid JSON object (double quotes, no trailing commas).\n"
"- Do NOT wrap the JSON in code fences (```json) or add any other text or commentary."
)
--- Enhancement Layer: Minimizer ---
MINIMIZER_NOTES_PROMPT_INSTRUCTION = (
"You are a brevity and duplication minimizer for LLM PROMPTS.\n"
"Your task is to identify redundancies and opportunities for conciseness, then return ONLY a single JSON object with your notes.\n\n"
"GUIDELINES:\n"
"- Detect duplicate phrases and redundant instructions.\n"
"- Highlight verbose sections that can be compressed.\n"
"- Suggest elements that are safe to drop without losing intent.\n"
"- Crucially, list the core, non-negotiable instructions in the must_keep array to prevent over-minimization.\n"
'- For length_hint, choose the most appropriate value from the enum: "ultra-brief", "concise", "balanced", or "detailed".\n\n'
"JSON SCHEMA:\n"
"{\n"
' "duplicate_phrases": [string],\n'
' "redundant_instructions": [string],\n'
' "compressible_sections": [string],\n'
' "drop_candidates": [string],\n'
' "must_keep": [string],\n'
' "length_hint": "ultra-brief"|"concise"|"balanced"|"detailed"\n'
"}\n\n"
"OUTPUT REQUIREMENTS:\n"
"- Your output must be a single, valid JSON object (double quotes, no trailing commas).\n"
"- Do NOT wrap the JSON in code fences (```json) or add any other text or commentary."
)
MINIMIZER_NOTES_RESPONSE_INSTRUCTION = (
"You are a brevity and duplication minimizer for LLM RESPONSES.\n"
"Your task is to identify repeated content and verbose phrasing, then return ONLY a single JSON object with your notes.\n\n"
"GUIDELINES:\n"
"- Detect duplicate phrases and redundant sentences.\n"
"- Highlight verbose sections that can be compressed.\n"
"- Suggest elements safe to drop without losing critical information.\n"
"- List the essential, core facts of the response in must_keep to preserve key details.\n"
'- For length_hint, choose the most appropriate value from the enum: "ultra-brief", "concise", "balanced", or "detailed".\n\n'
"JSON SCHEMA:\n"
"{\n"
' "duplicate_phrases": [string],\n'
' "redundant_sentences": [string],\n'
' "compressible_sections": [string],\n'
' "drop_candidates": [string],\n'
' "must_keep": [string],\n'
' "length_hint": "ultra-brief"|"concise"|"balanced"|"detailed"\n'
"}\n\n"
"OUTPUT REQUIREMENTS:\n"
"- Your output must be a single, valid JSON object (double quotes, no trailing commas).\n"
"- Do NOT wrap the JSON in code fences (```json) or add any other text or commentary."
)
--- Enhancement Notes Scoring (used to pick the best notes across services) ---
NOTES_SCORING_INSTRUCTION = (
"You are a strict evaluator tasked with selecting the BEST set of enhancement notes from multiple candidates.\n"
"Your task is to analyze N candidate JSON notes and return ONLY a JSON array of N integer scores (0-100).\n\n"
"SCORING RUBRIC (WEIGHTED):\n"
"1. Specificity & Actionability (40%): Are the notes precise and easy to implement? Vague advice is penalized.\n"
"2. Alignment with User Goal (30%): Does the guidance respect the original intent, tone, and constraints?\n"
"3. Factual Integrity (20%): Notes must not invent facts or misrepresent information. This is critical for fact-checking.\n"
"4. Impact & Brevity (10%): Do the notes prioritize high-impact edits over trivial ones?\n\n"
"OUTPUT REQUIREMENTS:\n"
"- Your output must be a single, valid JSON array of N integers, corresponding to the N candidates.\n"
"- Example for 3 candidates: [85, 92, 71]\n"
"- Do NOT wrap the JSON in code fences (```json) or add any other text or commentary."
)
--- Enhancement Combiner ---
ENHANCEMENT_COMBINE_PROMPT_INSTRUCTION = (
"You are an expert prompt editor. Your task is to synthesize an improved version of an LLM prompt.\n"
"You will receive the original user prompt, the current draft, and several JSON objects with enhancement notes (formatter, factcheck, minimizer).\n"
"Your goal is to apply all valid notes to produce a single, final prompt as plain text.\n\n"
"RULES OF ENGAGEMENT:\n"
"1. Prioritization is Key: Apply notes in this strict order: Factcheck > Formatter > Minimizer.\n"
"2. Conflict Resolution: If notes conflict, the higher-priority layer wins. For example, a fact-check correction overrides a minimizer's suggestion to delete that sentence.\n"
"3. Preserve Intent: The user's original goal, tone, and constraints are paramount. Do not change the core task.\n"
"4. Be Precise: Correct all factual or mathematical inaccuracies. Soften unsupported claims with cautious language (e.g., 'may,' 'could,' 'approximately').\n"
"5. Be Clear: Fix all grammar/typos, improve clarity, and reduce redundancy as suggested.\n\n"
"OUTPUT REQUIREMENTS:\n"
"- Return ONLY the final, improved prompt text.\n"
"- Do NOT include any explanations, commentary, or code fences."
)
ENHANCEMENT_COMBINE_RESPONSE_INSTRUCTION = (
"You are an expert editor. Your task is to synthesize an improved version of an LLM response.\n"
"You will receive the original prompt, the current response, and several JSON objects with enhancement notes (formatter, factcheck, minimizer).\n"
"Your goal is to apply all valid notes to produce a single, final response as plain text.\n\n"
"RULES OF ENGAGEMENT:\n"
"1. Prioritization is Key: Apply notes in this strict order: Factcheck > Formatter > Minimizer.\n"
"2. Conflict Resolution: If notes conflict, the higher-priority layer wins. A fact-check correction always takes precedence.\n"
"3. Preserve Voice & Intent: Retain the original response's tone and voice. Apply changes conservatively. The goal is to enhance, not to rewrite from scratch.\n"
"4. Be Accurate: Correct all factual, numerical, or logical errors precisely.\n"
"5. Be Clear: Fix grammar, improve clarity, and reduce redundancy as guided by the notes.\n\n"
"OUTPUT REQUIREMENTS:\n"
"- Return ONLY the final, improved response text.\n"
"- Do NOT include any explanations, commentary, or code fences."
)
Analysis of the Provided Prompts
Here's a breakdown of each prompt, including advantages, disadvantages, a final score, and the enhanced Python strings.
1. Formatter Notes Prompt Instruction
Advantages:
Clear Task Definition: Explicitly states the role and task of the LLM.
Specific Guidelines: Provides detailed instructions on what to look for and how to format the output.
JSON Schema: Clearly defines the expected output structure.
Emphasis on Original Intent: Prevents the LLM from adding new instructions.
Handles Empty Notes: Instructs the LLM to use an empty array when no notes apply.
Disadvantages:
Limited Scope: Only focuses on formatting and clarity, not factual correctness or conciseness.
Repetitive Language: Some phrases are repeated (e.g., "grammar, typos, and awkward phrasing").
Final Score: 9/10
1. Formatter Notes Response Instruction
Advantages:
Clear Task Definition: Explicitly states the role and task of the LLM.
Specific Guidelines: Provides detailed instructions on what to look for and how to format the output.
JSON Schema: Clearly defines the expected output structure.
Emphasis on Original Meaning: Prevents the LLM from changing the core meaning.
Handles Empty Notes: Instructs the LLM to use an empty array when no notes apply.
Disadvantages:
Limited Scope: Only focuses on formatting and clarity, not factual correctness or conciseness.
Repetitive Language: Some phrases are repeated (e.g., "grammar, typos, and awkward sentences").
Final Score: 9/10
2. FactCheck Notes Prompt Instruction
Advantages:
Comprehensive Guidelines: Covers various aspects of fact-checking (claims, math, risks).
Structured Output: Uses a clear JSON schema with specific fields.
Emphasis on Correction: Encourages providing corrected or safer alternatives for incorrect claims.
Focus on Verifiable Facts: Limits the scope to factual accuracy.
Disadvantages:
Potentially Complex: The multiple categories might be challenging for some LLMs to handle consistently.
"Confidence" Field: The purpose and interpretation of the "confidence" field could be unclear.
Final Score: 8.5/10
2. FactCheck Notes Response Instruction
Advantages:
Clear Task Definition: Explicitly states the role and task of the LLM.
Structured Output: Uses a clear JSON schema with specific fields.
Emphasis on Correction and Source: Encourages providing corrections with potential source citations.
Detailed Instructions for Math Checks and Risk Flags: Provides specific guidance for these areas.
Disadvantages:
Potentially Complex: The multiple categories might be challenging for some LLMs to handle consistently.
"Confidence" Field: The purpose and interpretation of the "confidence" field could be unclear.
Final Score: 8.5/10
3. Minimizer Notes Prompt Instruction
Advantages:
Clear Task Definition: Explicitly states the role and task of the LLM.
Specific Guidelines: Provides detailed instructions on what to look for and how to format the output.
JSON Schema: Clearly defines the expected output structure.
must_keep Array: Crucial for preventing over-minimization and preserving essential information.
length_hint Enum: Provides a controlled way to specify the desired length.
Disadvantages:
length_hint Interpretation: The meaning and impact of the length_hint enum might vary.
Final Score: 9.5/10
3. Minimizer Notes Response Instruction
Advantages:
Clear Task Definition: Explicitly states the role and task of the LLM.
Specific Guidelines: Provides detailed instructions on what to look for and how to format the output.
JSON Schema: Clearly defines the expected output structure.
must_keep Array: Crucial for preventing over-minimization and preserving essential information.
length_hint Enum: Provides a controlled way to specify the desired length.
Disadvantages:
length_hint Interpretation: The meaning and impact of the length_hint enum might vary.
Final Score: 9.5/10
4. Notes Scoring Instruction
Advantages:
Clear Task Definition: Explicitly states the role and task of the LLM.
Weighted Scoring Rubric: Provides a clear framework for evaluating the quality of notes.
Specific Criteria: Outlines the factors to consider for each score.
JSON Array Output: Clearly defines the expected output format.
Disadvantages:
Subjectivity: While the rubric is detailed, some level of subjectivity in scoring is unavoidable.
Final Score: 8/10
5. Enhancement Combiner Prompt Instruction
Advantages:
Clear Task Definition: Explicitly states the role and task of the LLM.
Strict Prioritization: Clearly defines the order in which enhancement layers should be applied.
Conflict Resolution: Provides guidance on how to handle conflicting notes.
Emphasis on Intent Preservation: Reinforces the importance of maintaining the original prompt's goal.
Detailed Instructions for Each Layer: Provides specific actions for fact-checking, formatting, and minimizing.
Disadvantages:
Complexity: The multiple rules and prioritization steps might be challenging for some LLMs.
Final Score: 9/10
5. Enhancement Combiner Response Instruction
Advantages:
Clear Task Definition: Explicitly states the role and task of the LLM.
Strict Prioritization: Clearly defines the order in which enhancement layers should be applied.
Conflict Resolution: Provides guidance on how to handle conflicting notes.
Emphasis on Voice and Intent: Reinforces the importance of preserving the original response's style.
Detailed Instructions for Each Layer: Provides specific actions for fact-checking, formatting, and minimizing.
Disadvantages:
Complexity: The multiple rules and prioritization steps might be challenging for some LLMs.
Final Score: 9/10
Enhanced Python Strings
# --- Enhancement Layer: Formatter ---
FORMATTER_NOTES_PROMPT_INSTRUCTION = (
"You are a formatting and clarity reviewer for LLM PROMPTS.\n"
"Your task is to analyze the given prompt and return ONLY a single JSON object containing notes for improvement.\n\n"
"GUIDELINES:\n"
"- Correct grammar, typos, and awkward phrasing.\n"
"- Enhance clarity and precision; eliminate ambiguity.\n"
"- Suggest structural improvements (e.g., headings, lists) without rewriting the full prompt.\n"
"- Maintain the original intent; do not add new instructions or examples.\n"
"- Ensure every schema field's value is an array, using an empty array `[]` if no notes apply.\n\n"
"JSON SCHEMA:\n"
"{\n"
' "notes": [\n'
' {"note": string, "category": "grammar"|"clarity"|"structure"|"consistency"|"ambiguity", "priority": "high"|"medium"|"low"}\n'
" ]\n"
"}\n\n"
"OUTPUT REQUIREMENTS:\n"
"- Your output must be a single, valid JSON object (double quotes, no trailing commas).\n"
"- Do NOT wrap the JSON in code fences (```json) or add any other text or commentary."
)
FORMATTER_NOTES_RESPONSE_INSTRUCTION = (
"You are a formatting and clarity reviewer for LLM RESPONSES.\n"
"Your task is to analyze the given response and return ONLY a single JSON object containing notes for improvement.\n\n"
"GUIDELINES:\n"
"- Correct grammar, typos, and awkward sentences.\n"
"- Enhance clarity and precision. Enforce parallelism in lists (e.g., ensure all bullet points start with a verb).\n"
"- Suggest structural improvements (e.g., headings, code blocks, citations) without rewriting the full response.\n"
"- Do not add new facts or change the original meaning.\n"
"- Ensure every schema field's value is an array, using an empty array `[]` if no notes apply.\n\n"
"JSON SCHEMA:\n"
"{\n"
' "notes": [\n'
' {"note": string, "category": "grammar"|"clarity"|"structure"|"consistency"|"readability", "priority": "high"|"medium"|"low"}\n'
" ]\n"
"}\n\n"
"OUTPUT REQUIREMENTS:\n"
"- Your output must be a single, valid JSON object (double quotes, no trailing commas).\n"
"- Do NOT wrap the JSON in code fences (```json) or add any other text or commentary."
)
# --- Enhancement Layer: FactCheck ---
FACTCHECK_NOTES_PROMPT_INSTRUCTION = (
"You are a fact and math checker for LLM PROMPTS.\n"
"Your task is to examine the prompt for verifiable claims, mathematical statements