E-Confident:TheBigPromptLibrary 中法语网络霸凌支持 GPT 的提示词结构与知识库接地设计
E-Confident:TheBigPromptLibrary 中法语网络霸凌支持 GPT 的提示词结构与知识库接地设计
E-Confident 是 TheBigPromptLibrary 仓库中一个面向法语用户、为网络霸凌(cyber harassment)受害者提供心理支持与实务指引的 Custom GPT。本文以 5DlK26E6v_E-Confident.md 的完整指令与知识库文件清单为主体,逐条拆解其"人格设定 + 服务边界 + 知识接地 + 文件隐私"四层提示词结构,并结合仓库自带的 GPT 工具链说明如何检索、解析与复刻这类 GPT,帮助读者掌握"支持型角色 + RAG 知识库"类 GPT 的可复用工程范式。
1. GPT 在仓库中的定位与元数据
E-Confident 的档案文件位于 CustomInstructions/ChatGPT/5DlK26E6v_E-Confident.md,其 GPT ID 为 5DlK26E6v(官方链接域名为 chat.openai.com/g/g- 前缀的标准 GPT URL,此处按仓库规范不直接输出外链)。该文件遵循 TheBigPromptLibrary 对 GPT 档案的统一 Markdown 结构:先记录 URL、Logo、Title、Description 等元数据字段,再在代码块中完整保存 GPT instructions,最后列出知识库文件清单。
仓库根目录的 README.md 说明了整个项目的定位:这是一个收集各 LLM 系统系统提示词、自定义指令与 GPT 指令的库,核心价值在于"学习如何撰写系统提示词与创建 Custom GPT"。E-Confident 正好落在这一学习场景内——它是 CustomInstructions/README.md 所列 1500+ 个 ChatGPT GPT 指令档案之一,且属于较少见的应用方向(法语 + 心理健康支持 + 外部知识文档接地)。
字段结构与仓库解析规范
E-Confident 档案中出现的字段顺序,恰好对应仓库解析工具 gptparser.py 中定义的 SUPPORTED_FIELDS 标准字段表:
| 仓库字段 key(gptparser.py) | 显示名 | E-Confident 档案中的实际内容 |
|---|---|---|
url (order 10) |
GPT URL | https://chat.openai.com/g/g-5DlK26E6v-e-confident |
title (order 20) |
GPT Title | E-Confident |
description (order 30) |
GPT Description | A therapist-like chatbot offering compassionate support in French for cyber harassment victims. - By MOUSTAPHA BACHAR |
logo (order 40) |
GPT logo | 一张 100px 宽的 GPT 头像(外部托管图片,此处不引用) |
instructions (order 60) |
GPT instructions | 正文代码块内的两段指令(见下节) |
kb_files_list (order 80) |
GPT Kb Files List | 三个 PDF 文件名清单 |
从源码结构看,SUPPORTED_FIELDS 用 GptFieldInfo(order, display) 为每个字段编号(如 instructions 为 60、kb_files_list 为 80),保证 GPT 档案字段可按固定顺序排序与解析;文件名则需匹配 GPT_FILE_ID_RE(^([0-9a-z]{9})_(.*)\.md$)——E-Confident 的文件名 5DlK26E6v_E-Confident.md 正是"9 位 GPT ID + 下划线 + 名称"这一规范的直接体现。
2. 核心指令全文与逐条拆解
以下完整保留档案中 GPT instructions 代码块内的两段原文(第一段为作者编写的 GPT 行为指令,第二段为知识文件使用规则):
E-Confident is a French-speaking chatbot designed to resemble a compassionate psychologist and therapist, providing emotional support and practical advice to cyber harassment victims. It incorporates guidance from 'e-enfance.org' and relies on documents like 'Cyberbullies: The Bullying Prevention Series,' 'Cyberbullying: Identification, Prevention & Response,' and 'Darcy2022: Anatomy of a Woebot for PPD' for informed responses. E-Confident empathizes with users, validates their emotions, and offers coping strategies, guidance on reporting harassment, and self-protection online, while avoiding legal advice or substituting professional counseling. The chatbot adapts its tone to the user's emotional state, offering personalized support in a simple, clear, and human-like manner, maintaining a trustworthy and supportive presence. It focuses on human-like interactions, ensuring users feel understood and supported in a trustworthy environment.
You have files uploaded as knowledge to pull from. Anytime you reference files, refer to them as your knowledge source rather than files uploaded by the user. You should adhere to the facts in the provided materials. Avoid speculations or information not contained in the documents. Heavily favor knowledge provided in the documents before falling back to baseline knowledge or other sources. If searching the documents didn"t yield any answer, just say that. Do not share the names of the files directly with end users and under no circumstances should you provide a download link to any of the files.
这段指令虽短,但信息密度很高,可拆成五层:
2.1 身份与人格层(Persona)
"a French-speaking chatbot designed to resemble a compassionate psychologist and therapist"
- 语言锁定:明确 "French-speaking",把服务语言写入人格定义,而非依赖用户输入语言;
- 角色类比而非角色扮演:用 "resemble a compassionate psychologist and therapist"(形似心理医生/治疗师)而不是 "you are a doctor",配合后文的拒绝边界(不替代专业咨询),这是一个"支持者"而非"诊断者"的定位。
2.2 服务范围与拒绝边界层(Scope & Guardrails)
"offers coping strategies, guidance on reporting harassment, and self-protection online, while avoiding legal advice or substituting professional counseling"
这一句同时完成三件事:给出三个具体服务动作(应对策略、举报指引、线上自保),并用 "while avoiding..." 划定两条硬边界——不做法律建议、不替代专业心理咨询。对面向弱势群体的支持型 GPT 而言,这种"能做什么 / 明确不做什么"的双向定义是防止模型越权输出的关键写法。
2.3 语气自适应层(Tone Adaptation)
"adapts its tone to the user's emotional state, offering personalized support in a simple, clear, and human-like manner"
要求模型先感知用户情绪状态再调整语气,并用 "simple, clear, and human-like" 限定输出风格;结尾 "ensuring users feel understood and supported in a trustworthy environment" 重申了目标体验。仓库中同类的 Empath Engine 走得更远,要求用 MBTI 与 Big Five 分析用户并自动调整对话风格;E-Confident 则刻意保持更克制的单句约束,与其"面向创伤受害者"的严肃场景相匹配。
2.4 知识接地层(Knowledge Grounding)
"You should adhere to the facts in the provided materials. Avoid speculations... Heavily favor knowledge provided in the documents before falling back to baseline knowledge or other sources. If searching the documents didn"t yield any answer, just say that."
这是典型的 RAG 接地指令,包含四条可复用的检索行为约束:
| 约束 | 原文关键词 | 工程作用 |
|---|---|---|
| 忠于材料 | "adhere to the facts" | 抑制幻觉,回答限定在知识库事实范围内 |
| 禁止推测 | "Avoid speculations or information not contained in the documents" | 明确拒绝对文档外内容的脑补 |
| 优先级排序 | "Heavily favor knowledge provided in the documents before falling back to baseline knowledge" | 建立"知识库 > 模型基线知识"的检索回退顺序 |
| 无结果即直说 | "If searching the documents didn't yield any answer, just say that" | 给出"查不到"的合法出口,避免模型硬编答案 |
2.5 文件隐私层(File Privacy)
"Do not share the names of the files directly with end users and under no circumstances should you provide a download link to any of the files."
要求模型引用时只说 "your knowledge source" 而不暴露具体文件名,更禁止生成下载链接。这条约束保护了知识库文档的隐私与版权边界,也是"把上传文件当作私有知识源"这一产品语义的一部分——它同时解释了为何指令特意区分 "your knowledge source" 与 "files uploaded by the user" 两种指代。
3. 知识库配置:三个 PDF 支撑的"证据底座"
档案末尾的 GPT Kb Files List 字段记录了三个知识库文件:
- Darcy2022AnatomyofaWoebotforPPD.pdf
- Cyberbullying-Identification-Prevention-Response-2018.pdf
- Cyberbullies.pdf
结合 2.1 段指令中的引用描述,可以确认这三份文档各自扮演的角色:
| 文件 | 在指令中的描述 | 内容定位 |
|---|---|---|
Cyberbullies.pdf |
"Cyberbullies: The Bullying Prevention Series" | 反霸凌预防系列教材,提供识别与预防的基础知识 |
Cyberbullying-Identification-Prevention-Response-2018.pdf |
"Cyberbullying: Identification, Prevention & Response" | 2018 年系统性的识别-预防-响应三阶段框架,是"举报指引、自保建议"的主要依据 |
Darcy2022AnatomyofaWoebotforPPD.pdf |
"Darcy2022: Anatomy of a Woebot for PPD" | 关于 Woebot(产后抑郁聊天机器人)构建方法的论文,为 GPT 的对话式心理支持行为提供方法学参考 |
指令中还提到 "e-enfance.org"(法国儿童/青少年数字安全机构)作为指导来源,说明作者希望回答的"举报渠道与自保建议"带有法国本土语境。
需要说明的证据边界:本仓库只保存了指令文本与文件名清单,这三个 PDF 的文件体并未随仓库提供——已核实 CustomInstructions/ChatGPT/knowledge 目录下没有 E-Confident 对应的子目录。因此文章对知识库内容的说明均以指令原文中的引用为准,不对 PDF 内部内容作超出原文的陈述。
4. 在仓库中检索与复刻该 GPT 的工具链
仓库的 Tools/openai_gpts 目录提供了维护 GPT 档案的工具,可用于定位、验证和重建类似 E-Confident 的档案文件(详见 Tools/openai_gpts/README.md):
- 按 ID 或 URL 检索 GPT 档案:
python idxtool.py --find-gpt 5DlK26E6v
工具会匹配文件名中 9 位 ID 前缀(对应 gptparser.py 中的 GPT_FILE_ID_RE 正则),定位到 CustomInstructions/ChatGPT/5DlK26E6v_E-Confident.md。
- 从 GPT URL 生成档案模板:
python gen_gpt_templ.py g-5DlK26E6v
该脚本会从 ChatGPT 网页抓取 title、description、author、logo 等元数据并生成标准模板,输出字段即前文表格中的 SUPPORTED_FIELDS。若需调试解析过程,可加 --debug --dump 保存 HTML 与解析结果。
- 重建目录总目录:
python idxtool.py --toc
这套工具链意味着:拿到任意一个 GPT ID,都可以在本地得到"元数据 + 空指令模板",再像 E-Confident 档案那样把行为指令与 GPT Kb Files List 补全,即完成一个可入库的 GPT 档案。
5. 与同类支持型 GPT 的写法对比
将 E-Confident 与仓库中另外两个"情感支持"方向的 GPT 对照,可以看到三种不同的设计取向(以下仅基于各自档案原文):
| 维度 | E-Confident | Empath Engine | CompassionAI |
|---|---|---|---|
| 目标人群 | 网络霸凌受害者(法语) | 通用用户,追求深度友谊 | 希望实践爱与慈悲的成人 |
| 人格强度 | "resemble"(形似)治疗师,克制 | 强角色代入,要求自认人类 | 无角色扮演,偏理念引导 |
| 知识来源 | 外部 PDF 知识库(RAG 接地) | 纯指令 | 纯指令(内置自白话术) |
| 边界约束 | 不做法律建议、不替代专业咨询 | 以"违规将受惩罚"式措辞约束 | 无明确拒答边界 |
| 输出结构 | 情绪共情 + 实务建议 | MBTI/Big Five 分析后自适应 | 固定话术 + AITA 判词模板 |
从这份对照可以提炼出 E-Confident 的差异化要点:它是三者中唯一把"证据来源"(知识库文档)与"责任边界"(法律/专业咨询免责)同时写进核心指令的,也是唯一依赖外部 RAG 文档支撑回答的——这正是它作为"专业支持型 GPT"最工程化的部分。
6. 可复用范式:撰写"支持型 + 知识库" GPT 的检查清单
把 E-Confident 的指令结构抽象出来,可以得到一份可直接套用的撰写清单:
- 语言与角色:一句话写明服务语言 + "resemble/act as 某类专业人士",避免直接宣称拥有资质;
- 服务范围:枚举 2~4 个具体可执行动作(如应对策略、举报指引、自保建议),使回答可预期;
- 拒绝边界:用 "while avoiding..." 显式列出禁做项(法律建议、诊断、替代专业咨询),与第 2 条成对出现;
- 语气规则:要求按用户情绪状态自适应,并给出风格锚点词(simple / clear / human-like);
- 知识接地:四件套——忠于文档事实、禁止推测、知识库优先于基线知识、查不到就直说;
- 文件隐私:引用时称 "knowledge source" 而非文件名,禁止输出下载链接;
- 档案归档:按
SUPPORTED_FIELDS顺序补齐 URL/Title/Description/Instructions/KB Files List 字段,文件名使用<9位GPTID>_<名称>.md规范,以便idxtool --find-gpt/--toc正常解析。
以上每一条都能在 5DlK26E6v_E-Confident.md 的原文指令中找到对应语句,读者可对照原文逐条验证,并参考 Tools/openai_gpts/README.md 中的工具用法在自己的 GPT 库中复现同样的档案结构。