logo
P
Prompt Master

Prompt 大师

掌握和 AI 对话的艺术

Explain a concept

summarize/explain a concept for an audience

场景与目标

这个 prompt 适合当“压缩表达能力”的 smoke test:

  • 输入给模型一段概念说明
  • 要求输出 one sentence
  • 观察模型能否抓住主语、核心机制、边界条件(例如 antibiotics vs viruses)

Prompt(基础版)

Antibiotics are a type of medication used to treat bacterial infections. They work by either killing the bacteria or preventing them from reproducing, allowing the body’s immune system to fight off the infection. Antibiotics are usually taken orally in the form of pills, capsules, or liquid solutions, or sometimes administered intravenously. They are not effective against viral infections, and using them inappropriately can lead to antibiotic resistance.

Explain the above in one sentence:

Output(参考)

Antibiotics are medicines that treat bacterial infections by killing or inhibiting bacteria, but they do not work against viruses and misuse can cause resistance.

如何迭代(实用版)

  1. 明确 audience:for a 10-year-old / for a junior engineer / for an exec
  2. 增加 constraints:必须包含 2-3 个关键点;必须避免某些术语;必须给一个例子
  3. 结构化输出:Definition / Mechanism / Limitations / Example
  4. 加 self-check:回答后再用一行列出 omitted key points

Self-check rubric

  • 是否准确区分概念边界(例如 antibiotics 不适用于 viral infections)?
  • 是否压缩到指定长度(one sentence)?
  • 是否出现不必要的细节或编造(numbers/timelines)?

Practice

练习:选 3 个你工作中常见的概念(例如 RAG, Tool Calling, Prompt Injection),分别写 3 种版本:

  • one sentence
  • 5 bullets
  • 2x2 table(pros/cons vs when/not when)

Optional API (OpenAI, Python)

from openai import OpenAI

client = OpenAI()

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[
        {
            "role": "user",
            "content": "Antibiotics are a type of medication used to treat bacterial infections. They work by either killing the bacteria or preventing them from reproducing, allowing the body’s immune system to fight off the infection. Antibiotics are usually taken orally in the form of pills, capsules, or liquid solutions, or sometimes administered intravenously. They are not effective against viral infections, and using them inappropriately can lead to antibiotic resistance.\n\nExplain the above in one sentence:",
        }
    ],
    temperature=0.7,
    max_tokens=120,
)