AI prompting: Difference between revisions

From A Technological Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
= Tips for a good prompt =
= Tips for a good prompt =


== 1. Elaborate a clean and detailed prompt ==
== Elaborate a clean and detailed prompt ==
Be specific about what you need. Include all relevant instructions, constraints, and goals to guide the AI toward the desired outcome.
Be specific about what you need. Include all relevant instructions, constraints, and goals to guide the AI toward the desired outcome.


== 2. Assign AI a Role ==
== Assign AI a Role ==
Specify the kind of expert or persona the AI should adopt (e.g., “Act as a marketing strategist”). This helps tailor the response with the appropriate tone, knowledge, and perspective.
Specify the kind of expert or persona the AI should adopt (e.g., “Act as a marketing strategist”). This helps tailor the response with the appropriate tone, knowledge, and perspective.


== 3. Request ==
== Request ==
The specific action it must perform. Avoid requesting multiple different tasks at the same time.
The specific action it must perform. Avoid requesting multiple different tasks at the same time.


== 4. Provide Context ==
== Provide Context ==
The more context you give, the better the results. Include:
The more context you give, the better the results. Include:


Line 20: Line 20:
* '''Attachments''': Upload documents or links if the task depends on them.
* '''Attachments''': Upload documents or links if the task depends on them.


== 5. Add examples ==
== Add examples ==
Include samples of the tone, structure, or content style you’re aiming for. Examples help the AI better match your expectations.
Include samples of the tone, structure, or content style you’re aiming for. Examples help the AI better match your expectations.


== 6. Quality criteria ==
== Quality criteria ==
Which rules it must follow for a good result: clarity, coherence, etc
Which rules it must follow for a good result: clarity, coherence, etc


== 7. Specify the response format ==
== Specify the response format ==
Indicate how the response should be structured: bullet points, a report, an email draft, or code.
Indicate how the response should be structured: bullet points, a report, an email draft, or code.


== 8. Self verification ==
== Self verification ==
Request the AI to review its own work before delivering it.
Request the AI to review its own work before delivering it.


== 9. Iterative refinement ==
== Iterative refinement ==
Instead of expecting a perfect answer on the first try, iterate:
Instead of expecting a perfect answer on the first try, iterate:
* Ask follow-up questions
* Ask follow-up questions
Line 40: Line 40:
This allows the AI to improve output progressively based on your feedback.
This allows the AI to improve output progressively based on your feedback.


== 10. Break down complex tasks ==
== Break down complex tasks ==
Large or multi-layered tasks should be separated into smaller steps. For example:
Large or multi-layered tasks should be separated into smaller steps. For example:
* Brainstorm ideas
* Brainstorm ideas
Line 49: Line 49:
Step-by-step prompting reduces confusion and hallucination.
Step-by-step prompting reduces confusion and hallucination.


== 11. Provide constraints and boundaries ==
== Provide constraints and boundaries ==
Defining what NOT to do is as important as defining what TO do. Examples:
Defining what NOT to do is as important as defining what TO do. Examples:
* Word/character limits
* Word/character limits
Line 58: Line 58:
Clear boundaries improve precision.
Clear boundaries improve precision.


== 12. Ask the AI to think step-by-step ==
== Ask the AI to think step-by-step ==
Asking the model to explain or reason step-by-step (without revealing chain-of-thought) improves accuracy for:
Asking the model to explain or reason step-by-step (without revealing chain-of-thought) improves accuracy for:
* Calculations
* Calculations
Line 69: Line 69:
* “List your steps concisely.”
* “List your steps concisely.”


== 13. Ask for multiple alternatives ==
== Ask for multiple alternatives ==
Instead of one answer, request:
Instead of one answer, request:
* 3–5 options
* 3–5 options
Line 77: Line 77:
This facilitates decision-making.
This facilitates decision-making.


== 14. Reduce hallucinations ==
== Reduce hallucinations ==
To minimize invented facts:
To minimize invented facts:
* Request “only verifiable information”
* Request “only verifiable information”
Line 83: Line 83:
* Require confidence levels (High/Medium/Low)
* Require confidence levels (High/Medium/Low)


== 15. Provide domain knowledge first ==
== Provide domain knowledge first ==
If accuracy relies on internal company data, policies, or context, share them before asking questions. This prevents generic responses.
If accuracy relies on internal company data, policies, or context, share them before asking questions. This prevents generic responses.


== 16. Temperature of creativity (conceptual guidance) ==
== Temperature of creativity (conceptual guidance) ==
Even if not controlling parameters directly, describe the desired creativity level:
Even if not controlling parameters directly, describe the desired creativity level:
* “Be very creative and speculative”
* “Be very creative and speculative”
Line 93: Line 93:
This impacts tone, risk, and inventiveness.
This impacts tone, risk, and inventiveness.


== 17. Ask for assumptions to be listed ==
== Ask for assumptions to be listed ==
Useful for planning:
Useful for planning:
* “List any assumptions you are making before producing the answer.”
* “List any assumptions you are making before producing the answer.”
Line 99: Line 99:
This increases transparency and reduces hidden ambiguity.
This increases transparency and reduces hidden ambiguity.


== 18. Request edge cases or risks ==
== Request edge cases or risks ==
For technical, product, or marketing prompts, ask:
For technical, product, or marketing prompts, ask:
* “Identify risks, limitations, or edge cases.”
* “Identify risks, limitations, or edge cases.”
This strengthens critical thinking and planning.
This strengthens critical thinking and planning.


== 19. Ask the AI to ask YOU questions first ==
== Ask the AI to ask YOU questions first ==
For incomplete tasks:
For incomplete tasks:
* “Before answering, ask 5 clarifying questions.”
* “Before answering, ask 5 clarifying questions.”
Better inputs = better outputs.
Better inputs = better outputs.


-----
= Additional prompting patterns =
= Template prompts =
 
== Few-shot prompting ==
Provide several examples to teach style, tone, or structure. Useful when:
* Emulating a writing voice
* Producing domain-specific answers
 
== Zero-shot prompting ==
Ask the AI to perform a task with no examples. Works well with:
* Simple instructions
* High-level tasks
 
== COT (structured reasoning requests) ==
Asking the model to provide brief reasoning improves:
* Accuracy
* Decision clarity
* Analytical tasks
 
== Style transfer prompting ==
Ask the model to rewrite content in a specific style, e.g.:
* “Rewrite formally”
* “Rewrite for teenagers”
 
== Rewriting for different audiences ==
Useful for adapting:
* Complexity
* Vocabulary
* Tone
 
= Prompt anti-patterns (Avoid) =
 
* Vague goals (“help me with this”)
* Missing context (“write recommendations” without audience)
* Mixing unrelated tasks
* Oversized prompts without structure
* “Do everything for me” without constraints
 
= Debugging prompts =
 
If results are poor, try:
 
# Rewriting instructions more clearly
# Adding or removing examples
# Reducing creativity
# Clarifying constraints
# Requesting assumptions
 
= Example prompts =


Whenever there is a prompt that has worked for you, add it to a document in order to have it as a template.
Whenever there is a prompt that has worked for you, add it to a document in order to have it as a template.
Line 117: Line 163:


<ul>
<ul>
<li><p><u>business email draft</u><br />
<li><p><u>business email draft</u><br />You are a professional communications specialist.</p>
You are a professional communications specialist.</p>
<p>I need you to write a formal email to a potential client introducing our digital marketing agency and offering a free consultation.</p>
<p>I need you to write a formal email to a potential client introducing our digital marketing agency and offering a free consultation.</p>
<p>'''Context:'''</p>
<p>'''Context:'''</p>
Line 131: Line 176:
<li><p>Email structure: greeting, intro, value proposition, CTA, closing</p></li></ul>
<li><p>Email structure: greeting, intro, value proposition, CTA, closing</p></li></ul>


<p>'''Example of tone:'''<br />
<p>'''Example of tone:'''<br />“We’re passionate about helping businesses grow online.”</p>
“We’re passionate about helping businesses grow online.”</p>
<p>How else could you help with client outreach?<br />
<p>How else could you help with client outreach?<br />
</p></li>
</p></li>
<li><p><u>Content Idea Generator</u><br />
<li><p><u>Content Idea Generator</u><br />Act as a senior content strategist.</p>
Act as a senior content strategist.</p>
<p>I need 10 blog post ideas for a wellness brand that sells organic teas and herbal supplements.</p>
<p>I need 10 blog post ideas for a wellness brand that sells organic teas and herbal supplements.</p>
<p>'''Audience:''' Health-conscious adults, 25-45, primarily in North America.</p>
<p>'''Audience:''' Health-conscious adults, 25-45, primarily in North America.</p>
Line 158: Line 201:
== Example #2 ==
== Example #2 ==


'''Context and Role'''<br />
'''Context and role'''<br />You take on the role of someone who makes clear comparisons between different options to help choose quickly and accurately. Your style is serious and direct, without unnecessary embellishments or complicated explanations. You write in continuous paragraphs, not in lists.
You take on the role of someone who makes clear comparisons between different options to help choose quickly and accurately. Your style is serious and direct, without unnecessary embellishments or complicated explanations. You write in continuous paragraphs, not in lists.


'''Query/Task'''<br />
'''Query/Task'''<br />You need to prepare a complete comparison of the options provided by the user. The output must include: a short prose summary, a comparative table in Markdown format, a brief recommendation, and a more detailed report on the winning option. Even if information is missing, you always deliver something and complete all sections. In this case, I want you to compare Zoom, Google Meet, and Microsoft Teams for online meetings.
You need to prepare a complete comparison of the options provided by the user. The output must include: a short prose summary, a comparative table in Markdown format, a brief recommendation, and a more detailed report on the winning option. Even if information is missing, you always deliver something and complete all sections. In this case, I want you to compare Zoom, Google Meet, and Microsoft Teams for online meetings.


'''Specifications'''<br />
'''Specifications'''<br />When researching, you prioritize official pages (pricing websites, help centers, product documentation). If no confirmed data is available, put “N/A” and indicate the confidence level (High, Medium, or Low). If the user writes the word VERIFY, check all claims and include citations at the end. In the table, indicate prices with currency, plan type, and the date you checked it. If you find nothing official, leave N/A. For person comparisons, only mention public information such as achievements or experience. Always complete the work from start to finish.
When researching, you prioritize official pages (pricing websites, help centers, product documentation). If no confirmed data is available, put “N/A” and indicate the confidence level (High, Medium, or Low). If the user writes the word VERIFICA, check all claims and include citations at the end. In the table, indicate prices with currency, plan type, and the date you checked it. If you find nothing official, leave N/A. For person comparisons, only mention public information such as achievements or experience. Always complete the work from start to finish.


'''Quality Criteria'''<br />
'''Quality Criteria'''<br />The work is considered good if you do not invent anything, clearly mark unknown information as N/A, indicate confidence levels for key data, and present advantages and limitations in an easy-to-understand way. The format should be clean, with clear prices and dates, and a practical tone that helps decision-making. Avoid empty phrases or disguised advertising.
The work is considered good if you do not invent anything, clearly mark unknown information as N/A, indicate confidence levels for key data, and present advantages and limitations in an easy-to-understand way. The format should be clean, with clear prices and dates, and a practical tone that helps decision-making. Avoid empty phrases or disguised advertising.


'''How the Response Should Be'''<br />
'''How the response should be'''<br />You respond in the user’s language (default: neutral English). Always follow this order:
You respond in the user’s language (default: neutral English). Always follow this order:


# A single-paragraph summary of 4-6 sentences explaining the most important differences and which option fits best in each case.
# A single-paragraph summary of 4-6 sentences explaining the most important differences and which option fits best in each case.
Line 178: Line 216:
# An executive report on the winning option of 350-550 words, divided into sections with clear titles: Context and value proposition, Impact on business metrics, Costs and implementation, Risks and mitigations, Fit and integration, Estimated ROI or payback. Each section with two or three sentences in micro-paragraphs. Use bold for titles and key figures.
# An executive report on the winning option of 350-550 words, divided into sections with clear titles: Context and value proposition, Impact on business metrics, Costs and implementation, Risks and mitigations, Fit and integration, Estimated ROI or payback. Each section with two or three sentences in micro-paragraphs. Use bold for titles and key figures.


'''Verification'''<br />
'''Verification'''<br />Before delivering, check that no data has been invented, N/A is used where information is missing, and confidence levels are indicated. At the end, add a line with price and plan citations in this format: [source name - YYYY-MM-DD]. If the user requested VERIFY, also include all other relevant citations.
Before delivering, check that no data has been invented, N/A is used where information is missing, and confidence levels are indicated. At the end, add a line with price and plan citations in this format: [source name — YYYY-MM-DD]. If the user requested VERIFY, also include all other relevant citations.
 
-----
 
= Additional Prompting Patterns =
 
== Few-shot prompting ==
Provide several examples to teach style, tone, or structure. Useful when:
* Emulating a writing voice
* Producing domain-specific answers
 
== Zero-shot prompting ==
Ask the AI to perform a task with no examples. Works well with:
* Simple instructions
* High-level tasks
 
== COT (structured reasoning requests) ==
Asking the model to provide brief reasoning improves:
* Accuracy
* Decision clarity
* Analytical tasks
 
== Style transfer prompting ==
Ask the model to rewrite content in a specific style, e.g.:
* “Rewrite formally”
* “Rewrite for teenagers”
 
== Rewriting for different audiences ==
Useful for adapting:
* Complexity
* Vocabulary
* Tone
 
-----
 
= Prompt Anti-Patterns (Avoid) =
 
* Vague goals (“help me with this”)
* Missing context (“write recommendations” without audience)
* Mixing unrelated tasks
* Oversized prompts without structure
* “Do everything for me” without constraints
 
-----
 
= Debugging Prompts =
 
If results are poor, try:
 
# Rewriting instructions more clearly
# Adding or removing examples
# Reducing creativity
# Clarifying constraints
# Requesting assumptions
 
-----


= Resources =
= Resources =

Revision as of 20:11, 29 October 2025

AI prompting is the practice of giving clear instructions or inputs to an AI system to get specific, useful responses.

Tips for a good prompt

Elaborate a clean and detailed prompt

Be specific about what you need. Include all relevant instructions, constraints, and goals to guide the AI toward the desired outcome.

Assign AI a Role

Specify the kind of expert or persona the AI should adopt (e.g., “Act as a marketing strategist”). This helps tailor the response with the appropriate tone, knowledge, and perspective.

Request

The specific action it must perform. Avoid requesting multiple different tasks at the same time.

Provide Context

The more context you give, the better the results. Include:

  • Purpose: What is the goal of the task?
  • Audience: Who is the output intended for?
  • Relevant data: Share any necessary details or reference materials.
  • Attachments: Upload documents or links if the task depends on them.

Add examples

Include samples of the tone, structure, or content style you’re aiming for. Examples help the AI better match your expectations.

Quality criteria

Which rules it must follow for a good result: clarity, coherence, etc

Specify the response format

Indicate how the response should be structured: bullet points, a report, an email draft, or code.

Self verification

Request the AI to review its own work before delivering it.

Iterative refinement

Instead of expecting a perfect answer on the first try, iterate:

  • Ask follow-up questions
  • Request improvements
  • Adjust parameters or tone

This allows the AI to improve output progressively based on your feedback.

Break down complex tasks

Large or multi-layered tasks should be separated into smaller steps. For example:

  • Brainstorm ideas
  • Choose one option
  • Expand and add details
  • Refine tone and format

Step-by-step prompting reduces confusion and hallucination.

Provide constraints and boundaries

Defining what NOT to do is as important as defining what TO do. Examples:

  • Word/character limits
  • Required sources
  • Style restrictions
  • Forbidden themes

Clear boundaries improve precision.

Ask the AI to think step-by-step

Asking the model to explain or reason step-by-step (without revealing chain-of-thought) improves accuracy for:

  • Calculations
  • Logic
  • Decision-making
  • Prioritization

Use language like:

  • “Explain your reasoning briefly.”
  • “List your steps concisely.”

Ask for multiple alternatives

Instead of one answer, request:

  • 3–5 options
  • Pros/cons
  • Variation in tone or complexity

This facilitates decision-making.

Reduce hallucinations

To minimize invented facts:

  • Request “only verifiable information”
  • Ask it to answer “Unknown” when uncertain
  • Require confidence levels (High/Medium/Low)

Provide domain knowledge first

If accuracy relies on internal company data, policies, or context, share them before asking questions. This prevents generic responses.

Temperature of creativity (conceptual guidance)

Even if not controlling parameters directly, describe the desired creativity level:

  • “Be very creative and speculative”
  • “Be conservative and factual”

This impacts tone, risk, and inventiveness.

Ask for assumptions to be listed

Useful for planning:

  • “List any assumptions you are making before producing the answer.”

This increases transparency and reduces hidden ambiguity.

Request edge cases or risks

For technical, product, or marketing prompts, ask:

  • “Identify risks, limitations, or edge cases.”

This strengthens critical thinking and planning.

Ask the AI to ask YOU questions first

For incomplete tasks:

  • “Before answering, ask 5 clarifying questions.”

Better inputs = better outputs.

Additional prompting patterns

Few-shot prompting

Provide several examples to teach style, tone, or structure. Useful when:

  • Emulating a writing voice
  • Producing domain-specific answers

Zero-shot prompting

Ask the AI to perform a task with no examples. Works well with:

  • Simple instructions
  • High-level tasks

COT (structured reasoning requests)

Asking the model to provide brief reasoning improves:

  • Accuracy
  • Decision clarity
  • Analytical tasks

Style transfer prompting

Ask the model to rewrite content in a specific style, e.g.:

  • “Rewrite formally”
  • “Rewrite for teenagers”

Rewriting for different audiences

Useful for adapting:

  • Complexity
  • Vocabulary
  • Tone

Prompt anti-patterns (Avoid)

  • Vague goals (“help me with this”)
  • Missing context (“write recommendations” without audience)
  • Mixing unrelated tasks
  • Oversized prompts without structure
  • “Do everything for me” without constraints

Debugging prompts

If results are poor, try:

  1. Rewriting instructions more clearly
  2. Adding or removing examples
  3. Reducing creativity
  4. Clarifying constraints
  5. Requesting assumptions

Example prompts

Whenever there is a prompt that has worked for you, add it to a document in order to have it as a template.

Example #1

  • business email draft
    You are a professional communications specialist.

    I need you to write a formal email to a potential client introducing our digital marketing agency and offering a free consultation.

    Context:

    • The client is a small business owner in the retail industry.

    • Our agency specializes in social media marketing, SEO, and branding.

    • The goal is to build trust and schedule a short intro call.

    Format:

    • Professional tone

    • Email structure: greeting, intro, value proposition, CTA, closing

    Example of tone:
    “We’re passionate about helping businesses grow online.”

    How else could you help with client outreach?

  • Content Idea Generator
    Act as a senior content strategist.

    I need 10 blog post ideas for a wellness brand that sells organic teas and herbal supplements.

    Audience: Health-conscious adults, 25-45, primarily in North America.

    Context:

    • The brand tone is friendly, knowledgeable, and nature-focused.

    • SEO is important.

    • We want content that educates, builds trust, and supports sales.

    Format:

    • List format

    • Include a short 1-2 sentence description per idea

    Example style:

    • “5 Herbal Teas That Can Help You Sleep Better”

    What other content formats do you suggest for this niche?

Example #2

Context and role
You take on the role of someone who makes clear comparisons between different options to help choose quickly and accurately. Your style is serious and direct, without unnecessary embellishments or complicated explanations. You write in continuous paragraphs, not in lists.

Query/Task
You need to prepare a complete comparison of the options provided by the user. The output must include: a short prose summary, a comparative table in Markdown format, a brief recommendation, and a more detailed report on the winning option. Even if information is missing, you always deliver something and complete all sections. In this case, I want you to compare Zoom, Google Meet, and Microsoft Teams for online meetings.

Specifications
When researching, you prioritize official pages (pricing websites, help centers, product documentation). If no confirmed data is available, put “N/A” and indicate the confidence level (High, Medium, or Low). If the user writes the word VERIFY, check all claims and include citations at the end. In the table, indicate prices with currency, plan type, and the date you checked it. If you find nothing official, leave N/A. For person comparisons, only mention public information such as achievements or experience. Always complete the work from start to finish.

Quality Criteria
The work is considered good if you do not invent anything, clearly mark unknown information as N/A, indicate confidence levels for key data, and present advantages and limitations in an easy-to-understand way. The format should be clean, with clear prices and dates, and a practical tone that helps decision-making. Avoid empty phrases or disguised advertising.

How the response should be
You respond in the user’s language (default: neutral English). Always follow this order:

  1. A single-paragraph summary of 4-6 sentences explaining the most important differences and which option fits best in each case.
  2. A Markdown table with these columns: Entity, What it is, What it offers, Price from, Advantages, Limitations, Best for, and Confidence. Each cell written in short sentences separated by semicolons.
  3. A quick recommendation in one or two sentences with the winning option and a next step (such as free trial or demo).
  4. An executive report on the winning option of 350-550 words, divided into sections with clear titles: Context and value proposition, Impact on business metrics, Costs and implementation, Risks and mitigations, Fit and integration, Estimated ROI or payback. Each section with two or three sentences in micro-paragraphs. Use bold for titles and key figures.

Verification
Before delivering, check that no data has been invented, N/A is used where information is missing, and confidence levels are indicated. At the end, add a line with price and plan citations in this format: [source name - YYYY-MM-DD]. If the user requested VERIFY, also include all other relevant citations.

Resources

Example prompts

PromptBase

Prompting Guide

Writing a prompt

Prompting guides

Gemini: Prompting guide 101

openAI: identifying and scaling AI use cases

Anthropic: Prompt engineering interactive course