AgentKnowledgeAgentKnowledgeAgentKnowledge
知识文档AI热点经典好文
AgentKnowledgeAgentKnowledgeAgentKnowledge

深入 Agent,构建你的专属。致力于打造体系化的 AI Agent 开发者学习平台。

学习路径

DocsAI BasicsAgent 工具Agent 实战

社区

GitHub

账号

User CenterLogin

© 2026 AgentKnowledge.cn. 保留所有权利。

  • Agent
  • System Prompt
  • Prompt
  • Prompt Engineering
  • Zero-shot / Few-shot
  • Chain of Thought(CoT)
  • ReAct
  • SKILL(Agent技能)
  • Memory(Agent记忆)
  • RAG
  • Retrieval
  • Embedding
  • Embedding Model
  • Vector Database
  • Cosine Similarity
  • MCP(Model Context Protocol)
  • Tool Calling
  • Function Schema
  • Structured Output
  • OpenClaw
  • Harness Engineering(驾驭工程)
  • Token
  • Context Window
  • Temperature
  • Top-p
  • Transformer 架构
  • 向量数据库
  • Embedding 模型
  • 数据源接入
  • Web Search
  • Memory 系统
  • Function Calling
  • 实战沙箱
  • Prompt

    为什么需要了解 Prompt

    你给模型什么输入,决定了模型给出什么输出。

    很多人把 Prompt 理解成"问模型一个问题",但在真实应用里,Prompt 更像是给模型下达一份结构化任务单——说明白要做什么、背景是什么、不能做什么、结果要什么格式。

    Prompt 设计得好不好,直接决定任务能不能稳定完成。


    什么是 Prompt

    一句话定义:Prompt 是给模型的输入内容,也是模型理解任务的直接依据——它不只是"一句话指令",而是同时包含目标、背景、材料、限制条件和输出要求的任务描述。

    一个结构化 Prompt 通常包含:

    • 指令(Instruction):要模型做什么
    • 上下文(Context):这件事发生在什么背景下
    • 输入数据(Input):需要模型处理的原始内容
    • 约束(Constraints):不能做��么,或者必须满足什么要求
    • 输出格式(Output Format):结果要按什么形式返回

    怎么做:好的 Prompt 怎么写

    具体:避免模糊描述,明确说要什么和不要什么

    结构化:用分段、编号让模型容易理解各部分

    边界清晰:说明特殊情况如何处理,避免模型自行脑补

    可验证:输出要求最好能让你一眼判断对错

    关于怎么系统化地优化 Prompt,可以看 Prompt Engineering 词条。


    常见坑

    • Prompt 写得很长不一定更好:冗长但无结构的 Prompt 往往更难执行
    • 只写目标不写边界:模型会自己补全隐含假设,结果容易跑偏
    • 同时塞入过多要求:目标冲突时,模型会随机权衡,稳定性很差

    记住这一句:Prompt 是给模型的任务单——结构清晰、边界明确、可验证,才是好的 Prompt。

    相关词条:Prompt Engineering · System Prompt

    相关词条

    Prompt EngineeringSystem PromptZero-shot / Few-shotChain of Thought(CoT)

    标签

    提示词prompt输入指令

    目录

    为什么需要了解 Prompt什么是 Prompt怎么做:好的 Prompt 怎么写常见坑