feat: 提取/评估提示词建材化(规格自由文本+标准单列)

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-29 15:19:19 +08:00
parent bd2d9938d7
commit 8fa3d7a8d0
6 changed files with 103 additions and 16 deletions
+5 -2
View File
@@ -33,11 +33,14 @@ def test_facts_concatenated_between_system_and_context():
def test_facts_absent_from_extractor_prompt():
# extractor/evaluator 不拼事实卡(它们有自己的 prompt,不该看到公司事实)
# Task 4 起 extractor/evaluator 含通用品类词(HDPE/PVC等字段示例)——
# 隔离断言只针对品牌/公司事实标记(HESUPIPE),不再卡通用品类词
from app.services.ai_service import EVALUATOR_PROMPT, EXTRACTOR_PROMPT
assert "HESUPIPE" not in EXTRACTOR_PROMPT
assert "HDPE" not in EXTRACTOR_PROMPT
assert "HESUPIPE" not in EVALUATOR_PROMPT
assert "HDPE" not in EVALUATOR_PROMPT
# 河南和硕/和硕集团 等公司主体信息同样不得泄入
assert "和硕" not in EXTRACTOR_PROMPT
assert "和硕" not in EVALUATOR_PROMPT
def test_facts_no_auto_words():