ladderlore
请求新指南
  • 输入服务名称,例如 S3 或 IAM。

概念

Prompt best practices

Habits that raise answer quality: be specific, keep it short, give examples, test and add guardrails.

本课尚未翻译,暂以英文显示。

  • Be specific

    Say the task, audience and format.

  • Be concise

    Cut words that add nothing.

  • Show examples

    Sample answers set the format.

  • Use multiple comments

    Separate, labeled instructions.

  • Add guardrails

    Rules for what is allowed.

  • Experiment

    Test variations, keep the best.

Six habits of good prompts.
Write prompt
Test it
Review answers
  1. 1Write or change the prompt.
  2. 2Run it on sample inputs.
  3. 3Review the answers and go back to refine.
Prompting is a loop of write, test and review.

是什么

Good prompts improve the quality of responses, make the format predictable and cut wrong answers. Prompt engineering also helps you discover what a model can and cannot do.

Be specific: say exactly what you want, for whom, and in what format. Be concise: remove words that add nothing, because long prompts cost tokens and can confuse the model. Show examples when the format matters. Break instructions into separate, clearly labeled lines or comments, so each one is easy to follow and to change. Add guardrails, which are rules for what the model may and may not do.

是什么

Treat a prompt like code you test. Try variations, compare the results, keep notes and save the best version.

要记住

  • Specific and concise: say exactly what you want, in few words.
  • Show examples when the output format matters.
  • Use several short, labeled instructions or comments instead of one long block.
  • Add guardrails: limits on topics, tone and content.
  • Experiment: change one thing at a time and compare.

要记住

  • Keep what works. Good prompts are reused and versioned.

考试中

  • “Make the prompt clear and direct to improve response quality” points to specificity and concision.
  • “Try variations and compare the outputs” describes prompt experimentation.