AI Prompt Templates That Work
Proven prompts for emails, reports, marketing copy, and code. Copy and paste to get better AI outputs immediately.
Summarize document
The optimized prompt provides clear, step-by-step instructions (chain-of-thought) for GPT-4o, guiding it to perform the summarization task more effectively. It defines the AI's persona, specifies the desired output format, and outlines the criteria for a good summary (objective, concise, logical flow). This reduces ambiguity and encourages the model to follow a structured thought process rather than just intuiting the task. The explicit instruction to identify a central argument and supporting points helps create a more focused and informative summary.
Write email
The optimized prompt leverages chain-of-thought by breaking down the email writing process into distinct, structured components. It defines the AI's persona, the recipient's context, the explicit purpose, bulleted key information for clarity, the desired tone, and optional but crucial elements like calls to action, deadlines, and context. This structured approach guides the AI step-by-step, ensuring all necessary information is considered and integrated logically. It also includes an explicit instruction to only respond with the email content, reducing 'fluff' and improving efficiency. The naive prompt is vague, leading to potentially inconsistent or incomplete emails, and requires more iterative refinement.
Debug code
The `optimized_prompt` uses a structured, chain-of-thought approach. It defines a persona ('senior software engineer'), sets clear expectations, and breaks down the debugging process into sequential, actionable steps. This guides the model to perform a comprehensive analysis rather than a superficial one. It reduces ambiguity and forces the model to articulate its reasoning, leading to more thorough and accurate debugging. The explicit `[LANGUAGE]` placeholder for both the persona and code block is crucial for context. The detailed steps for analysis, identification, and solution ensure no stone is left unturned.
Write SQL query
The optimized prompt breaks down the request into clear components: a role definition, a concise problem statement, a 'Constraint Checklist' for explicit requirements, and a 'Thought Process' section using chain-of-thought to guide the model's reasoning. This structured approach helps GPT-4o systematically address each requirement, reducing ambiguity and increasing the likelihood of generating the correct and complete SQL query. The 'Thought Process' mimics how a human would approach the problem, leading to better structured and more accurate outputs. It also clearly delineates the expected output with 'SQL Query:', reducing extraneous text.
Creative writing
The optimized prompt works due to several factors: 1. **Clear Role Assignment:** 'You are a highly imaginative and skilled creative writer' sets the AI's persona, encouraging more creative output. 2. **Explicit Constraints:** Defines word count (500-700 words) for a focused response. 3. **Detailed Character and Setting:** Provides specific names and atmosphere, reducing ambiguity. 4. **Chain-of-Thought (CoT):** Breaks the creative task into manageable, sequential steps (character development, setting, inciting incident, etc.), guiding the AI through the narrative arc. This mirrors human creative planning. 5. **Instructional Nuances:** Includes 'Show, don't just tell,' 'Use evocative language,' 'Avoid clichés,' 'Build suspense,' and 'Focus on showing character emotion,' which are best practices in creative writing. 6. **Thematic Guidance:** Specifies potential themes (hope, connection, discovery in solitude) to steer the narrative's deeper meaning. This structured approach significantly improves the likelihood of a coherent, well-developed, and high-quality story compared to the vague 'vibe_prompt.'
Summarize document
The optimized prompt leverages chain-of-thought by breaking down the 'summarize' task into a series of explicit, sequential steps. This guides the model through the cognitive process required for an effective summary, minimizing ambiguity and encouraging a structured approach. It explicitly instructs the model on what to 'think' about (e.g., identifying core subject, extracting key info, synthesizing) and what characteristics the final output should possess (accuracy, conciseness, clarity, objectivity). The 'vibe_prompt' is too simplistic, offering no guidance on how to perform the summarization, often leading to less comprehensive or less focused outputs.
Write email
The optimized prompt uses a Chain-of-Thought approach, breaking down the task into sequential steps for the AI. It provides a clear persona, specific audience, purpose, tone, and explicit placeholders for key information, reducing ambiguity. Constraints like word count are clearly stated. This structured approach guides the AI to produce a more relevant, accurate, and consistently formatted output, minimizing the need for assumptions or generating extraneous information.
Debug code
The optimized prompt leverages a structured JSON format to explicitly define the task, priority, and all necessary context (code, error, traceback). It then breaks down the debugging process into a chain of thought with 'analysis_steps', guiding the model through a systematic approach rather than a vague request. Finally, it specifies a detailed 'output_format' to ensure the model provides a comprehensive and consistently structured response, including diagnosis, root cause, proposed fix, corrected code, and explanation. This reduces ambiguity, improves the quality and completeness of the debugging output, and makes the model's reasoning more transparent. The inclusion of 'traceback_info' is crucial for effective debugging, which is missing in the naive prompt.
Write SQL query
The optimized prompt provides clear instructions, defines the persona (expert SQL query generator), and includes a chain-of-thought section. This C-o-T breaks down the problem into logical steps, helping the model understand the exact requirements and thought process, leading to a more accurate and robust SQL query. It guides the model through table identification, filtering, and column selection, reducing ambiguity.
Creative writing
The optimized prompt leverages chain-of-thought by breaking down the creative writing task into sequential, manageable steps and clearly defined components. It provides specific constraints for character, setting, plot points (inciting incident, rising action, climax, resolution, falling action), theme, tone, and target audience. This structured approach guides the AI through the creative process, ensuring all necessary elements are included and enhancing the likelihood of a coherent, detailed, and high-quality output. The 'show, not tell' directive and word count estimation further refine the expected output.
Summarize document
The optimized prompt provides clear instructions on the role, goal, desired length (with a flexible range), key information to prioritize, constraints (no new info/opinions), and output format (direct summary). This structured approach reduces ambiguity and guides the model towards generating a higher-quality, more consistent summary. The 'expert summarizer' role prompt and the call for 'actionable insights' also nudge the model towards more insightful outputs. The chain-of-thought isn't explicitly 'chain-of-thought' in the typical sense of breaking down a complex problem into steps, but rather guiding the *output generation process* with detailed instructions that lead to a better summary.
Write email
The optimized prompt leverages chain-of-thought by breaking down the email writing task into sequential, logical steps. It forces Gemini to first parse the user request into explicit components (Deconstruct Request), then plan the email's structure (Outline Email Structure), draft it (Draft Email - First Pass), and finally, critically evaluate and refine it (Refine and Polish). This structured approach minimizes hallucination by grounding the AI in the specific requirements, ensures all constraints are met, and improves the overall quality and consistency of the output by guiding the model through an iterative self-correction process. The persona setting ('You are Gemini 1.5 Pro, an advanced AI email assistant') also helps align the model's behavior with the expected output quality.
Debug code
The optimized prompt leverages several key principles for effective large language model interaction. Firstly, it establishes a clear 'persona' ('expert software engineer') which sets a professional and analytical tone. Secondly, it employs Chain-of-Thought (CoT) prompting by breaking down the complex 'debug code' task into a series of explicit, sequential steps (Analyze, Identify, Explain, Propose, Justify, Offer Best Practices). This guides the model's reasoning process and encourages a structured output. Thirdly, it defines 'Constraints & Assumptions' to provide context and manage expectations, making the model more robust to varied inputs. Lastly, it includes placeholders for the user's code and problem description, directly integrating the expected input format.
Write SQL query
The optimized prompt drastically improves performance by providing a clear, step-by-step chain-of-thought process. It forces the model to decompose the problem, ensuring all critical aspects of SQL query generation (tables, columns, filters, joins, aggregations, sorting, limits) are considered explicitly. The 'vibe_prompt' is too vague, offering no guidance and likely leading to generic or incorrect outputs, requiring multiple follow-up prompts. The structured approach ensures more accurate, complete, and relevant SQL queries on the first attempt.
Creative writing
The optimized prompt leverages chain-of-thought processing by first requiring the model to create a detailed outline. This structured approach forces Gemini 1.5 Pro to think through the story's core elements before writing, which significantly improves narrative coherence, character development, and plot structure. By breaking down the complex 'creative writing' task into manageable, sequential sub-tasks (outline generation followed by story writing based on the outline), it guides the model towards a higher quality output. The explicit instructions on what to include in the outline and the word count for the story provide clear constraints and expectations, reducing ambiguity. It also allows for user intervention and refinement of the outline before the final story generation, acting as a feedback loop. Using specific literary terms like 'inciting incident,' 'rising action,' and 'climax' primes the model to think like a professional writer.
Summarize document
The optimized prompt leverages chain-of-thought prompting, explicitly outlining a step-by-step process for the model. This guides the model to perform a deeper analysis before generating the summary. By breaking down the task into smaller, manageable steps (identifying entities, main argument, supporting details, drafting, and refining), it reduces the cognitive load and increases the likelihood of a higher-quality, more accurate, and more comprehensive summary. The explicit instruction to 'Refine for Conciseness and Clarity' directly addresses a common summarization challenge and encourages more efficient token usage in the final output by prioritizing essential information.
Write email
The optimized prompt provides explicit instructions on the AI's role, the audience, purpose, key information to include, desired tone, and formatting. This significantly reduces ambiguity and guides the model to produce a more precise, relevant, and well-structured email without needing to infer these details. The chain-of-thought is implicitly built into the structured sections (Audience, Purpose, Key Information, Call to Action, Tone, Format), leading the model through the necessary steps for email construction.
Debug code
The optimized prompt provides a structured Chain-of-Thought (CoT) approach. It explicitly instructs the model on the steps to take, from understanding the code to explaining and verifying the fix. This reduces ambiguity and guides the model towards a more thorough and accurate debugging process. By asking for an explanation of the bug and verification, it also encourages deeper reasoning rather than just a superficial fix. The role-playing ('highly experienced and meticulous Python debugger') primes the model for a high-quality response.
Write SQL query
The 'optimized_prompt' enhances clarity and guidance through explicit step-by-step instructions (chain-of-thought). It clearly segments the schema from the request and specifies the role, leading to a more structured and accurate response. The prompt guides the model to break down the problem into logical parts—identifying tables, join conditions, and filtering conditions—which mirrors how a human expert would approach the task. This reduces ambiguity and the cognitive load on the LLM, making it less likely to misinterpret the request or omit crucial conditions. The clear schema definition also prevents misunderstandings about column names or types.
Creative writing
The optimized prompt works by employing several advanced prompt engineering techniques. First, it establishes a clear 'persona' for the AI ('seasoned fantasy novelist'), which guides the tone and style. Second, it breaks down the complex creative task into smaller, manageable, and logically sequenced steps using a 'Chain-of-Thought' approach (Character Introduction, Despair, Adaptation, Acceptance). Each step has specific word count guidelines, ensuring structural balance. Third, it provides clear 'constraints' and 'focus areas' (e.g., 'not about regaining fire,' 'show, don't tell'), preventing the AI from deviating and ensuring the core request is met. Finally, the 'Critique Awaited' section primes the AI for further interaction and encourages a deeper analysis of its own output, leading to potentially more coherent and thoughtfully crafted initial responses. This level of detail significantly reduces ambiguity and increases the likelihood of a high-quality, on-topic creative output.
Summarize document
The optimized prompt leverages several advanced prompting techniques for Mistral Large 2, particularly focusing on Chain-of-Thought (CoT) and explicit constraint setting. 1. **Role Assignment:** Assigning a specific, expert role ('Mistral-Summarizer-Large-2') encourages the model to adopt a more precise and professional tone and approach. 2. **Constraint Checklist:** Provides a clear, actionable list of requirements (conciseness, accuracy, objectivity, etc.). This acts as a 'checklist' for the model to adhere to during generation and refinement, significantly improving output quality and consistency. For a large model like Mistral Large 2, these explicit constraints are highly effective at guiding its internal decision-making process. 3. **Chain of Thought (CoT) Steps:** This is the most crucial optimization. By breaking down the complex task of summarization into a series of logical, sequential steps, it guides the model's internal reasoning process. It forces the model to 'think' through the summarization process, from understanding the document's purpose to drafting and refining. This mirrors how a human expert would approach the task, leading to more structured, deliberate, and higher-quality summaries. 4. **Clear Delimiters and Formatting:** Using bolding, bullet points, and specific headings (`**Constraint Checklist:**`, `**Chain of Thought (CoT) Steps:**`, `**Document to Summarize:**`, `**Summary:**`) improves readability for the model, making it easier to parse and understand each section of the instruction. 5. **Explicit Output Directive:** Ending with `**Summary:**` clearly indicates where the model's output should begin, reducing extraneous conversational text. Combined, these elements significantly enhance the model's ability to produce high-quality, relevant, and constrained summaries compared to a vague 'vibe' prompt.
Write email
The optimized prompt provides a highly structured framework for the AI, clearly defining its role, objective, recipient, sender, subject, key content points, tone, and length constraints. The inclusion of a 'Chain of Thought' guides the AI through the logical steps of email composition, ensuring comprehensive coverage and adherence to all requirements. This reduces ambiguity and prompts the AI to focus on specific, actionable elements, leading to a more precise and relevant output compared to the vague 'vibe_prompt'.
Debug code
The optimized prompt leverages a structured JSON format and a detailed chain-of-thought process. It explicitly defines the task, problem, and the exact code, avoiding ambiguity. The chain-of-thought guides the model through understanding the error, identifying the cause, brainstorming solutions, and selecting the most appropriate fix, leading to a more accurate and robust solution. This structured approach mimics human expert debugging, fostering a deeper reasoning process in the LLM.
Write SQL query
The optimized prompt provides a clear persona, detailed instructions, explicit table and column names, and a chain-of-thought breakdown. This specificity reduces ambiguity, guides the model through the logical steps, and helps it generate a more accurate and robust SQL query. The 'Thought Process' section acts as a strong few-shot example or a clear internal monologue for the model, improving output quality without necessarily increasing prompt length significantly for complex queries.
Creative writing
The optimized prompt leverages a structured JSON format to break down the creative writing task into granular, actionable components. By specifying persona, protagonist details (including unique quirks), a detailed setting, clear plot elements, tone, style, and word count, it provides the AI with a comprehensive blueprint. The 'chain_of_thought_instructions' explicitly guide the AI on how to approach each stage of the narrative, encouraging a more deliberate and coherent story development rather than a free-form generation. This specificity minimizes ambiguity and maximizes the likelihood of producing a high-quality, on-brief story. The inclusion of a unique quirk for the dragon (temperamental fire breath) adds depth and potential for humorous conflict and resolution, which a vague prompt wouldn't elicit.
Summarize document
The optimized prompt provides clear, step-by-step instructions (chain-of-thought) for the summarization task, guiding the model to extract specific information before synthesizing it. It also establishes the model's persona as an 'expert summarizer' and specifies a word limit for conciseness. This structured approach helps in generating more focused, relevant, and higher-quality summaries compared to the vague 'vibe_prompt'.
Write email
The optimized prompt leverages a structured JSON format, explicitly outlining all necessary components for email generation. It uses a chain-of-thought by breaking down the complex 'email writing' task into smaller, manageable attributes like 'recipient', 'purpose', 'key_information' (with sub-statuses), 'tone', and 'call_to_action'. This structured approach guides the model to systematically construct the email, ensuring all critical elements are addressed and presented coherently. The 'key_information' array with 'point' and 'status' forces a detailed inclusion of information, differentiating between old and new dates and providing context for the delay and its positive spin. It also offers specific subject line options, reducing ambiguity. This contrasts with the vague 'vibe' prompt, which relies heavily on the model's interpretation of 'professional but understanding' and doesn't explicitly ask for specific details like the reason for delay or a positive spin, leading to potentially generic or incomplete outputs.
Debug code
The optimized prompt works better for DeepSeek V3 because it provides a highly structured input that aligns with how large language models process information. 1. **Explicit Task Definition**: 'TASK: DEBUG CODE SNIPPET' immediately sets the model's objective. 2. **Detailed Context**: Specifies the language, libraries, error type, and expected behavior. This gives the model crucial background information. 3. **Clear Code Block**: The code is presented unambiguously. 4. **Chain-of-Thought (CoT)**: The 'DEBUGGING STEPS' section guides the model through a logical problem-solving process. This encourages systematic reasoning, reduces hallucination, and helps the model arrive at the correct solution more reliably. It effectively 'thinks aloud' for the model. 5. **Pre-computation/Pre-analysis**: By outlining the common cause of KeyError in Pandas and pointing to the exact line, the prompt prunes the search space for the model, making its task easier and more efficient. 6. **Desired Output Format**: 'REQUIRED OUTPUT: Provide the corrected code and a concise explanation of the fix.' ensures the model's response is exactly what's needed.
Write SQL query
The optimized prompt leverages DeepSeek V3's instruction-following and reasoning capabilities much better. It establishes a clear persona ('expert SQL query generator'), outlines a detailed chain-of-thought process that mimics how a human expert would approach the task, explicitly states the user's request, and provides the necessary database schema. This structure guides the model through the steps required to generate an accurate and optimized SQL query, reducing ambiguity and the likelihood of errors. The naive prompt is too vague and lacks context, forcing the model to guess at requirements and schema, often leading to generic or incorrect outputs.
Creative writing
The optimized prompt leverages a highly structured chain-of-thought approach, breaking down the creative writing task into granular components. By defining a clear persona, detailed context, and an explicit narrative structure (beginning, inciting incident, rising action, climax, falling action, resolution), it guides the model through the story arc. Character descriptions provide depth, themes ensure emotional resonance, and tone dictates the overall feel. This minimizes ambiguity and allows the model to focus its creative energy on generating content that precisely matches the user's vision, rather than spending tokens on inferring structural elements or character motivations. The specific suggested plot points within the rising action and resolution (e.g., 'government official,' 'unique melody') act as strong guiding rails.
Got a prompt that isn't working?
Paste any prompt and we'll rewrite it so AI gives you better outputs — emails, reports, copy, or code. Under a second.
Start Free Trial