The Mega Prompt Workshop

Created by Eric Wong

From Iterative Learnings to a Reusable AI Tool

Introduction & Goals

A "mega prompt" is a comprehensive set of instructions, rules, and strategies that you provide to an LLM before your specific task. It's a "superprompt" designed to front-load all your hard-won knowledge, transforming a general-purpose AI into a specialized tool for a specific task.

Your goal in this ~1-hour exercise is to build, test, and refine one mega prompt for a research task you frequently perform. You will keep all your files locally.

Part 1: The "Seed" - Gather Your Knowledge

A good mega prompt is built from experience. Instead of starting from a blank page, you'll gather "raw material"—your own knowledge, past examples, and online guides—to seed your prompt.

Task: Gather Your Raw Material

  1. Choose Your Task: Clearly define the one task you want to build a mega prompt for. Be specific!
    • Example (Research): "Summarize 1-3 attached abstracts into a 'Related Work' paragraph."
    • Example (Coding): "Generate Python code for a specific type of data visualization (e.g., a 3-panel matplotlib figure)."
    • Example (Writing): "Draft a polite follow-up email based on a previous email thread and a core request."
    • Example (Analysis): "Extract key themes, sentiments, and actionable suggestions from a page of customer reviews."
  2. Gather Data: Collect any materials you have related to this task. This is your "seed" data.
    • Past Prompts: Copy/paste any prompts you've used before (both successful and failed).
    • Ideal Outputs: Find 1-2 examples of a perfect result for your task.
    • Common Failures: Think about how AI usually gets this task wrong. (e.g., "it's always too verbose," "it forgets to format the output as JSON," "it sounds too robotic").
    • Online Guides: Find a good blog post or guide on your task (e.g., "how to write a good related work section").
  3. Use an LLM to Summarize: Go to a powerful LLM. Paste all your "raw material" (or attach files) and use a prompt like the one below to distill it into actionable rules.
Example Prompt
Act as a prompt engineering analyst. I am trying to build a 'mega prompt' for [Your Specific Task]. I've attached [or will paste below] a collection of my notes, past prompts, ideal outputs, and common failures related to this task. Your task is to analyze all of this information and extract two lists: 1. A "Success List" of clear strategies, rules, and instructions that lead to a good output. 2. A "Failure List" of common problems, pitfalls, and things to avoid. [Paste your notes, examples, etc. here if you cannot attach files]

Part 2: The First Draft - Building Mega Prompt v1.0

Now you will synthesize your "Success List" into your first mega prompt. The best way to do this is to have an LLM help you.

Task: Generate Mega Prompt v1.0

Use the "Success List" from the previous step to generate a structured set of instructions, paying special attention to the Execution Strategy.

Below is a suggested prompt to help you generate your first mega prompt (v1.0). This prompt *itself* is just a starting point, not a 'gold standard.' Feel free to modify it to get a better v1.0. For example, you can change the sections it's asked to generate (e.g., remove 'Style & Tone' or add a new 'Error Handling' section) before you run it.

Example Prompt
Using the "Success List" you just generated, synthesize these points into a single, coherent "mega prompt" template. Structure the mega prompt with the following sections: - **Persona:** "Act as an expert..." - **Core Task:** A general description of the main goal. - **Context:** Instructions on what source material will be provided. - **Execution Strategy:** HOW the AI must think and apply the rules. (e.g., "For writing, you must first create an outline, then generate paragraph by paragraph." or "For coding, you must first create a file-by-file plan, then generate code for each file sequentially.") - **Rules & Constraints:** A strict, bulleted list of "You must..." and "You must not..." - **Style & Tone:** Instructions on the desired writing style. - **Output Format:** Instructions on how the output should be structured.

Result: You now have your "Mega Prompt v1.0".

Part 3: The "Unit Test" - Applying v1.0

A prompt is only as good as its output. You should first test it on a simple, repeatable task.

Task: Run Your Unit Test

  1. Define Your "Unit Test" Task: Create one simple, "clean" task.
    • Example (Figures): "Generate Python code for a 2-panel figure showing a line graph and a bar graph using placeholder data."
    • Example (Related Work): "Write a 3-paragraph related work section based on the attached 2 abstracts."
    • Example (Email): "Draft a follow-up email based on this short thread [paste 1-2 emails]."
  2. Run the Test:
    • Start a new, fresh LLM session (critical to avoid context leaks).
    • Attach your "Mega Prompt v1.0" Google Doc (or paste the text).
    • In the same message (or immediately after), paste your "Unit Test" Task.
    • Run the prompt and save the output (you can copy this into your document for reference).

Part 4: The Iteration Loop - Analyze & Refine

A prompt is rarely perfect on the first try. Your goal now is to critically evaluate the output and refine your prompt. This is a loop: you will analyze, edit, and re-test until you're satisfied.

Task: Analyze, Edit, and Re-Test

  1. Analyze the Output: Look at the output from your last test. Ask yourself:
    • What instructions did the AI follow perfectly?
    • What instructions did it ignore, misunderstand, or get wrong?
    • Strategy Check: Did the AI actually follow your Execution Strategy?
    • What was bad, missing, or incorrect?
    • What new instructions do I need to add to fix these flaws?
  2. Edit Your Prompt: Based on your analysis, go back to your Google Doc or local file and edit your mega prompt. (See the Pro-Tip below). This new version is your "Mega Prompt v2.0".
  3. Re-Run the Test:
    • Start a new, fresh LLM session (this is critical!).
    • Attach your new "Mega Prompt v2.0" file.
    • In the same message, paste the exact same "Unit Test" Task from Part 3.
  4. Compare: Place the new output side-by-side with the old output. Did your changes fix the problems? Did they create new problems?
  5. Repeat! Keep looping through steps 1-4. Continue editing your prompt (v3.0, v4.0...) and re-running the same unit test until it produces a high-quality result consistently.

Conclusion & Next Steps

Congratulations! You've successfully built and refined a reusable "mega prompt". You now have a specialized AI tool, built from your own expertise, that can save you significant time and effort on a recurring task.

What's Next?

  • Stress Test It: The next step (outside of this 1-hour exercise) is to "stress test" your prompt. Try it on harder, more complex, or unusual versions of your task. When it fails, analyze the failure and refine your prompt again.
  • Generalize It: How could you make your prompt useful for other tasks? A good "Related Work" prompt might be adaptable into a "Literature Review" prompt.
  • Save It: Keep your final prompt in your Google Doc or another safe, easy-to-access place. You've earned it!