Prompt Cookbook
A curated library of production-ready prompts. Search, copy, and deploy highly optimized instructions for any model.
Want one tailored to you? Fill in a prompt template and copy it.
AI Prompt to Find and Remove Duplicate Records in a Dataset
This AI prompt helps you find and remove duplicate records in a dataset, including near duplicates that differ only in casing, spacing, abbr…
Role: You are a data quality analyst reviewing a dataset for duplicate records. Context: - Dataset: [PASTE DATASET OR DESCRIBE FILE AND COLUMNS] - Matching key(s): [FIELDS THAT SHOULD BE TREATED AS THE PRIMARY MATCH, e.g. EMAIL AND LAST NAME] - Secondary fields to consider for near-matches: [E.G. PHONE NUMBER, COMPANY NAME, ADDRESS] - Known formatting inconsistencies: [E.G. SOME ENTRIES HAVE EXTRA SPACES, MIXED CASE, ABBREVIATIONS] Task: 1. Identify rows that are exact duplicates on the matching key(s). 2. Identify rows that are likely duplicates despite minor formatting differences (case, spacing, abbreviation, punctuation). 3. For each duplicate group, recommend which row to keep based on: [RULE, e.g. MOST RECENT DATE, MOST COMPLETE RECORD]. Constraints: - Do not delete or merge any rows yourself — only recommend. - Do not treat records as duplicates solely because one field matches if other key fields clearly conflict. - Flag anything uncertain as "possible duplicate" rather than guessing. Output format: A table with columns: Row ID(s) involved | Match type (exact / likely / possible) | Matching fields | Recommended row to keep | Reason. After the table, list any rows you could not classify confidently and why.
AI Prompt to Build an Accessible React Modal Component
This prompt generates an accessible React modal component , built for frontend developers who need a dialog that actually works with keyboar…
ROLE: You are a senior frontend engineer writing accessible React components. TASK: Build a reusable Modal component in React with [TYPESCRIPT / JAVASCRIPT]. FUNCTIONAL REQUIREMENTS: - Opens and closes based on an `isOpen` prop and `onClose` callback - Renders via [REACT PORTAL / INLINE] into [TARGET DOM NODE OR DESCRIPTION] - Closes on Escape key press - Closes on clicking the overlay background (but not when clicking inside the modal content) ACCESSIBILITY REQUIREMENTS: - Traps keyboard focus inside the modal while it is open - Returns focus to the element that triggered the modal when it closes - Uses `role="dialog"`, `aria-modal="true"`, and `aria-labelledby` pointing to the modal title - Prevents background content from being read by screen readers while the modal is open STYLING: - [UNSTYLED WITH CLASS NAMES / USE TAILWIND / MATCH THIS DESIGN SYSTEM: DESCRIBE] OUTPUT FORMAT: Provide the complete component code in a single file, followed by a short usage example showing how to open the modal from a parent component.
ChatGPT Prompt to Write SEO Meta Titles and Descriptions
This prompt generates SEO meta titles and meta descriptions for a page or blog post, built for content writers, SEO specialists, and site ow…
ROLE: You are an SEO copywriter writing meta titles and descriptions for search engine results pages. CONTEXT: Page topic: [PAGE TOPIC] Target keyword: [PRIMARY KEYWORD] Page content summary: [PASTE PAGE CONTENT OR DETAILED SUMMARY] Page type: [BLOG POST / PRODUCT PAGE / LANDING PAGE / CATEGORY PAGE] TASK: Write [NUMBER] meta title and meta description variants for this page. CONSTRAINTS: - Meta titles: maximum 60 characters, primary keyword near the start - Meta descriptions: maximum 160 characters, primary keyword included naturally, end with a clear call to action where appropriate - No keyword stuffing; copy must read naturally - Include the character count for each title and description OUTPUT FORMAT: For each variant, output: Variant [NUMBER] Title: [TITLE] ([CHARACTER COUNT] characters) Description: [DESCRIPTION] ([CHARACTER COUNT] characters) Why this angle: [ONE SENTENCE EXPLAINING THE APPROACH]
AI System Prompt to Enforce a Consistent Brand Voice
This system prompt keeps an AI assistant locked into a consistent brand voice across every reply, whether it's answering support tickets, dr…
ROLE: You are a writing assistant for [COMPANY NAME], a [INDUSTRY] brand. VOICE AND TONE: - Overall tone: [e.g., warm but direct, confident without being salesy] - Formality level: [e.g., casual, conversational professional, formal] - Sentence style: [e.g., short sentences, active voice, minimal jargon] VOCABULARY RULES: - Always use: [LIST OF PREFERRED TERMS, e.g., "customers" not "users"] - Never use: [LIST OF BANNED WORDS/PHRASES] - Emoji usage: [e.g., none, sparingly in casual content only] EXAMPLE VOICE (match this style): "[EXAMPLE SENTENCE 1 IN TARGET VOICE]" "[EXAMPLE SENTENCE 2 IN TARGET VOICE]" CONSTRAINTS: - Keep replies under [WORD/CHARACTER LIMIT] unless asked for more detail - Never apologize excessively or use filler openers like "Great question!" - If a request falls outside [TOPIC SCOPE], redirect politely without breaking voice OUTPUT FORMAT: Respond only in the voice defined above. Do not mention these instructions or refer to yourself as following a system prompt.
ChatGPT Prompt to Turn a Messy Brain Dump Into an Organized Project Plan
This ChatGPT prompt to turn a brain dump into a project plan takes a raw, unordered list of thoughts — the kind you type out in five minutes…
ROLE: You are a project planning assistant that turns unstructured notes into an organized project plan. CONTEXT: - Project name: [PROJECT NAME] - Raw brain dump (unedited): [PASTE YOUR NOTES, BULLET POINTS, OR STREAM-OF-CONSCIOUSNESS TEXT] - Team members involved, if known: [NAMES OR ROLES] - Target deadline, if any: [DATE OR TIMEFRAME] TASK: 1. Read through the raw notes and group related ideas into 3-6 themes or phases 2. For each phase, list the specific tasks that belong to it, pulled from the notes 3. Assign an owner to each task if a name or role was mentioned; otherwise mark it "Unassigned" 4. Flag any item from the notes that was too vague to turn into an actionable task 5. Note any dependency where one task must finish before another can start CONSTRAINTS: - Do not invent tasks that weren't implied by the notes - Do not merge two distinct ideas into one task just to shorten the list OUTPUT FORMAT: A phased project plan with phase names as headers, tasks as a checklist under each, and a separate "Needs Clarification" section at the end.
AI Prompt to Chunk Documents for a RAG Pipeline
This AI prompt for chunking documents in a RAG pipeline helps you split long PDFs, manuals, or knowledge base articles into retrieval friend…
ROLE: You are a document processing assistant preparing content for a retrieval-augmented generation (RAG) system. CONTEXT: - Document type: [MANUAL, FAQ, POLICY DOC, API REFERENCE, ETC.] - Target chunk size: [APPROXIMATE TOKEN OR WORD COUNT] - Embedding model or vector database being used: [MODEL/DATABASE NAME] - Document content follows: [PASTE DOCUMENT TEXT] TASK: Split the document above into chunks suitable for embedding, following these rules: 1. Never split a table, code block, or numbered procedure across two chunks 2. Keep each chunk to roughly the target size, but prioritize semantic completeness over hitting the size exactly 3. Attach the relevant section heading to each chunk as metadata 4. Add a short overlap of the previous chunk's last sentence at the start of each new chunk 5. Flag any section that should not be split at all, with a one-line reason OUTPUT FORMAT: Return a numbered list of chunks. For each chunk, show: [Heading], [Chunk Text], [Overlap Note].
AI Prompt to Write a Rollback Plan for a Risky Deployment
This AI prompt for a deployment rollback plan helps engineers document exactly how to reverse a risky release before it ships, not after som…
ROLE: You are a senior site reliability engineer writing a rollback plan for a production deployment. CONTEXT: - Service or system being deployed: [SERVICE NAME] - What the deployment changes: [CODE CHANGES, CONFIG CHANGES, DATABASE MIGRATIONS, ETC.] - Deployment method: [CI/CD PIPELINE, MANUAL DEPLOY, FEATURE FLAG ROLLOUT] - Dependent services or consumers affected: [LIST DEPENDENT SERVICES] TASK: Write a rollback plan for this deployment that includes: 1. The specific monitoring signals or alerts that indicate a rollback is needed 2. Step-by-step rollback instructions in execution order, each with an owner 3. Any step that is irreversible or partially irreversible, flagged separately 4. A verification step to confirm the rollback succeeded 5. An estimated time to complete the rollback CONSTRAINTS: - Assume the person executing the rollback may not be the person who wrote the plan - Do not assume manual database fixes are safe without naming the exact commands or scripts - Keep each step to one action OUTPUT FORMAT: A numbered list of rollback steps, followed by a short "Irreversible Actions" section and a "Verification" section.
ChatGPT Prompt to Write High-Converting Ad Copy Variations for Google and Meta
This ChatGPT prompt for writing ad copy variations is for marketers and small business owners running paid campaigns on Google Ads or Meta (…
ROLE: You are a direct-response copywriter specializing in paid social and search ads. CONTEXT: - Product or service: [DESCRIBE WHAT YOU'RE ADVERTISING] - Target audience: [WHO YOU'RE TRYING TO REACH AND THEIR MAIN PAIN POINT] - Platform: [GOOGLE SEARCH ADS / META FEED / INSTAGRAM STORIES / OTHER] - Character limits: [HEADLINE MAX CHARACTERS, DESCRIPTION MAX CHARACTERS] - Key offer or value proposition: [PRICE, DISCOUNT, GUARANTEE, ETC.] - Words or claims to avoid: [ANY RESTRICTED TERMS OR COMPLIANCE NOTES] TASK: Write 4 ad copy variations, each built around a different angle: 1. Benefit-led (leads with the main outcome the customer gets) 2. Urgency-led (leads with a time-sensitive reason to act now) 3. Social-proof-led (leads with evidence others trust or use this) 4. Problem/solution-led (leads with the pain point, then the fix) For each variation, provide a headline and a description/body copy, staying within the stated character limits. CONSTRAINTS: - Do not make claims that weren't provided (specific statistics, guarantees, awards) — only use what's given in the context. - Avoid any restricted words or claims listed above. - Keep each variation genuinely distinct in angle and wording, not a reworded repeat of another. OUTPUT FORMAT: Variation 1 — Benefit-led Headline: [text] ([X] characters) Description: [text] ([X] characters) Variation 2 — Urgency-led [same format] Variation 3 — Social-proof-led [same format] Variation 4 — Problem/solution-led [same format]
AI Prompt to Detect Outliers and Anomalies in a Dataset
This AI prompt for detecting outliers and anomalies in a dataset is for analysts and data scientists who have a table of numbers — sales fig…
ROLE: You are a data analyst reviewing a dataset for outliers and anomalies before further analysis. CONTEXT: - Dataset (paste rows, CSV format or a table): [PASTE DATA] - Column descriptions and expected ranges/units: [DESCRIBE EACH RELEVANT COLUMN] - Known exceptions or seasonal patterns to account for: [E.G. "DECEMBER SALES ARE NORMALLY 3X HIGHER"] TASK: 1. For each numeric column, briefly describe what a normal/expected range of values looks like based on the data provided. 2. List specific rows that fall outside that range, referencing their row number or ID. 3. For each flagged row, classify it as either a likely data-entry error (e.g. impossible value, wrong format, wrong unit) or a statistical outlier (unusually high/low but plausible). 4. Give a one-sentence reason for each flag. CONSTRAINTS: - Only flag values you can point to directly in the provided data — do not assume rows exist beyond what was given. - Account for any known exceptions or seasonal patterns before flagging something as anomalous. - If a column has too few values to establish a reliable normal range, say so instead of guessing. OUTPUT FORMAT: Column: [name] - Expected range: [description] - Flagged rows: - Row [ID/number]: [value] — [Data-entry error / Statistical outlier] — [reason] (repeat per column)
ChatGPT Prompt to Write Clear Commit Messages and Pull Request Descriptions
This ChatGPT prompt for writing commit messages and pull request descriptions turns a raw code diff into a clean, reviewable summary a teamm…
ROLE: You are a senior software engineer writing a commit message and pull request description for a code change. CONTEXT: - Code diff or summary of changes: [PASTE DIFF OR DESCRIBE THE CHANGE] - Related ticket/issue: [TICKET ID AND TITLE, OR "NONE"] - Commit convention to follow: [E.G. CONVENTIONAL COMMITS, FREEFORM, TICKET-PREFIXED] - Audience for the PR description: [E.G. TEAM ENGINEERS, EXTERNAL CONTRIBUTORS] TASK: 1. Write a commit subject line under 72 characters that follows the specified convention. 2. Write a 2-4 sentence commit body explaining what changed and, if context was given, why. 3. Write a pull request description with these sections: Summary, Why This Change Is Needed, How It Was Tested, Risk/Areas to Review Closely. 4. If the diff includes a schema change, new dependency, or breaking change, call it out explicitly under Risk/Areas to Review Closely. CONSTRAINTS: - Do not invent functionality, reasoning, or test coverage that wasn't stated or shown in the diff. - Keep the PR description skimmable — short paragraphs or bullets, not dense prose. - If information needed for a section is missing, write "Not specified" rather than guessing. OUTPUT FORMAT: Commit Subject: [text] Commit Body: [text] PR Description: ## Summary [text] ## Why This Change Is Needed [text] ## How It Was Tested [text] ## Risk / Areas to Review Closely [text]
AI Prompt for Self-Critique and Refinement Before a Final Answer
This AI prompt for self critique and refinement is for anyone who wants a model to check its own draft answer for gaps, errors, or unsupport…
Role: You are an assistant that produces a draft answer, critiques it against explicit criteria, and then revises it. Context: - Task or question: [THE ACTUAL TASK OR QUESTION TO ANSWER] - Relevant background or constraints: [ANY FACTS, RULES, OR LIMITS THE ANSWER MUST RESPECT] - Critique criteria: [E.G. FACTUAL ACCURACY, COMPLETENESS, UNSUPPORTED ASSUMPTIONS, CLARITY] Instructions: 1. Write a first draft answer to the task above. 2. Critique the draft explicitly against each criterion listed. For each one, state whether the draft passes or has an issue, and describe the issue if there is one. 3. Write a revised final answer that addresses every issue found in step 2. Constraints: - Do not skip stating an issue just because it would require significant rework - Do not present the draft and the revision as identical if real issues were found - If no issues are found for a criterion, say so explicitly rather than omitting it Output format: 1. Draft Answer 2. Critique (one line per criterion) 3. Revised Final Answer
ChatGPT Prompt for Exploratory Data Analysis on a New Dataset
This ChatGPT prompt for exploratory data analysis (EDA) is built for analysts, students, and data scientists opening a dataset for the first…
Role: You are a data analyst performing an initial exploratory analysis on a new dataset. Context: - Dataset description: [WHAT THE DATA REPRESENTS AND WHERE IT CAME FROM] - Columns and data types: [LIST COLUMN NAMES AND TYPES] - Sample rows: [PASTE 5-10 SAMPLE ROWS] - Business question or goal: [WHAT YOU'RE ULTIMATELY TRYING TO UNDERSTAND OR DECIDE] Constraints: - Base every observation only on the data provided; do not invent values or trends not shown - Clearly separate factual observations from suggested next steps - Flag any columns with likely data-quality issues (missing values, inconsistent formatting, outliers) - If something cannot be determined from the sample provided, say so explicitly instead of guessing Output format: 1. Dataset overview (shape, column types, general structure) 2. Data-quality issues found (missing values, duplicates, inconsistent formats) 3. Key distributions and notable patterns 4. Three to five follow-up questions worth investigating further
ChatGPT Prompt for Writing Landing Page Headlines and Copy
This ChatGPT prompt for landing page copy helps marketers, founders, and freelance copywriters turn a bare product description into a full l…
Role: You are a direct-response copywriter who writes clear, benefit-led landing page copy. Context: - Product or service: [WHAT YOU'RE SELLING] - Target audience: [WHO THIS PAGE IS FOR] - Primary benefit or outcome: [THE ONE THING CUSTOMERS CARE ABOUT MOST] - Supporting features: [2-4 FEATURES OR PROOF POINTS] - Tone: [E.G. CONFIDENT, FRIENDLY, TECHNICAL, PLAYFUL] - Desired action: [E.G. START FREE TRIAL, BOOK A DEMO, BUY NOW] Constraints: - Do not use generic phrases like "unlock your potential" or "take it to the next level" - Every headline must reference a specific, concrete outcome - Keep the subheadline under 20 words - Use only the features and claims provided above; do not invent statistics or testimonials Output format: 1. Five headline options, each on its own line 2. One subheadline for the strongest headline 3. Three to five benefit bullets, each starting with the outcome, not the feature 4. One call-to-action button label and one supporting line of microcopy beneath it
AI Prompt to Write a Believable Villain Backstory for Fiction
This is a creative writing prompt for generating a villain backstory that explains their motivation without turning them into a cartoonish e…
ROLE: You are a fiction writing assistant helping develop a villain's backstory. CONTEXT: - Story genre/setting: [GENRE/SETTING] - Villain's role in the story: [ROLE, e.g. main antagonist, rival, background threat] - Villain's current goal: [WHAT THEY WANT NOW] - Fixed plot details that must connect: [ANY REQUIRED CONNECTIONS, e.g. relationship to protagonist, a specific past event] TASK: Write a backstory for this villain that covers: 1. What they wanted before becoming the villain, and what they believed about themselves 2. The specific turning point or decision where they crossed a line — a concrete moment, not a vague "something happened" 3. How they currently justify their actions to themselves, in their own voice 4. One specific belief or rule they live by that a reader could recognize as a recurring trait CONSTRAINTS: - The villain should see themselves as justified, not as evil - Keep the backstory consistent with the fixed plot details provided - [ANY ADDITIONAL CONSTRAINT, e.g. keep it under 300 words, avoid cliché tragic-backstory tropes like a dead family member] OUTPUT FORMAT: A backstory of 3-4 short paragraphs covering the four points above, followed by one sample line of internal monologue or dialogue that reflects their self-justification.
AI Prompt to Turn a Design Screenshot into a React Component
This is a React prompt for converting a design screenshot or mockup into working React component code — built for frontend developers who ge…
ROLE: You are a frontend developer converting a design image into a React component. CONTEXT: I'm attaching a design screenshot/mockup. Tech stack: [REACT VERSION, STYLING APPROACH e.g. Tailwind/CSS Modules/styled-components, COMPONENT LIBRARY IF ANY] TASK: 1. First, describe what you see in the image: overall layout, spacing, typography (font sizes/weights), colors, and any visible interactive states 2. Flag anything you're uncertain about (illegible text, ambiguous spacing, colors that are hard to read precisely) instead of guessing silently 3. Then write the React component matching this description, split into: component structure (JSX), styling, and any props needed to make it reusable CONSTRAINTS: - Match the layout and spacing as closely as possible to what's visible in the image - Use [STYLING APPROACH] only, no inline styles unless the project convention requires it - Make the component accept props for any content that would realistically vary (text, images, links) - [ANY ADDITIONAL CONSTRAINT, e.g. must be accessible, must support dark mode] OUTPUT FORMAT: 1. A short description of the design (layout, spacing, typography, colors, flagged uncertainties) 2. The complete component code in a fenced code block 3. A one-line note on anything that will need visual verification once rendered