请稍侯

Prompt Engineering Prompt 五要素

04 March 2025

Prompt Engineering

Prompt 五要素
Use Case

**Hacks **

  • Let the model say “I don’t know” to prevent hallucinations
  • Answer the following question only if you know the answer or can make a well-infgrmed guess; otherwise tell me you don’t know it.
  • What was the heaviest hippo ever recorded?

  • Give the model room to “think” before responding
    • Instruction:
      • When you reply, first find exact quotes in the FAl relevant to the user’s question and write them down word for word.
      • This is a space for you to write down relevant content and will not be shown to the user.
      • Once you are done extracting relevant quotes, answer the question.
  • Break complex tasks into subtasks
    • Please follow these steps:

      1. Write three topic sentences arguing for ({STATEMENT}} •
      1. Write three topic sentences arguing against •
      1. Write an essay by expanding each topic sentence from Steps 1 and 2, and adding a conclusion to synthesize the answer.
  • Iterating Tips:
    • Try different prompts to find what works best
    • When attempting few-shot learning, try also including direct instructions
    • Rephrase a direct instruction set to be more or less concise, e.g. taking a previous example of just saying “Translate.’ and expanding on the instruction to say “Translate from English to Spanish.”
    • Try different persona keywords to see how it affects the response style
    • Use fewer or more examples in your few-shot

AI SD 提示词要点