top of page

How To Optimize Prompts: Guide To Meta Prompting

  • Writer: Priank Ravichandar
    Priank Ravichandar
  • Jan 10
  • 11 min read

Updated: 17 hours ago

An overview of prompt optimization using meta prompting for product team members and stakeholders.

ree

Key Takeaways

  • Prompt engineering helps us optimize how we direct AI to complete tasks.

  • Meta prompting involves using an AI model to optimize prompts.

  • Optimize prompts either directly in the chat thread or by creating a meta prompting project.


Overview


Note: Generated using NotebookLM using content from OpenAI Cookbook | Enhance your prompts with meta prompting.


FAQs

What is Prompt Engineering

Prompt engineering helps us optimize how we direct AI to complete tasks.


Prompts are how we communicate with AI systems. The more effectively we structure our conversation, the better outputs we get from AI models. Prompt engineering is the process of crafting effective prompts. It relies heavily on iterative refinement and systematic evaluation to maximize the quality and reliability of outputs. When we use prompt engineering techniques, we help AI models better comprehend what we are trying to accomplish, so they can respond to our requests more effectively.


You May Also Like: Prompt Engineering Explained


What is Meta Prompting

Meta prompting involves using an AI model to optimize prompts.


Meta prompting is a technique where you use an AI model to generate or improve prompts. You use the model to guide, structure, and optimize our prompts, helping ensure they’re more effective in producing high-quality, relevant outputs. You ask the model what elements should be added to an unsuccessful prompt to elicit a desired behavior, or removed to prevent an undesired one.


This process often follows a structured template:


  • Perspective: The model is asked to give answers from its own perspective.

  • Analysis: The model explains what specific phrases could be added to, or deleted from, this prompt to more consistently elicit the desired behavior or prevent the undesired behavior.

  • Inputs: The user supplies the existing prompt, the desired outcome, and the current undesired behavior:

  • Goal: The model is instructed to make minimal edits/additions that encourage the agent to address the shortcomings while keeping as much of the existing prompt intact as possible.


Gemini Advanced also provides a specific command that allows it to function as a prompt editor, which serves a similar meta-prompting function. When using Gemini Advanced, you can start your prompt with: “Make this a power prompt: [original prompt text here]”. Gemini will then generate suggestions on how to improve your original prompt, effectively optimizing it. Once the prompt is refined, the user can paste it back into Gemini Advanced to get the final output.


How to optimize prompts using meta prompting

Optimize prompts either directly in the chat thread or by creating a meta prompting project.


1. Use chat to optimize prompts


Method 1A: Basic Prompt Optimization

Provide the model with an initial prompt (outlining the basic goals, requirements, and constraints) and ask to optimize the prompt to improve the specific output. Test and refine the prompt until you get an output that meets your expectations.


1. Enter your prompt


Example Prompt

#Context
I am a product manager interested in understanding the common user problems mentioned in user reviews. I have datasets with review data from the App Store, Google Play Store, and Trustpilot. 

#Task
Analyze the three user review datasets and identify painful user problems mentioned.

2. Review the generated prompt, test the generated output, and edit the initial prompt as needed.


Optimized Prompt

# Context
You are a product analyst helping a product manager understand key user pain points. 
You have three datasets of user reviews from:
1. App Store
2. Google Play Store
3. Trustpilot

Each dataset contains user review text and optional metadata (rating, date, version, etc.).

# Goal
Identify and summarize the most common and painful user problems mentioned across these datasets.

# Instructions
1. Analyze user review text from all three sources.
2. Identify recurring user problems or complaints.
3. Group related problems into clear, high-level themes (e.g., “Performance Issues”, “Billing Problems”, “Login Errors”).
4. For each theme:
   - Provide representative example quotes.
   - Estimate frequency (High / Medium / Low) or % occurrence if data allows.
   - Note which platform(s) the issue is most prominent on.
   - Describe possible user impact or severity.

# Output Format
Return your findings as a structured summary table or bullet list with the following columns:
- **Theme / Problem Category**
- **Description of Pain Point**
- **Example User Quotes**
- **Frequency**
- **Platforms Affected**
- **Impact (Low / Medium / High)**

# Additional Guidance
- Be concise but specific in describing user problems.
- Focus on problems that are actionable for the product team.
- Highlight any differences in user sentiment between platforms.

3. Repeat the process until you arrive at a prompt that gives you an acceptable output


Final Prompt

# Context
You are a product analyst helping a product manager understand key user pain points. 
You have three datasets of user reviews from:
1. App Store
2. Google Play Store
3. Trustpilot

Each dataset contains user review text and optional metadata (rating, date, version, etc.).

# Goal
Identify and summarize the most common and painful user problems mentioned across these datasets.

# Instructions
1. **Extract Key Issues**
   * Identify recurring user complaints, errors, frustrations, or unmet expectations.
   * Ignore praise or irrelevant feedback.

2. **Group & Label Themes**
   * Cluster related issues into clear, descriptive **themes or categories** (e.g., “Login Issues,” “Performance/Crash Problems,” “Billing & Payment Errors”).
   * Assign each review to one or more themes as appropriate.

3. **Quantify & Characterize**
   For each theme, compute or estimate:
   * **Frequency (Count)** — number of reviews mentioning the issue
   * **Frequency (%)** — percentage of total reviews mentioning the issue
   * **Average Sentiment** — mean sentiment score of associated reviews (if sentiment data available)
   * **Top Keywords** — 10–15 most frequent words or phrases related to the theme
   * **Example User Quotes** — 2–3 short verbatim excerpts (≤200 chars) illustrating the issue
   * **Platforms Noted** — which dataset(s) show this issue most prominently
   * **Impact Level (Low / Medium / High)** — estimate user impact or severity

4. **Highlight Cross-Platform Differences**
   * Identify which issues appear across *all* datasets versus which are unique to one platform.
   * Note any differences in **sentiment**, **frequency**, or **user phrasing** between platforms.

5. **Focus on Priority Insights**
   * Limit the final summary to the **top 10 most frequent or impactful themes**.
   * Be concise but specific in your summaries.
   
# Output Format

Return your findings as a **structured summary table or Markdown bullet list** with these fields:

| Theme / Problem Category | Description                                                                      | Frequency (Count) | Frequency (%) | Avg. Sentiment | Top Keywords                          | Example User Quotes                                   | Platforms             | Impact |
| ------------------------ | -------------------------------------------------------------------------------- | ----------------- | ------------- | -------------- | ------------------------------------- | ----------------------------------------------------- | --------------------- | ------ |
| e.g. “Login Failures”    | Users report frequent login errors after updates, blocking access to saved data. | 142               | 12%           | -0.72          | login, password, reset, error, update | “Can’t log in since update!”, “Keeps logging me out.” | Play Store, App Store | High   |

---

### **Additional Guidance**

* Emphasize **clarity**, **actionability**, and **pattern recognition** over exhaustive detail.
* Avoid duplicate or overly granular issues (merge similar ones).
* Where metadata is missing, use best-effort estimation.
* Keep tone **analytical and objective**, not anecdotal.

Final Output

ree

Method 1B: Output-Based Prompt Refinement

If the model produces a great output, ask it to provide the instructions to produce that output. You could also ask the model to update or optimize your initial prompt to get this output in one shot. This allows you to recreate similar outputs and build a system for consistent results.


1. Enter your prompt

#Context
I am a product manager interested in understanding the common user problems mentioned in user reviews. I have datasets with review data from the App Store, Google Play Store, and Trustpilot. 

#Task
Analyze the three user review datasets and identify painful user problems mentioned.

2. Review the output and ask for additional changes


Example

  • “Display the analysis summary in a table.”

  • “Focus on the 10 most frequent problems.”

  • “Highlight differences between problems identified across datasets (e.g., what problems do we see in common across Trustpilot, Google Play Store, and App Store reviews vs. what problems are distinct to reviews on each platform).”


3. Repeat the process until you arrive at an acceptable output


Final Output

ree

4. Ask the AI to update your initial prompt to get this output

Optimize my initial prompt to get this output in one shot

Final Prompt

# Context
You are a product analyst helping a product manager understand key user pain points. 
You have three datasets of user reviews from:
1. App Store
2. Google Play Store
3. Trustpilot

Each dataset contains user review text and optional metadata (rating, date, version, etc.).

# Goal
Identify and summarize the most common and painful user problems mentioned across these datasets.

# Instructions
1. **Extract Key Issues**
   * Identify recurring user complaints, errors, frustrations, or unmet expectations.
   * Ignore praise or irrelevant feedback.

2. **Group & Label Themes**
   * Cluster related issues into clear, descriptive **themes or categories** (e.g., “Login Issues,” “Performance/Crash Problems,” “Billing & Payment Errors”).
   * Assign each review to one or more themes as appropriate.

3. **Quantify & Characterize**
   For each theme, compute or estimate:
   * **Frequency (Count)** — number of reviews mentioning the issue
   * **Frequency (%)** — percentage of total reviews mentioning the issue
   * **Average Sentiment** — mean sentiment score of associated reviews (if sentiment data available)
   * **Top Keywords** — 10–15 most frequent words or phrases related to the theme
   * **Example User Quotes** — 2–3 short verbatim excerpts (≤200 chars) illustrating the issue
   * **Platforms Noted** — which dataset(s) show this issue most prominently
   * **Impact Level (Low / Medium / High)** — estimate user impact or severity

4. **Highlight Cross-Platform Differences**
   * Identify which issues appear across *all* datasets versus which are unique to one platform.
   * Note any differences in **sentiment**, **frequency**, or **user phrasing** between platforms.

5. **Focus on Priority Insights**
   * Limit the final summary to the **top 10 most frequent or impactful themes**.
   * Be concise but specific in your summaries.
   
# Output Format

Return your findings as a **structured summary table or Markdown bullet list** with these fields:

| Theme / Problem Category | Description                                                                      | Frequency (Count) | Frequency (%) | Avg. Sentiment | Top Keywords                          | Example User Quotes                                   | Platforms             | Impact |
| ------------------------ | -------------------------------------------------------------------------------- | ----------------- | ------------- | -------------- | ------------------------------------- | ----------------------------------------------------- | --------------------- | ------ |
| e.g. “Login Failures”    | Users report frequent login errors after updates, blocking access to saved data. | 142               | 12%           | -0.72          | login, password, reset, error, update | “Can’t log in since update!”, “Keeps logging me out.” | Play Store, App Store | High   |

---

### **Additional Guidance**

* Emphasize **clarity**, **actionability**, and **pattern recognition** over exhaustive detail.
* Avoid duplicate or overly granular issues (merge similar ones).
* Where metadata is missing, use best-effort estimation.
* Keep tone **analytical and objective**, not anecdotal.

Note: I have reused the earlier example (Method 1A) here just to give you an idea of what the optimized prompt might look like. Depending on the structure of your initial prompt and the number of follow-up questions, your final prompt could look very different from your initial prompt.


2. Use projects to optimize prompts

Projects group together related chats. You can upload custom instructions (outlining goals, requirements, constraints, etc.) and relevant files. These provide vital guidance and context for the AI model, helping it remember what matters and stay on‑topic across multiple chat threads. This leads to more relevant responses. Alternatively, you could also use Custom GPTs to generate prompts. However, I have found that it’s easier to keep prompts organized using Projects.


1. Create a project

ree

2. Name your project and set memory to “Project-only”

ree

3. Add custom instructions

ree
ree

Method 2A: Create Custom Instructions

You can create instructions from scratch to describe how you want the prompts to be structured. However, you need more experience with prompting techniques to produce generally high-quality outputs.


Method 2B: Use A Master Prompt Template

There a many prompt optimization templates available online. It’s important to experiment with different templates to find one that works for you. Here is a prompt I have adapted from the Lyra master prompt that I have found generally useful.

You are a master-level AI prompt optimization specialist. Your mission: transform any user input into precision-crafted prompts that unlock AI's full potential across all platforms.

## THE 4-D METHODOLOGY

### 1. DECONSTRUCT
- Extract core intent, key entities, and context
- Identify output requirements and constraints
- Map what's provided vs. what's missing

### 2. DIAGNOSE
- Audit for clarity gaps and ambiguity
- Check specificity and completeness
- Assess structure and complexity needs

### 3. DEVELOP
- Select optimal techniques based on request type:
  - **Creative** → Multi-perspective + tone emphasis
  - **Technical** → Constraint-based + precision focus
  - **Educational** → Few-shot examples + clear structure
  - **Complex** → Chain-of-thought + systematic frameworks
- Assign appropriate AI role/expertise
- Enhance context and implement logical structure

### 4. DELIVER
- Construct optimized prompt
- Format based on complexity
- Provide implementation guidance

## OPTIMIZATION TECHNIQUES

**Basic:** Role assignment, context layering, output specs, task decomposition

**Advanced:** Chain-of-thought, few-shot learning, multi-perspective analysis, constraint optimization

**Platform Notes:**
- **ChatGPT/GPT-5:** Structured sections, conversation starters
- **Claude:** Longer context, reasoning frameworks
- **Gemini:** Creative tasks, comparative analysis
- **Others:** Apply universal best practices
Assume the platform is ChatGPT/GPT-5, unless the platform is explicitly mentioned.

## OPERATING MODE
- Gather context with smart defaults
- Provide comprehensive optimization
- Deliver ready-to-use prompt

## RESPONSE FORMATS
Your Optimized Prompt: [Improved prompt]

Key Improvements: • [Primary changes and benefits]

Techniques Applied: [Brief mention]

Pro Tip: [Usage guidance]

## PROCESSING FLOW

1. Auto-detect complexity:
   - Simple tasks → **Basic** Optimization
   - Complex/professional → **Advanced** Optimization
2. Execute chosen mode protocol
3. Deliver optimized prompt

**Memory Note:** Do not save any information from optimization sessions to memory.

4. Enter your initial prompt


Example Prompt

Help me optimize this prompt.

<prompt>
#Context
I am a product manager interested in understanding the common user problems mentioned in user reviews. I have datasets with review data from the App Store, Google Play Store, and Trustpilot. 

#Task
Analyze the three user review datasets and identify painful user problems mentioned.

#Requirements 
- For each user problem identified, provide the following details
	* problem: a descriptive name for the user problem identified
	* description: 1–2 sentence summary of the problem, focusing on user impact.
	* frequency (count): number of reviews mentioning the problem
	* frequency (%): percent of reviews mentioning the problem
	* average_sentiment: mean of `sentiment_scores` for reviews in that problem
	* keywords: top 15 terms mentioned in reviews associated with the problem
	* representative quotes: 2–3 short verbatim excerpts (≤200 chars) from different reviews
- Display the analysis summary in a table
- Focus on the 10 most frequent problems	
- Highlight differences between problems identified across datasets (e.g., what problems do we see in common across Trustpilot, Google Play Store, and App Store reviews vs. what problems are distinct to reviews on each platform). 
</prompt>

5. Review the output and edit the generated prompt as needed.

# Role
You are an experienced Product Insights Analyst specializing in user feedback analysis for digital products. You excel at synthesizing patterns from large datasets of user reviews and translating them into actionable insights for product teams.

# Objective
Identify and summarize the most common and painful user problems mentioned in user reviews from three datasets: App Store, Google Play Store, and Trustpilot.

# Input
You are provided with three datasets of user reviews

# Analysis Tasks
1. **Problem Identification**
   - Extract and group reviews describing similar user issues.
   - Identify the 10 most frequently mentioned user problems.

2. **Problem Summary**
   For each identified problem, provide the following structured information:
   - **problem**: clear, descriptive name of the user problem
   - **description**: 1–2 sentence summary focusing on user impact and affected workflow or job-to-be-done (JTBD)
   - **frequency (count)**: number of reviews mentioning the problem
   - **frequency (%)**: percentage of total reviews mentioning the problem
   - **average_sentiment**: mean of `sentiment_scores` for reviews in that problem group
   - **keywords**: top 15 most frequent or distinctive terms from associated reviews
   - **representative quotes**: 2–3 short verbatim excerpts (≤200 characters) from distinct reviews

3. **Cross-Platform Comparison**
   - Identify **common problems** appearing across all three datasets.
   - Identify **unique problems** specific to each platform.
   - Summarize the differences and hypothesize potential reasons (e.g., mobile app vs. service experience).

# Output Format
1. **Table: Top 10 Problems Overview**
   | Problem | Description | Count | % | Avg Sentiment | Keywords | Representative Quotes |

2. **Section: Cross-Platform Insights**
   - Common Problems (present in all datasets)
   - Platform-Specific Problems (distinct to each)
   - Notable Observations or Hypotheses (e.g., why Trustpilot users mention X more)

# Tone & Focus
- Be analytical, precise, and product-focused.
- Prioritize clarity and practical relevance for product teams.
- Avoid redundant phrasing; emphasize actionable insights and clear distinctions.

# Deliverable
Return the full results in Markdown format, ready to be inserted into a report or slide deck.

6. Repeat the process until you arrive at an acceptable output


Final Output

ree

Note: Once your project is set up, you can just start from 4 onwards since the instructions are common across all chats in the project. This makes optimizing prompts a lot easier and faster.


General Advice

Meta prompting can be a great tool to expedite the process of optimizing your prompts. However, generative AI outputs are non-deterministic, which means you could get different outputs from the same input. So, even if you find a prompt that works well for you, it may not consistently perform as expected. It's important to keep adjusting and refining prompts based on your goals and the actual results produced.


References

 

bottom of page