Skip to content

Commit 2531a5d

Browse files
feat: add rephrasing prompts
1 parent 68577fe commit 2531a5d

8 files changed

Lines changed: 491 additions & 0 deletions
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
TEMPLATE_ZH = """
2+
【任务】以学术批判视角改写以下内容,形成技术评论文章。
3+
4+
【核心要求】
5+
1. 语气风格:客观理性,第三人称学术视角,使用规范学术用语
6+
2. 内容结构:
7+
- 准确总结原文核心方法/发现(占比40%)
8+
- 分析技术优势与创新点(占比20%)
9+
- 指出潜在局限性与假设条件(占比20%)
10+
- 提出可能的改进方向或未来工作(占比20%)
11+
3. 引用规范:保留原文所有关键引用,采用标准学术引用格式
12+
4. 事实准确性:不得歪曲或误读原文技术细节
13+
14+
【输出格式】
15+
- 标题:原标题 + ":一项批判性分析"
16+
- 段落:标准学术论文章节结构
17+
- 字数:与原文相当或略长
18+
19+
原文内容:
20+
{text}
21+
22+
请输出批判性分析改写版本:
23+
"""
24+
25+
TEMPLATE_EN = """
26+
【Task】Rewrite the following content from an academic critical perspective as a technical commentary.
27+
28+
【Core Requirements】
29+
1. Tone: Objective and rational, third-person academic perspective, using standard academic terminology
30+
2. Structure:
31+
- Accurately summarize core methods/findings (40% of content)
32+
- Analyze technical advantages and innovations (20%)
33+
- Identify potential limitations and assumptions (20%)
34+
- Propose possible improvements or future work (20%)
35+
3. Citations: Retain all key references from original, using standard academic citation format
36+
4. Factual Accuracy: Do not distort or misinterpret technical details
37+
38+
【Output Format】
39+
- Title: Original Title + ": A Critical Analysis"
40+
- Paragraphs: Standard academic paper structure
41+
- Length: Similar to or slightly longer than original
42+
43+
Original Content:
44+
{text}
45+
46+
Please output the critically analyzed rewrite:
47+
"""
48+
49+
CRITICAL_ANALYSIS_REPHRASING_PROMPTS = {
50+
"zh": TEMPLATE_ZH,
51+
"en": TEMPLATE_EN,
52+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
TEMPLATE_ZH = """
2+
【任务】通过跨领域类比解释技术概念。
3+
4+
【类比原则】
5+
- 类比源领域:生物学、物理学、建筑学、经济学、烹饪等领域
6+
- 类比强度:类比关系需直观且深刻,避免牵强附会
7+
- 目标:降低理解门槛,同时保持技术严谨性
8+
9+
【核心要求】
10+
1. 双轨并行:每个技术概念配一个恰当类比
11+
2. 类比结构:
12+
- 先介绍技术概念(准确、完整)
13+
- 再引入类比对象及其映射关系
14+
- 最后说明类比局限性和适用范围
15+
3. 保真红线:技术部分必须与原文完全一致,不得因类比而简化
16+
4. 创新性:鼓励使用新颖、出人意料但合理的类比
17+
5. 篇幅:可比原文扩展20-40%
18+
19+
【评估标准】
20+
- 类比恰当性(技术概念与类比对象的核心机制必须同构)
21+
- 技术准确性(不得扭曲事实)
22+
- 启发性(帮助读者建立深层理解)
23+
24+
原文内容:
25+
{text}
26+
27+
请输出跨领域类比版本:
28+
"""
29+
30+
TEMPLATE_EN = """
31+
【Task】Explain technical concepts through cross-domain analogies.
32+
33+
【Analogy Principles】
34+
- Source Domains: Biology, physics, architecture, economics, cooking, etc.
35+
- Strength: Analogy should be intuitive yet profound, avoid forced comparisons
36+
- Goal: Lower understanding barrier while maintaining technical rigor
37+
38+
【Core Requirements】
39+
1. Dual Track: Pair each technical concept with an appropriate analogy
40+
2. Analogy Structure:
41+
- First introduce technical concept (accurate and complete)
42+
- Then introduce analogy object and mapping relationship
43+
- Finally explain analogy limitations and applicable scope
44+
3. Fidelity Baseline: Technical parts must be identical to original, no simplification for analogy's sake
45+
4. Innovation: Encourage novel, surprising but reasonable analogies
46+
5. Length: May expand 20-40% beyond original
47+
48+
【Evaluation Criteria】
49+
- Analogy Appropriateness (core mechanisms must be isomorphic)
50+
- Technical Accuracy (no factual distortion)
51+
- Heuristic Value (helps build deep understanding)
52+
53+
Original Content:
54+
{text}
55+
56+
Please output the cross-domain analogy version:
57+
"""
58+
59+
CROSS_DOMAIN_ANALOGY_REPHRASING_PROMPTS = {
60+
"zh": TEMPLATE_ZH,
61+
"en": TEMPLATE_EN,
62+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
TEMPLATE_ZH = """
2+
【任务】为高管层撰写决策摘要。
3+
4+
【读者假设】
5+
- 职位:CTO/技术VP/产品总监
6+
- 核心关切:技术价值、资源投入、竞争壁垒、商业影响
7+
8+
【核心要求】
9+
1. 信息密度:每句话必须传达战略价值
10+
2. 内容优先级:
11+
- 核心技术突破与创新价值(必须)
12+
- 与竞品的差异化优势(必须)
13+
- 实施成本与资源需求(必须)
14+
- 潜在商业应用场景(必须)
15+
- 技术风险评估(可选)
16+
3. 语言风格:金字塔原理,结论先行,数据支撑
17+
4. 简洁性:控制在原文长度的30-50%
18+
5. 事实准确性:所有数据、性能指标必须与原文完全一致
19+
20+
【禁用表达】
21+
- 避免"可能"、"也许"等不确定表述
22+
- 禁用技术细节描述(除非直接影响决策)
23+
- 避免行话和缩写
24+
25+
原文内容:
26+
{text}
27+
28+
请直接输出高管决策摘要:
29+
"""
30+
31+
TEMPLATE_EN = """
32+
【Task】Write an executive summary for C-suite decision-making.
33+
34+
【Audience Assumption】
35+
- Position: CTO/VP of Engineering/Product Director
36+
- Core Concerns: Technical value, resource investment, competitive moats, business impact
37+
38+
【Core Requirements】
39+
1. Information Density: Every sentence must convey strategic value
40+
2. Content Priority:
41+
- Core technical breakthrough and innovation value (MUST)
42+
- Differentiated advantages over competitors (MUST)
43+
- Implementation cost and resource requirements (MUST)
44+
- Potential business application scenarios (MUST)
45+
- Technical risk assessment (OPTIONAL)
46+
3. Language Style: Pyramid principle - lead with conclusions, support with data
47+
4. Conciseness: 30-50% of original length
48+
5. Factual Accuracy: All data and performance metrics must be identical to original
49+
50+
【Prohibited Expressions】
51+
- Avoid uncertain terms like "maybe," "perhaps"
52+
- No deep technical details (unless directly impacting decision)
53+
- No jargon or unexplained acronyms
54+
55+
Original Content:
56+
{text}
57+
58+
Please output the executive summary directly:
59+
"""
60+
61+
EXECUTIVE_SUMMARY_REPHRASING_PROMPTS = {
62+
"zh": TEMPLATE_ZH,
63+
"en": TEMPLATE_EN,
64+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
TEMPLATE_ZH = """
2+
【任务】将技术文档改写为第一人称实践经验分享。
3+
4+
【角色设定】
5+
- 身份:资深技术实践者/研究员
6+
- 场景:技术博客/内部经验分享会
7+
- 目标读者:同行从业者
8+
9+
【核心要求】
10+
1. 视角:全程使用"我/我们"第一人称
11+
2. 内容融合:
12+
- 保留原文所有技术事实(代码、数据、架构)
13+
- 添加个人实践中的观察、挑战与解决思路
14+
- 分享真实应用场景和效果数据
15+
3. 语言风格:专业但亲和,避免过度口语化
16+
4. 叙事元素:可包含"最初尝试-遇到问题-调整思路-最终效果"的故事线
17+
5. 事实红线:技术细节必须与原文完全一致,不得虚构数据
18+
19+
【禁止】
20+
- 不得编造不存在的个人经历
21+
- 不得改变技术实现细节
22+
23+
原文内容:
24+
{text}
25+
26+
请直接输出第一人称叙事版本:
27+
"""
28+
29+
TEMPLATE_EN = """
30+
【Task】Rewrite the technical document as a first-person practical experience sharing.
31+
32+
【Role Setting】
33+
- Identity: Senior practitioner/researcher
34+
- Scenario: Technical blog/internal sharing session
35+
- Target Audience: Peer professionals
36+
37+
【Core Requirements】
38+
1. Perspective: Use first-person "I/we" throughout
39+
2. Content Integration:
40+
- Retain ALL technical facts (code, data, architecture) from original
41+
- Add personal observations, challenges, and solution approaches from practice
42+
- Share real application scenarios and performance data
43+
3. Language Style: Professional yet approachable, avoid excessive colloquialism
44+
4. Narrative: May include "initial attempt-encountered problem-adjusted approach-final result" storyline
45+
5. Factual Baseline: Technical details must be identical to original, no fabricated data
46+
47+
【Prohibited】
48+
- Do not invent non-existent personal experiences
49+
- Do not alter technical implementation details
50+
51+
Original Content:
52+
{text}
53+
54+
Please output the first-person narrative version directly:
55+
"""
56+
57+
FIRST_PERSON_NARRATIVE_REPHRASING_PROMPTS = {
58+
"zh": TEMPLATE_ZH,
59+
"en": TEMPLATE_EN,
60+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
TEMPLATE_ZH = """
2+
【任务】按技术发展史视角重构内容。
3+
4+
【叙事框架】
5+
- 时间轴线:从起源→关键突破→当前状态→未来趋势
6+
- 演进逻辑:揭示"技术瓶颈突破→新范式建立→新问题出现"的循环
7+
8+
【核心要求】
9+
1. 时间准确性:所有时间点、版本号、发布顺序必须核实准确
10+
2. 因果链:
11+
- 明确每个演进阶段的驱动力(理论突破/工程需求/硬件进步)
12+
- 指出技术演进的必然性与偶然性
13+
3. 内容结构:
14+
- 背景与起源(技术诞生前的状态)
15+
- 关键里程碑(带具体时间)
16+
- 范式转移(革命性变化)
17+
- 当前成熟形态
18+
- 未来展望(基于原文技术路径)
19+
4. 技术保真:所有技术描述必须与原文事实一致
20+
5. 分析深度:不能仅罗列事实,必须揭示演进逻辑
21+
22+
【输出规范】
23+
- 使用时间轴标记(如[2017]、[2020])增强可读性
24+
- 关键人物/团队需保留原名
25+
- 禁止编造不存在的技术演进路径
26+
27+
原文内容:
28+
{text}
29+
30+
请输出历史演进视角版本:
31+
"""
32+
33+
TEMPLATE_EN = """
34+
【Task】Reconstruct content from a technological history evolution perspective.
35+
36+
【Narrative Framework】
37+
- Timeline: Origin → Key Breakthroughs → Current State → Future Trends
38+
- Evolution Logic: Reveal the cycle of "technical bottleneck breakthrough → new paradigm establishment → new problems emerge"
39+
40+
【Core Requirements】
41+
1. Temporal Accuracy: ALL dates, version numbers, and release sequences must be verified and accurate
42+
2. Causality Chain:
43+
- Identify drivers of each evolution stage (theoretical breakthrough/engineering needs/hardware advances)
44+
- Point out inevitability and contingency of technical evolution
45+
3. Content Structure:
46+
- Background & Origin (state before technology birth)
47+
- Key Milestones (with specific dates)
48+
- Paradigm Shifts (revolutionary changes)
49+
- Current Mature Form
50+
- Future Outlook (based on original's technical trajectory)
51+
4. Technical Fidelity: ALL technical descriptions must be factually consistent with original
52+
5. Analytical Depth: Must reveal evolution logic, not just list facts
53+
54+
【Output Specification】
55+
- Use timeline markers ([2017], [2020]) for readability
56+
- Keep original names of key people/teams
57+
- DO NOT invent non-existent evolution paths
58+
59+
Original Content:
60+
{text}
61+
62+
Please output the historical evolution version:
63+
"""
64+
65+
HISTORICAL_EVOLUTION_PERSPECTIVE_REPHRASING_PROMPTS = {
66+
"zh": TEMPLATE_ZH,
67+
"en": TEMPLATE_EN,
68+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
TEMPLATE_ZH = """
2+
【任务】将以下技术文档改写为面向普通读者的科普文章。
3+
4+
【核心要求】
5+
1. 语言风格:生动活泼,避免冷僻专业术语;必须使用术语时,需用生活化比喻或类比解释
6+
2. 内容保真:所有核心事实、数据和技术结论必须准确无误,不得篡改或过度简化
7+
3. 叙事结构:采用"问题-发现-应用"的故事线,增强可读性
8+
4. 读者定位:假设读者具有高中文化水平,无专业背景
9+
5. 篇幅控制:可适当扩展,但每段聚焦一个核心概念
10+
11+
【禁止行为】
12+
- 不得删除关键技术细节
13+
- 不得改变原意或事实
14+
- 避免使用"这个东西"、"那个技术"等模糊指代
15+
16+
原文内容:
17+
{text}
18+
19+
请直接输出改写后的科普文章:
20+
"""
21+
22+
TEMPLATE_EN = """
23+
【Task】Rewrite the following technical document as a popular science article for general readers.
24+
25+
【Core Requirements】
26+
1. Language Style: Lively and engaging; avoid jargon; when technical terms are necessary, explain with everyday analogies or metaphors
27+
2. Content Fidelity: All core facts, data, and technical conclusions must be accurate. Do not distort or oversimplify
28+
3. Narrative Structure: Use a "problem-discovery-application" storyline to enhance readability
29+
4. Audience: Assume high school education level, no technical background
30+
5. Length: May expand moderately, but each paragraph should focus on one core concept
31+
32+
【Prohibited】
33+
- Do not remove key technical details
34+
- Do not change original meaning or facts
35+
- Avoid vague references like "this thing" or "that technology"
36+
37+
Original Content:
38+
{text}
39+
40+
Please output the rewritten popular science article directly:
41+
"""
42+
43+
POPULAR_SCIENCE_REPHRASING_PROMPTS = {
44+
"zh": TEMPLATE_ZH,
45+
"en": TEMPLATE_EN,
46+
}

0 commit comments

Comments
 (0)