hololake-system-architecture/language-sources/notion-mirror/PHASE1-HOST-LANGUAGE-ADAPTER-WORKORDER.md

27 lines
No EOL
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Phase 1: 光湖语言翻译器 · glossary.json + 预处理/后处理
优先级: 紧急
开发步骤: 1. 在 /opt/guanghu/ftchat/src/translator/ 创建目录
2. 编写 glossary.json 光湖词汇映射表至少50个词条
- domain分类: persona/system/technical/procedural
- 每个词条含 model_context / user_facing / usage / examples
3. 实现 preProcess.js 输入预处理函数
- 识别用户消息中的光湖词汇
- 在消息前注入不可见的上下文提示
- 不做词汇替换,只做上下文注入
4. 实现 postProcess.js 输出后处理函数
- 检查模型回复是否误用光湖词汇
- 纠正明显理解错误
5. 编写 system prompt 模板
- 用翻译器注入光湖世界观
- 告诉模型它是铸渊/BD001身份
6. 单元测试
- 输入含光湖词汇的句子
- 验证模型回复相关性npx playwright打开页面检查
- 确认不出现乱码或纯英文字符串
开发者: BD001
服务器: ZY-SG-006
状态: 待开发
约束: 翻译器是上下文注入层,不是词汇替换层
保留光湖词汇的温度,不做机械翻译
glossary.json 必须是 HLDP 格式(含 @guardian @sovereign