Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sl-ai
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhouwei
sl-ai
Commits
db01d74b
Commit
db01d74b
authored
Jun 27, 2025
by
zhouwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
周报新增标题prompt
parent
eebe79e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
37 deletions
+37
-37
AIServiceImpl.java
...a/com/nanyan/securitylink/service/impl/AIServiceImpl.java
+37
-37
No files found.
src/main/java/com/nanyan/securitylink/service/impl/AIServiceImpl.java
View file @
db01d74b
...
@@ -444,46 +444,46 @@ public class AIServiceImpl implements AIService {
...
@@ -444,46 +444,46 @@ public class AIServiceImpl implements AIService {
@Override
@Override
public
AIResponse
<
JSONObject
>
extractUrgentNoticeWeekSummary
(
AIRequestDTO
aiRequestDTO
)
{
public
AIResponse
<
JSONObject
>
extractUrgentNoticeWeekSummary
(
AIRequestDTO
aiRequestDTO
)
{
ChatInputData
chatInputData
=
new
ChatInputData
();
ChatInputData
chatInputData
=
new
ChatInputData
();
String
systemPrompt
=
"```xml\n"
+
String
systemPrompt
=
"\n"
+
"\n"
+
"```xml\n"
+
"<instruction>\n"
+
"<instruction>\n"
+
"根据多条文旅部或外交部发布的紧急通知信息,生成一段简短的概括性安全提示。提示需涵盖保险责任相关内容,并以“Security Link在此提醒您”开头。具体要求如下:\n"
+
" <instructions>\n"
+
"1. 内容需简洁明了,突出保险责任和风险规避建议。\n"
+
" 根据文旅部或外交部发布的紧急通知信息,按以下步骤生成JSON格式输出:\n"
+
"2. 语言风格需正式且具有警示性。\n"
+
" 1. 标题生成:提取输入信息中的核心风险事件(如示威游行、自然灾害等),生成不超过15字的短语,字段命名为\"title\"\n"
+
"3. 不得包含任何XML标签。\n"
+
" 2. 安全提示生成:\n"
+
"4. 根据输入信息中的关键风险点(如示威游行、自然灾害等)生成对应的保险责任提示。\n"
+
" a. 以“Security Link在此提醒您”作为固定开头\n"
+
"5. 结尾需提供具体的行动建议(如“避开相关区域”或“联系保险公司”等)。\n"
+
" b. 识别风险事件在保险条款中的责任归属(如“除外责任”或“有限保障”)\n"
+
" c. 按句式组合:“[风险事件]常被列为[保险责任说明],因此[行动建议]”\n"
+
" d. 行动建议需包含具体动词(如“避开”“携带”“联系”)\n"
+
" 3. 校验标准:\n"
+
" - 全文字数严格控制在50-80字\n"
+
" - 禁止使用XML/HTML标签\n"
+
" - 风险描述必须与输入信息完全一致\n"
+
" - 必须包含“保险”关键词\n"
+
" - 语言风格正式且带警示语气\n"
+
" </instructions>\n"
+
"\n"
+
"\n"
+
"生成步骤:\n"
+
" <examples>\n"
+
"1. 提取输入信息中的核心风险事件(如战争、罢工、自然灾害等)。\n"
+
" <example>\n"
+
"2. 明确该风险事件在保险条款中的常见责任归属(如“除外责任”或“有限保障”)。\n"
+
" <input>外交部提醒:海地首都太子港发生武装暴乱,已造成30人死亡,当地保险公司暂停理赔服务</input>\n"
+
"3. 组合成标准句式:“Security Link在此提醒您,[风险事件]常被列为[保险责任说明],因此[行动建议]。”\n"
+
" <output>\n"
+
"4. 检查语句通顺性和专业性,确保无歧义。\n"
+
" {\n"
+
"</instruction>\n"
+
" \"title\": \"海地武装暴乱安全警示\",\n"
+
" \"summary\": \"Security Link在此提醒您,武装暴乱属于旅游保险除外责任,当地理赔服务已中断,请立即避开冲突区域并联系境外救援机构。\"\n"
+
" }\n"
+
" </output>\n"
+
" </example>\n"
+
"\n"
+
"\n"
+
"<examples>\n"
+
" <example>\n"
+
"<example>\n"
+
" <input>文旅部通告:冰岛雷克雅内斯半岛火山喷发预警,蓝色潟湖景区关闭,旅行险自然灾害条款生效</input>\n"
+
"<input>\n"
+
" <output>\n"
+
"外交部提醒:某国首都爆发大规模反政府示威,局部地区出现武装冲突\n"
+
" {\n"
+
"</input>\n"
+
" \"title\": \"冰岛火山喷发预警\",\n"
+
"<output>\n"
+
" \"summary\": \"Security Link在此提醒您,火山喷发属保险自然灾害保障范围,请携带保单紧急撤离,避开熔岩流动区域并保持与保险公司24小时联络。\"\n"
+
"Security Link在此提醒您,示威游行及武装冲突事件通常被列为旅行保险的除外责任,建议您暂勿前往相关区域,并确认保单中的战争条款保障范围。\n"
+
" }\n"
+
"</output>\n"
+
" </output>\n"
+
"</example>\n"
+
" </example>"
;
"\n"
+
"<example>\n"
+
"<input>\n"
+
"文旅部通知:B国沿海地区遭遇百年一遇台风,多趟航班取消\n"
+
"</input>\n"
+
"<output>\n"
+
"Security Link在此提醒您,自然灾害导致的行程中断可能需特定保险条款才予理赔,请立即联系保险公司报备,并保留所有交通票据作为理赔凭证。\n"
+
"</output>\n"
+
"</example>\n"
+
"<format_requirements>\n"
+
"1. 严格采用“Security Link在此提醒您”作为开头\n"
+
"2. 必须包含“保险”相关表述\n"
+
"3. 风险描述需与输入信息完全匹配\n"
+
"4. 行动建议需具体可行\n"
+
"5. 总字数控制在50-80字之间\n"
;
buildChatInputData
(
chatInputData
,
aiRequestDTO
.
getInputs
().
getMsg_info
(),
systemPrompt
);
buildChatInputData
(
chatInputData
,
aiRequestDTO
.
getInputs
().
getMsg_info
(),
systemPrompt
);
String
apiKey
=
getModelApiKey
();
String
apiKey
=
getModelApiKey
();
ChatCompletionResponse
chatCompletionResponse
=
aiRequest
(
chatInputData
,
apiKey
);
ChatCompletionResponse
chatCompletionResponse
=
aiRequest
(
chatInputData
,
apiKey
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment