根据人设和模式,最终选出好的选题
一个好的选题需要满足以下标准:
符合人设(匹配度 > 0.7)
有市场热度(外部验证得分 > 0.6)
适合当前时间点(时间性得分 > 0.7)
有数据支撑(来源可追溯)
推导路径清晰(可解释、可复现)
好选题综合得分 = 人设匹配度 × 0.4 + 市场热度 × 0.3 + 时间性 × 0.2 + 数据支撑度 × 0.1
其中:
- 人设匹配度 = (实质维度得分 × 0.4 + 形式维度得分 × 0.3 + 意图维度得分 × 0.3)
- 市场热度 = (内部库支持度 × 0.6 + 外部验证热度 × 0.4)
- 时间性 = 当前时间与选题的时间相关性得分
- 数据支撑度 = 是否有明确的来源证据(0 或 1)
阈值:综合得分 ≥ 0.75 才推荐
为了"选出好的选题",系统需要实现以下核心能力:
边探索边比较,比较后收敛,再探索再收敛
识别和利用不同时间维度的创作机会:
把判断逻辑从 AI 黑盒中提取出来,形成可复用、可调优的计算模块
通过多种方式增加输出多样性:
人设画像描述(文本格式)
基于 PRD/create_process.md 定义的流程:
步骤1:灵感生成,路径游走探索
├─ 库内路径:从 Pattern 库/案例库检索
├─ 外搜路径:使用外部热点搜索工具(MCP)
└─ 模型补充路径:库与外搜无法支持时启用
步骤2:灵感与人设匹配度分析
逐个分析灵感是否与人设匹配
步骤3:选题生成
基于匹配的灵感 + 关联 pattern → 输出选题
步骤4:反馈沉淀与自我总结
整合用户反馈与自动评估结论
数据接入:
tool/topic_search.py 已接入爆款库 API(http://192.168.81.89:8000/search)执行控制:
run.py 实现交互式执行(第 324-445 行)pause 命令)、停止(quit 命令)--trace 参数,第 293-299 行)知识管理:
config.py 配置了知识沉淀框架(第 22-40 行)enable_extraction=True:压缩时提取enable_completion_extraction=True:任务完成后提取enable_injection=True:切换 goal 时自动注入模型配置:
config.py 第 14 行:model="claude-sonnet-4.5"presets.json 定义了默认 Agent,包含 core, planning, research, browser, topic_search 技能(第 5-10 行)选题结果保存至 output_1/result.txt,并生成 HTML 可视化报告
代码证据:
PRD/create_process.md 第 17-29 行定义了三条路径的探索方式,第 34 行直接进入"灵感与人设匹配度分析",中间没有路径比较步骤。
现状描述:
与目标的差距: 目标要求"边探索边比较,比较后收敛,再探索再收敛",但当前流程是"一次探索 → 直接用结果"
代码证据:
tool/topic_search.py 第 62-71 行定义的工具函数:
async def topic_search(keywords: List[str]) -> ToolResult:
"""
根据关键词检索数据库中已有帖子的选题
Args:
keywords: 关键词列表
"""
参数只有 keywords,没有时间相关参数。
第 22-33 行的 API 调用:
payload = {"keywords": keywords}
现状描述:
与目标的差距: 目标要求识别时间性(创作可能性/创作方法/公共事件/周期性),但当前系统不支持时间维度查询
代码证据:
run.py 第 166-208 行 _apply_prompt_placeholders 函数将 PRD 文件内容注入 prompt:
system_md_path = base_dir / "PRD" / "system.md"
system_content = system_md_path.read_text(encoding="utf-8")
prompt._messages["system"] = prompt._messages["system"].replace("{system}", system_content)
PRD/create_process.md 第 34 行要求"逐个分析灵感,是否与人设匹配,展示分析过程",但这是通过 prompt 让 AI 执行,没有独立的计算模块。
现状描述:
MatchScoreCalculator 类)与目标的差距: 目标要求逻辑计算推导封装为可复用模块,但当前逻辑耦合在 AI 推理过程中
代码证据:
PRD/create_process.md 第 24 行定义了"外搜路径:使用外部热点搜索工具(MCP)",但在 tool/ 目录下只有 topic_search.py 一个工具文件,该工具仅调用内部 API(http://192.168.81.89:8000)。
presets.json 第 9 行配置了 "browser" 技能,但在 run.py 中没有找到调用外部搜索的代码。
现状描述:
topic_search 工具)与目标的差距: 目标要求"内部库权重 + 外部搜索验证"双重判断,但当前只使用内部库数据
代码证据:
config.py 第 14 行:
model="claude-sonnet-4.5"
run.py 第 260-263 行:
model_from_config = RUN_CONFIG.model
default_model = f"anthropic/{model_from_config}" if "/" not in model_from_config else model_from_config
model = model_from_prompt or default_model
现状描述:
与目标的差距: 目标要求多样性(测模型/票圈/库/agent/trick 自动化),但当前系统为单一模型和数据源
要实现的功能: "探索 → 比较 → 收敛 → 再探索"的迭代流程
需要增加的模块:
路径评分模块(agent/core/path_evaluator.py)
收敛决策模块(agent/core/path_filter.py)
修改工作流程(PRD/create_process.md)
验证方式: 执行后能在输出中看到:
要实现的功能: 支持时间维度的选题检索和判断
需要修改的模块:
扩展 tool/topic_search.py
time_range(如 "recent_7d", "recent_30d", "all")event_type(如 "public_event", "evergreen")recurrence(如 "annual", "seasonal", "one_time")后端 API 改造
验证方式: 能成功调用:
topic_search(
keywords=["养生"],
time_range="recent_7d",
event_type="public_event"
)
要实现的功能: 把判断逻辑从 prompt 中提取为独立 Python 模块
需要增加的模块:
匹配度计算器(agent/core/match_calculator.py)
class PersonaMatchCalculator:
def __init__(self, weights: dict):
self.weights = weights
def calculate(self, persona: dict, inspiration: dict) -> float:
# 计算实质维度得分
# 计算形式维度得分
# 计算意图维度得分
# 加权求和
return score
agent/core/path_comparator.py)
```python
class PathComparator:
def score_path(self, path_result: dict) -> float:
# 评估路径质量
return scoredef rank_paths(self, all_paths: list) -> list:
# 排序路径
return sorted_paths
```
验证方式:
要实现的功能: 在内部库判断基础上增加外部热度验证
需要增加的模块:
外部热度验证工具(tool/external_heat_check.py)
@tool
async def check_external_heat(
topic: str,
platforms: List[str] = ["xiaohongshu", "weibo", "zhihu"]
) -> ToolResult:
# 到各平台搜索关键词
# 返回:帖子数、互动量、最新讨论时间
return heat_score
agent/core/综合评分.py)
python
class CombinedScorer:
def calculate(self, internal_score, external_score):
return internal_score * 0.6 + external_score * 0.4
修改工作流程
验证方式: 选题输出包含:
要实现的功能: 支持多模型对比和多数据源
需要增加的模块:
多模型对比脚本(tools/multi_model_runner.py)
async def compare_models(persona, models):
results = {}
for model in models:
results[model] = await run_with_model(persona, model)
return comparison_report
config.py)
python
DATA_SOURCES = {
"pattern_library": "http://192.168.81.89:8000",
"moments": "待配置",
"comments": "待配置",
}
自动化测试流程(tests/run_batch_test.py)
tests/test_cases.json)tests/results/comparison.html)验证方式: 能看到多模型对比报告,包含:
系统终极目标:根据人设和模式,选出好的选题(综合得分 ≥ 0.75)
当前状态:
为什么现在选不出"好的选题"(主要差距):
如何才能选出"好的选题"(改进优先级):