Skip to content

promod-h/mint

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Of course. I'll provide you with a comprehensive guide and template for prompt design, structured as a file you can use and reference.

This "file" is divided into three parts:

The Core Principles: The fundamental rules of effective prompt engineering.

The Prompt Design Template: A reusable template you can copy and fill out for any task.

Example Library: Concrete examples showing the template and principles in action.

Prompt Design File Part 1: Core Principles of Effective Prompt Design Think of a prompt as instructions for a highly intelligent but very literal assistant. Your goal is to eliminate ambiguity.

Be Specific and Explicit: Vague requests get vague results. Instead of "write about AI," say "write a 500-word blog post introduction on the ethical implications of generative AI for creative industries."

Define the Persona/Role: Tell the AI who it should be. This provides context and style.

Example: "Act as a senior software architect..."

Example: "You are a friendly and helpful customer service agent..."

Provide Context: Give the AI the background information it needs. Assume it knows nothing about your specific situation unless you tell it.

State the Goal/Objective: Clearly state what you want to achieve with the output. What is its purpose? Who is it for?

Define the Output Format: Specify how you want the information presented. Bullet points, JSON, a table, Markdown, code, a paragraph, etc.

Use Examples (Few-Shot Prompting): For complex tasks, show the AI an example of the input and the desired output format. This is one of the most powerful techniques.

Assign a Step-by-Step Task (Chain-of-Thought): For complex reasoning, ask the AI to "think step-by-step." This forces it to break down the problem and leads to more accurate results.

Set Constraints: Limit the scope to avoid irrelevant or overly verbose answers. Constraints can include length, style, points to avoid, or specific elements to include.

Part 2: The Prompt Design Template Copy and paste this template for any new task. Filling out each section will dramatically improve your results.

markdown

Prompt Design Template

1. Primary Objective: [What is the single most important goal of this prompt? What should the output achieve?]

2. Persona/Role: [Who is the AI acting as? (e.g., Expert Biologist, Financial Analyst, Shakespeare)]

3. Context/Background: [What key information does the AI need to know? This could be data, a previous message, or a scenario.]

4. Task/Instruction: [What exactly do you want the AI to do? Be specific and action-oriented.]

5. Output Format: [How should the answer be structured? (e.g., JSON, Markdown, bullet points, table, paragraph, code block)]

6. Constraints/Tone: [Any limits on length, style, or content? What tone should be used? (e.g., professional, casual, humorous)]

  • Length: [e.g., "Under 300 words"]
  • Tone: [e.g., "Formal and academic"]
  • Other: [e.g., "Avoid technical jargon", "Include at least three examples"]

7. (Optional) Examples: [Provide an example input and your desired output format.]


FINAL PROMPT:

[Combine all the sections above into a single, fluid, and clear instruction for the AI.] Part 3: Example Library Here are three examples using the template, from simple to complex.

Example 1: Simple Email Composition

Objective: Get a short, polite email to decline a meeting.

Persona: A busy but professional manager.

Context: The meeting was scheduled for tomorrow at 10 AM with a colleague named Sarah.

Task: Draft the email.

Format: Email body text.

Constraints: Brief (2-3 sentences), polite, offer an alternative.

Final Prompt:

"Act as a busy but professional manager. Draft a brief (2-3 sentence) and polite email to my colleague Sarah to decline our meeting scheduled for tomorrow at 10 AM. Offer to reschedule for later in the week. Just provide the email body."

Example 2: Intermediate Data Analysis

Objective: Analyze sales data and provide insights.

Persona: A data analyst.

Context: [Pasted CSV data for monthly sales]

Task: Identify the top-performing month and calculate the total annual revenue.

Format: A bulleted list of key findings, followed by a simple table with the calculations.

Constraints: Be concise. Only use the data provided.

Final Prompt:

"You are a data analyst. Based on the sales data I provide below, please:

Identify the top-performing month by sales.

Calculate the total annual revenue.

Present your answer in a concise bulleted list of key findings, followed by a simple markdown table showing the total for each month and the annual sum.

Here is the data: [CSV Data Here]"

Example 3: Advanced Creative Task (Using an Example)

Objective: Create a product description in a specific brand's style.

Persona: A marketing copywriter for a trendy, minimalist tech brand.

Context: The product is a new smartwatch called "The Nexus Watch." Key features: 10-day battery, health tracking, sleek titanium body.

Task: Write a product description for the website.

Format: 3 short paragraphs.

Constraints: Mimic the style of the example provided below.

Example:

Input (Example Product): "Aero Phone: 256GB storage, ultra-bright display, ceramic build."

Output (Example Description): "Elegance, redefined. The Aero Phone's ceramic form feels like a natural extension of you. Experience stunning clarity with a display designed to be seen anywhere. With ample space for your life's work and play, step into the future without looking back."

Final Prompt:

"Act as a marketing copywriter for a trendy, minimalist tech brand. Write a 3-paragraph product description for our new 'Nexus Watch' (key features: 10-day battery, advanced health tracking, sleek titanium body).

Crucially, mimic the exact style and tone of the example below:

Example for 'Aero Phone': "Elegance, redefined. The Aero Phone's ceramic form feels like a natural extension of you. Experience stunning clarity with a display designed to be seen anywhere. With ample space for your life's work and play, step into the future without looking back."

Now, please write the description for the Nexus Watch in that same style."

Quick-Start Cheat Sheet For simpler tasks, just remember these key elements:

Role: Be [a persona].

Task: Do [a specific action].

Format: Output [a specific format].

Constraints: With [these limits/rules].

Example: "Be a historian. Explain the causes of the French Revolution in three bullet points for a high school student. Use simple language."

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 100.0%