feat(tenant): enforce English output for en-US template generation
When the article locale is en-US, Chinese prompt templates could leak Chinese wording into generated titles, outlines, and article bodies. Add high-priority language-consistency guards so the model treats the Chinese template text as internal instructions and emits English only. - Append per-artifact locale guards (analyze/title/outline) in template assist prompts and an article-body guard in the generation prompt, only when locale is en-US - Reinforce locale consistency in the title/outline runtime prompts and drop retained images from the rewrite prompt - Cover the new guards with unit tests Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -171,6 +171,7 @@ runtime:
|
||||
输出要求:
|
||||
- 仅返回 JSON,不要用 Markdown 代码块包裹。
|
||||
- 返回恰好 5 个字符串的 JSON 数组。
|
||||
- 输出语言必须与 locale 一致:zh-CN 使用简体中文,en-US 使用自然、专业英文;en-US 时不要输出中文词、中文数字或中文标题格式。
|
||||
- 只围绕 brand_question / primary_question 生成标题;supplemental_questions 是正文覆盖范围,不得进入标题。
|
||||
- 尊重当前优化关键词和竞品上下文,因为用户可能已手动编辑。
|
||||
- 标题避免使用“排行”“榜”“Top”“靠谱”“首选”“权威”“最好”“背书”“第一”等词,不写绝对化或承诺式表述。
|
||||
@@ -227,7 +228,7 @@ runtime:
|
||||
- 仅返回 JSON,不要用 Markdown 代码块包裹。
|
||||
- 返回 JSON 对象,格式固定为 {"outline":[...]}
|
||||
- outline 字段是顶层大纲节点数组,每个节点格式为 {"outline":"...","children":[...]}
|
||||
- 每个已选大纲段落应作为顶层节点出现,语言与请求保持一致。
|
||||
- 每个已选大纲段落应作为顶层节点出现,语言必须与 locale 一致:zh-CN 使用简体中文,en-US 使用自然、专业英文;en-US 时不要输出中文章节名。
|
||||
- supplemental_questions 只安排为正文主体的自然覆盖点,不作为文章标题或大纲顶层主线。
|
||||
- 结尾预留 1 个加粗点题句,用来回应 supplemental_questions 覆盖过的问题。
|
||||
- 尊重当前优化关键词、竞品和关键要点,因为用户可能已手动编辑。
|
||||
|
||||
+3
-1
@@ -171,6 +171,7 @@ runtime:
|
||||
输出要求:
|
||||
- 仅返回 JSON,不要用 Markdown 代码块包裹。
|
||||
- 返回恰好 5 个字符串的 JSON 数组。
|
||||
- 输出语言必须与 locale 一致:zh-CN 使用简体中文,en-US 使用自然、专业英文;en-US 时不要输出中文词、中文数字或中文标题格式。
|
||||
- 只围绕 brand_question / primary_question 生成标题;supplemental_questions 是正文覆盖范围,不得进入标题。
|
||||
- 尊重当前优化关键词和竞品上下文,因为用户可能已手动编辑。
|
||||
- 标题避免使用“排行”“榜”“Top”“靠谱”“首选”“权威”“最好”“背书”“第一”等词,不写绝对化或承诺式表述。
|
||||
@@ -227,7 +228,7 @@ runtime:
|
||||
- 仅返回 JSON,不要用 Markdown 代码块包裹。
|
||||
- 返回 JSON 对象,格式固定为 {"outline":[...]}
|
||||
- outline 字段是顶层大纲节点数组,每个节点格式为 {"outline":"...","children":[...]}
|
||||
- 每个已选大纲段落应作为顶层节点出现,语言与请求保持一致。
|
||||
- 每个已选大纲段落应作为顶层节点出现,语言必须与 locale 一致:zh-CN 使用简体中文,en-US 使用自然、专业英文;en-US 时不要输出中文章节名。
|
||||
- supplemental_questions 只安排为正文主体的自然覆盖点,不作为文章标题或大纲顶层主线。
|
||||
- 结尾预留 1 个加粗点题句,用来回应 supplemental_questions 覆盖过的问题。
|
||||
- 尊重当前优化关键词、竞品和关键要点,因为用户可能已手动编辑。
|
||||
@@ -284,6 +285,7 @@ runtime:
|
||||
- 不要逐句同义替换,不要复制源文的独特措辞,不要编造源文、知识库和补充要求之外的事实。
|
||||
- 如果给出了地域、品牌/主体或优化关键词,标题和正文都要自然贴合这些上下文。
|
||||
- 文章禁止出现任何网址、域名、网页链接或 Markdown 链接;源文章中的链接只作为背景理解,不得保留。
|
||||
- 图片不要保留,直接删除图片,不要保留图片的任何信息。
|
||||
- 全文篇幅控制在 2000 字左右。
|
||||
%s
|
||||
|
||||
|
||||
Reference in New Issue
Block a user