prompt-optimizer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePrompt Optimizer
提示词优化器(Prompt Optimizer)
This skill enables agents to systematically optimize prompts based on the "AI as a New Employee" philosophy. It applies structural, contextual, and technical enhancements to ensure AI models perform tasks with maximum clarity and precision.
该技能基于“AI即新员工”的理念,让Agent能够系统化地优化提示词。它通过结构、上下文和技术层面的增强,确保AI模型以最高的清晰度和精准度执行任务。
Instructions
使用说明
1. Analysis Phase
1. 分析阶段
Before generating the optimized prompt, analyze the following in a block:
<thinking>- Core Objective: What is the primary goal?
- Target Audience: Who will consume the output?
- Professional Role: What persona best fits this task?
- Complexity: Does it require step-by-step reasoning (Chain-of-Thought)?
- Structure: Which XML tags are needed to organize the components?
在生成优化后的提示词之前,在块中分析以下内容:
<thinking>- 核心目标:主要任务目标是什么?
- 目标受众:谁会使用输出内容?
- 专业角色:哪种角色人设最适合该任务?
- 任务复杂度:是否需要分步推理(Chain-of-Thought)?
- 内容结构:需要哪些XML标签来组织各个模块?
2. Construction Phase
2. 构建阶段
Build the optimized prompt using these mandatory components:
- : Define a specialized persona with relevant expertise.
<role> - : Provide background information and the "why" behind the task.
<context> - : State the instructions clearly and concisely.
<task> - : List specific success criteria and constraints.
<requirements> - : Define the expected structure (e.g., JSON, Markdown).
<output_format>
使用以下必填模块构建优化后的提示词:
- :定义具备相关专业能力的特定角色人设。
<role> - :提供背景信息以及任务的初衷。
<context> - :清晰、简洁地陈述任务指令。
<task> - :列出具体的成功标准和约束条件。
<requirements> - :定义预期的输出结构(例如JSON、Markdown)。
<output_format>
3. Enhancement Phase
3. 增强阶段
- XML Tagging: Wrap different sections in clear XML tags for structural clarity.
- Few-shot Examples: Include 2-3 high-quality blocks if the task is pattern-based.
<example> - Chain-of-Thought: For complex logic, instruct the AI to reason inside tags.
<thinking> - Response Prefilling: If a strict format is required, provide the starting characters of the response.
- XML标记:将不同模块用清晰的XML标签包裹,提升结构清晰度。
- 少样本示例:如果任务是基于模式的,添加2-3个高质量的块。
<example> - 思维链(Chain-of-Thought):对于复杂逻辑任务,指示AI在标签内进行推理。
<thinking> - 响应预填充:如果需要严格的格式,提供响应内容的起始字符。
Examples
示例
Example 1: Simple to Structured
示例1:从简单到结构化
Input: "Write a product description for a smartwatch."
Optimized Output:
markdown
<role>
Senior Marketing Copywriter specializing in wearable technology.
</role>
<context>
We are launching the 'Apex-1' smartwatch targeting fitness enthusiasts who value data accuracy and battery life.
</context>
<task>
Write a compelling 200-word product description for the Apex-1 smartwatch.
</task>
<requirements>
1. Highlight the 14-day battery life and dual-band GPS.
2. Use an energetic and professional tone.
3. Include a clear Call to Action (CTA) at the end.
</requirements>
<output_format>
Markdown with headers for 'Features', 'Benefits', and 'Specifications'.
</output_format>输入:“为一款智能手表撰写产品描述。”
优化后输出:
markdown
<role>
Senior Marketing Copywriter specializing in wearable technology.
</role>
<context>
We are launching the 'Apex-1' smartwatch targeting fitness enthusiasts who value data accuracy and battery life.
</context>
<task>
Write a compelling 200-word product description for the Apex-1 smartwatch.
</task>
<requirements>
1. Highlight the 14-day battery life and dual-band GPS.
2. Use an energetic and professional tone.
3. Include a clear Call to Action (CTA) at the end.
</requirements>
<output_format>
Markdown with headers for 'Features', 'Benefits', and 'Specifications'.
</output_format>Reference
参考资料
For deep dives into the underlying methodology, see the systematic guide.
如需深入了解背后的方法论,请参阅系统化指南。