feat(tenant): guard numeric knowledge facts against silent contradiction
Ensure numeric facts present in retrieved knowledge (especially company founding dates) cannot be silently contradicted in generated articles. - Add a typed fact guard that extracts constraints (dates, experience years, etc.) from precise facts, detects source conflicts, and validates generated content before persistence with a bounded repair retry. - Surface fact constraints through KnowledgeContext and render them as a canonical, non-derivable fact block in the knowledge prompt section. - Tighten prompt intro lines to forbid rewriting, mixing old values, or deriving service years from founding dates. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -317,9 +317,10 @@ runtime:
|
||||
avoid_points: "需要规避"
|
||||
extra_requirements: "其他要求"
|
||||
knowledge_prompt_intro_lines:
|
||||
- "以下为可参考的知识库内容,只用于补充事实背景、术语定义、产品信息或表达素材:"
|
||||
- "- 优先吸收并改写,但地址、电话、官网、邮箱、营业时间、日期,以及主营业务、经营范围、服务范围、核心产品等业务事实如需引用,必须严格依据原文,不得写成知识库里没有的业务内容。"
|
||||
- "- 若知识库内容与用户明确输入冲突,以用户输入为准。"
|
||||
- "以下知识库内容是事实来源,可用于补充事实背景、术语定义、产品信息或表达素材:"
|
||||
- "- 地址、电话、官网、邮箱、营业时间、成立/注册日期、年份、数量、面积、人数、比例、价格、认证编号,以及主营业务、经营范围、服务范围、核心产品等业务事实,只能严格依据已提供原文,不得改写数值、混用旧值、推测或补全。"
|
||||
- "- 不得根据成立年份自行推算服务年限、行业经验或其他衍生数字;知识库未明确提供的数字型业务事实不要写。"
|
||||
- "- 若临时输入与下方系统标记的规范事实冲突,以规范事实为准;需要更正时应先更新知识库。"
|
||||
- "- 信息不足时不要虚构事实。"
|
||||
knowledge_snippet_label_format: "知识片段 %d"
|
||||
knowledge_website_markdown:
|
||||
|
||||
Reference in New Issue
Block a user