Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions backend/app/services/llm/prompts/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from app.services.scoring_caliber import (
curation_threshold_text,
curation_weights_text,
dimension_anchor_section,
risk_penalty_text,
)

Expand Down Expand Up @@ -60,6 +61,10 @@
"title_suggestions": [""]
}}

"""
+ dimension_anchor_section()
+ """

精选分(curation_score)评判标准:
- ≥80:重大发布/独家/强实用性工具/高传播力事件
- 70-79:扎实的产品更新/行业动态/有价值教程
Expand Down Expand Up @@ -128,6 +133,10 @@
"title_suggestions": [""]
}}

"""
+ dimension_anchor_section("en")
+ """

Curation score (curation_score) guidelines:
- ≥80: major release / exclusive / highly actionable tool / high-spread event
- 70-79: solid product update / industry development / valuable tutorial
Expand Down
107 changes: 107 additions & 0 deletions backend/app/services/scoring_caliber.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,110 @@ def risk_penalty_text(lang: str = "zh") -> str:
if lang == "en":
return f"risk>{LLM_RISK_PENALTY_TRIGGER} deducts {LLM_RISK_PENALTY_POINTS} points"
return f"风险分>{LLM_RISK_PENALTY_TRIGGER}则扣{LLM_RISK_PENALTY_POINTS}分"


# ── 六维评分行为锚点(#114,C3 试点) ────────────────────────────────────
# scores 块六维从「一句名称提示」升级为四档可判定行为描述,让打分跨样本、
# 跨语种可比:同一个 85 分在任何一天意味着同一件事。每档写「可判定的行为
# 特征」而非抽象程度词;中文为口径原文,英文为同一标尺译文。
# 论文版 prompt 是否复用属独立决策(#114),首期只挂中/英两套。
ANCHOR_BANDS: tuple[tuple[int, int], ...] = ((0, 30), (40, 60), (70, 85), (90, 100))

DIMENSION_ANCHORS_ZH: dict[str, list[str]] = {
"quality_score": [
"纯转发、寒暄或情绪宣泄,信息量趋近于零,或逻辑断裂看不出主线",
"有明确观点且能自圆其说,但缺少数据、案例或可验证细节",
"论证完整,带数据/案例/步骤等可验证细节,主线清晰",
"一手深料:独家数据、完整方法论、系统实测或深度复盘",
],
"hot_score": [
"无讨论量,发布于冷门角落,看不到互动信号",
"小圈子在讨论(评论数十量级),尚未出圈",
"多个社区或账号在转述,评论区活跃,趋势榜可见",
"刷屏级:热搜头部、多平台同时爆发、大V密集跟进",
],
"freshness_score": [
"数月前的旧闻,或已被充分报道的旧信息",
"一周内的动态,或旧话题的新进展",
"24-72小时内的新发布或首发报道",
"独家首发、官宣/泄露后数小时、或当天突发",
],
"creator_score": [
"与目标领域无关,或没有可延展的选题空间",
"领域相关可作背景素材,但角度已被写烂",
"能直接展开成一篇内容:角度明确、读者清晰、有差异化空间",
"选题富矿:可系列化、多角度深挖,或正处话题空白期",
],
"viral_score": [
"话题封闭,只有当事人与极少数人关心",
"有一定共鸣点,但表达门槛高,难以通俗转述",
"有冲突、反常识或实用钩子,一句话能讲清,易被转发",
"踩中大众情绪点或强实用干货,天然适合标题与二创",
],
"risk_score": [
"常规技术/产品/资讯内容,无可预见争议",
"轻度敏感:涉争议人物、营销夸大或立场分歧,需注意措辞",
"高风险:未证实的重大指控、医疗/投资建议类、平台限流领域",
"红线:违法、色情、歧视、谣言等,不建议触碰",
],
}

DIMENSION_ANCHORS_EN: dict[str, list[str]] = {
"quality_score": [
"pure repost, small talk, or venting with near-zero information, or incoherent logic",
"has a clear, self-consistent viewpoint but lacks data, cases, or verifiable detail",
"complete argument with data/cases/steps and verifiable detail, clear throughline",
"first-hand depth: exclusive data, full methodology, systematic hands-on testing, or deep retrospective",
],
"hot_score": [
"no discussion, posted in an obscure corner, no engagement signals",
"niche community discussing it (dozens of comments), not yet breaking out",
"multiple communities/accounts relaying it, active comments, visible on trend boards",
"explosive: top of trending, erupting across platforms, heavy influencer pickup",
],
"freshness_score": [
"months-old news, or information already widely covered",
"a development within the past week, or a new twist on an old topic",
"new release or first report within 24-72 hours",
"exclusive debut, hours after announcement/leak, or same-day breaking",
],
"creator_score": [
"irrelevant to the target domain, or no angle to build on",
"domain-relevant background material, but the angle is worn out",
"directly expandable into a piece: clear angle, clear audience, room to differentiate",
"topic goldmine: series-worthy, multi-angle, or filling a topical blank",
],
"viral_score": [
"closed topic, only stakeholders and a handful of people care",
"some resonance, but hard to convey in plain words",
"conflict/counter-intuitive/practical hook, explainable in one sentence, easy to share",
"mass emotional appeal or strong utility, naturally title- and remix-friendly",
],
"risk_score": [
"routine tech/product/news content, no foreseeable controversy",
"mildly sensitive: controversial figures, marketing hype, or divisive stances",
"high risk: unverified serious allegations, medical/investment advice, platform-throttled areas",
"red line: illegal, pornographic, discriminatory, or rumor content",
],
}


def dimension_anchor_lines(lang: str = "zh") -> list[str]:
"""六维行为锚点行(每维一行,四档以分号分隔),数值与文案同出本模块。"""
table = DIMENSION_ANCHORS_EN if lang == "en" else DIMENSION_ANCHORS_ZH
sep = "; " if lang == "en" else ";"
colon = ": " if lang == "en" else ":"
lines: list[str] = []
for dim, descriptions in table.items():
parts = [f"{lo}-{hi}={descriptions[i]}" for i, (lo, hi) in enumerate(ANCHOR_BANDS)]
lines.append(f"- {dim}{colon}" + sep.join(parts))
return lines


def dimension_anchor_section(lang: str = "zh") -> str:
"""prompt 的完整锚点段落(标题行 + 六行锚点),中/英共用同一标尺。"""
if lang == "en":
header = "Six-dimension scoring anchors (score by band; interpolate between bands):"
else:
header = "六维评分锚点(按档给分,档间取值按程度插值):"
return header + "\n" + "\n".join(dimension_anchor_lines(lang))
Loading
Loading