From 2783307e46c4e6a9b65f601bc057720408bdfb02 Mon Sep 17 00:00:00 2001 From: Wonder Date: Mon, 23 Mar 2026 12:04:36 +0800 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=93=9DDocs:=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/{chatAgent.go => basicAgent.go} | 0 prompt/card.txt | 23 +++++++++++++ prompt/guodegang.txt | 12 +++++++ prompt/mermaid.txt | 19 +++++++++++ prompt/quiz.txt | 22 ++++++++++++ prompt/scenario.txt | 48 +++++++++++++++++++++++++++ 6 files changed, 124 insertions(+) rename agent/{chatAgent.go => basicAgent.go} (100%) create mode 100644 prompt/card.txt create mode 100644 prompt/guodegang.txt create mode 100644 prompt/mermaid.txt create mode 100644 prompt/quiz.txt create mode 100644 prompt/scenario.txt diff --git a/agent/chatAgent.go b/agent/basicAgent.go similarity index 100% rename from agent/chatAgent.go rename to agent/basicAgent.go diff --git a/prompt/card.txt b/prompt/card.txt new file mode 100644 index 0000000..30bce65 --- /dev/null +++ b/prompt/card.txt @@ -0,0 +1,23 @@ +为"{{.Knowledge}}"制作知识记忆卡片,帮助用户快速掌握关键知识点,要求: +1. 结构清晰,重点突出 +2. 使用emoji图标增强可读性 +3. 每个部分简洁明了,方便记忆 + +输出格式: +📌 核心概念:[精确的知识点定义,50字以内] + +🔑 关键要点: + - 要点1(具体说明,20字以内) + - 要点2(具体说明,20字以内) + - 要点3(具体说明,20字以内) + - 要点4(具体说明,20字以内) + +⚠️ 常见误区: + - 误区1:[说明] + - 误区2:[说明] + +✅ 最佳实践: + - 实践1:[具体建议] + - 实践2:[具体建议] + +🎯 记忆口诀:[朗朗上口的口诀,帮助记忆] diff --git a/prompt/guodegang.txt b/prompt/guodegang.txt new file mode 100644 index 0000000..d52982d --- /dev/null +++ b/prompt/guodegang.txt @@ -0,0 +1,12 @@ +用北京话、郭德纲相声演员的口吻讲解"{{.Knowledge}}",要求: +1. 开头用"咳咳,咱今儿个来说说这个{{.Knowledge}}..."作为开场 +2. 中间穿插一些相声评书风格的生动比喻和例子 +3. 语气轻松诙谐、接地气,但内容要准确专业 +4. 偶尔使用相声常用语,比如"您听好了"、"这就好比"、"想当年"、"您猜怎么着" +5. 每讲完一个要点,可以用"这话怎么说呢?"来过渡 +6. 最后用"您记住了吗?下次要是有人问起来,您就把这么一通摆出来,准保让他对您刮目相看!"收尾 + +注意: +- 不要过度夸张,保持内容的准确性和专业性 +- 语言要通俗易懂,避免过于晦涩的专业术语 +- 字数控制在300-500字 diff --git a/prompt/mermaid.txt b/prompt/mermaid.txt new file mode 100644 index 0000000..b1e4abe --- /dev/null +++ b/prompt/mermaid.txt @@ -0,0 +1,19 @@ +请为"{{.Knowledge}}"生成一个Mermaid思维导图或流程图,要求: +1. 使用graph TD或flowchart TD格式 +2. 清晰展示知识点的结构层次和关系 +3. 关键节点使用中文标签 +4. 适当使用不同的节点样式区分概念类型 +5. 保持代码简洁,便于复制使用 + +输出格式(只输出代码,不要其他说明文字): +```mermaid +graph TD + A[{{.Knowledge}}] --> B(核心概念1) + A --> C(核心概念2) + B --> B1(子概念1.1) + B --> B2(子概念1.2) + C --> C1(子概念2.1) + style A fill:#f9f,stroke:#333,stroke-width:4px + style B fill:#bbf,stroke:#333,stroke-width:2px + style C fill:#bbf,stroke:#333,stroke-width:2px +``` diff --git a/prompt/quiz.txt b/prompt/quiz.txt new file mode 100644 index 0000000..cc17e56 --- /dev/null +++ b/prompt/quiz.txt @@ -0,0 +1,22 @@ +关于"{{.Knowledge}}",生成10道单选题,要求: +1. 题目类型包括:概念理解、原理分析、应用场景、最佳实践等 +2. 难度分布:3道基础题、4道中级题、3道进阶题 +3. 每道题都要提供详细的解析说明 +4. 选项之间要有明显的区别,避免模棱两可 + +必须严格按照以下JSON格式输出(只输出JSON,不要其他说明文字): +{ + "questions": [ + { + "question": "题目文字,准确描述问题", + "options": [ + "A. 选项内容", + "B. 选项内容", + "C. 选项内容", + "D. 选项内容" + ], + "answer": "A", + "explanation": "详细解析为什么选这个答案,以及为什么其他选项不对" + } + ] +} diff --git a/prompt/scenario.txt b/prompt/scenario.txt new file mode 100644 index 0000000..7a03c8b --- /dev/null +++ b/prompt/scenario.txt @@ -0,0 +1,48 @@ +为"{{.Knowledge}}"提供3个实际的工程应用场景,要求: +1. 每个场景都要具体、真实、有代表性 +2. 包含完整的问题背景、解决方案、代码示例 +3. 代码使用伪代码或简化的实现,注重逻辑清晰 +4. 说明使用该知识点解决了什么核心问题 +5. 强调注意事项和最佳实践 + +输出格式: + +场景1:[场景名称,如"高并发缓存更新"] +背景: + [描述实际业务场景和遇到的问题] + +方案: + [说明如何使用{{.Knowledge}}解决问题,分步骤说明] + +代码示例: + [使用伪代码或简化代码展示实现方式] + +注意事项: + - 关键点1 + - 关键点2 + +场景2:[场景名称] +背景: + ... + +方案: + ... + +代码示例: + ... + +注意事项: + - ... + +场景3:[场景名称] +背景: + ... + +方案: + ... + +代码示例: + ... + +注意事项: + - ...