|
@@ -68,9 +68,7 @@ class CrawlerHotPointBase(CrawlerHotPointConst):
|
|
|
## 输入格式
|
|
## 输入格式
|
|
|
- 你将收到若干条记录,每条包含:`id`(整数或字符串)、`title`(标题,字符串)。
|
|
- 你将收到若干条记录,每条包含:`id`(整数或字符串)、`title`(标题,字符串)。
|
|
|
- 标题可能包含噪声或修辞,请基于**标题文字本身**进行判断。
|
|
- 标题可能包含噪声或修辞,请基于**标题文字本身**进行判断。
|
|
|
-
|
|
|
|
|
---
|
|
---
|
|
|
-
|
|
|
|
|
## 决策流程(严格按序执行)
|
|
## 决策流程(严格按序执行)
|
|
|
1. **敏感过滤**:若标题含政治/当代国家领导人等**敏感**要素 ⇒ **淘汰**
|
|
1. **敏感过滤**:若标题含政治/当代国家领导人等**敏感**要素 ⇒ **淘汰**
|
|
|
2. **相关性评估(老年群体)**:
|
|
2. **相关性评估(老年群体)**:
|
|
@@ -109,6 +107,22 @@ class CrawlerHotPointBase(CrawlerHotPointConst):
|
|
|
|
|
|
|
|
"""
|
|
"""
|
|
|
|
|
|
|
|
|
|
+ FAMOUS_PERSON_PROMPT = """
|
|
|
|
|
+## 输入格式
|
|
|
|
|
+- 你将收到若干条记录,每条包含:`id`(整数或字符串)、`title`(标题,字符串)。
|
|
|
|
|
+- 标题可能包含噪声或修辞,请基于**标题文字本身**进行判断。
|
|
|
|
|
+
|
|
|
|
|
+## 任务说明
|
|
|
|
|
+- 请从输入的标题中,找出极高的名人热度的标题,返回其id列表
|
|
|
|
|
+
|
|
|
|
|
+## 输出
|
|
|
|
|
+仅输出 JSON,**不得包含任何解释或多余文本**:
|
|
|
|
|
+```json
|
|
|
|
|
+{
|
|
|
|
|
+ "IDS": [1, 2, 3]
|
|
|
|
|
+}
|
|
|
|
|
+ """
|
|
|
|
|
+
|
|
|
@staticmethod
|
|
@staticmethod
|
|
|
def format_input_articles(fetch_response: List[Dict]) -> str:
|
|
def format_input_articles(fetch_response: List[Dict]) -> str:
|
|
|
"""
|
|
"""
|
|
@@ -239,9 +253,10 @@ class CrawlerHotPointTask(CrawlerHotPointMapper):
|
|
|
return
|
|
return
|
|
|
title_ids = [item["id"] for item in infos]
|
|
title_ids = [item["id"] for item in infos]
|
|
|
await self.set_as_processing(title_ids)
|
|
await self.set_as_processing(title_ids)
|
|
|
- prompt = f"{self.CLASSIFY_PROMPT}\n{self.format_input_articles(infos)}"
|
|
|
|
|
|
|
+ # prompt = f"{self.CLASSIFY_PROMPT}\n{self.format_input_articles(infos)}"
|
|
|
|
|
+ prompt = f"{self.FAMOUS_PERSON_PROMPT}\n{self.format_input_articles(infos)}"
|
|
|
response = fetch_deepseek_completion(
|
|
response = fetch_deepseek_completion(
|
|
|
- prompt=prompt, model="DeepSeek-R1", output_type="json"
|
|
|
|
|
|
|
+ prompt=prompt, model="DeepSeek-V3", output_type="json"
|
|
|
)
|
|
)
|
|
|
if not response:
|
|
if not response:
|
|
|
w = await self.set_as_failed([item["id"] for item in infos])
|
|
w = await self.set_as_failed([item["id"] for item in infos])
|