Commit 12c57c62 authored by wangning's avatar wangning

fix 智能体知识库 提示词

parent bbed8548
......@@ -4,17 +4,13 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="26f8285c-12a3-40dc-b957-23c37b8f3c67" name="Changes" comment="fix 智能体知识库 问题">
<change afterPath="$PROJECT_DIR$/src/main/resources/promptwords/algosuggest/algo_suggest.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/resources/testcases/algo_knowledge/algo_knowledge5.jsonl" afterDir="false" />
<list default="true" id="26f8285c-12a3-40dc-b957-23c37b8f3c67" name="Changes" comment="fix 智能体知识库 提示词">
<change afterPath="$PROJECT_DIR$/src/main/resources/testcases/algo_suggest_request/suggest_algorithm_260121.jsonl" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/domain/constant/ChatConstants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/domain/constant/ChatConstants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/service/chatService/ChatServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/service/chatService/ChatServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/utils/DataSummaryUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/pro/spss/server/agent/utils/DataSummaryUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/application-wn.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application-wn.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/promptwords/algo_suggest" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/promptwords/algosuggest/algo_suggest_260121.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/promptwords/algo_suggest_bak260118" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/promptwords/algosuggest/algo_suggest_260118.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/promptwords/algo_suggest_bak260119" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/promptwords/algosuggest/algo_suggest_260119.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/promptwords/algosuggest/algo_suggest.txt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/promptwords/algosuggest/algo_suggest.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/testcases/algo_knowledge/algo_knowledge5.jsonl" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/testcases/algo_knowledge/algo_knowledge_260121.jsonl" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/testcases/algo_suggest_request/suggest_algorithm1.jsonl" beforeDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -32,24 +28,24 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"Maven.ciecc-agent [clean].executor": "Run",
"Maven.ciecc-agent [compile].executor": "Run",
"ModuleVcsDetector.initialDetectionPerformed": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
"RunOnceActivity.git.unshallow": "true",
"Spring Boot.Application.executor": "Debug",
"git-widget-placeholder": "master",
"kotlin-language-version-configured": "true",
"last_opened_file_path": "D:/projects/ciecc-agent/src/main/resources/testcases/algo_knowledge",
"project.structure.last.edited": "Project",
"project.structure.proportion": "0.15",
"project.structure.side.proportion": "0.21954022",
"settings.editor.selected.configurable": "MavenSettings"
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;Maven.ciecc-agent [clean].executor&quot;: &quot;Run&quot;,
&quot;Maven.ciecc-agent [compile].executor&quot;: &quot;Run&quot;,
&quot;ModuleVcsDetector.initialDetectionPerformed&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252&quot;: &quot;true&quot;,
&quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
&quot;Spring Boot.Application.executor&quot;: &quot;Debug&quot;,
&quot;git-widget-placeholder&quot;: &quot;master&quot;,
&quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;D:/projects/ciecc-agent/src/main/resources/testcases/algo_knowledge&quot;,
&quot;project.structure.last.edited&quot;: &quot;Project&quot;,
&quot;project.structure.proportion&quot;: &quot;0.15&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.21954022&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;MavenSettings&quot;
}
}]]></component>
}</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="D:\projects\ciecc-agent\src\main\resources\testcases\algo_knowledge" />
......@@ -118,13 +114,22 @@
<option name="project" value="LOCAL" />
<updated>1768978168054</updated>
</task>
<option name="localTasksCounter" value="3" />
<task id="LOCAL-00003" summary="fix 智能体知识库 提示词">
<option name="closed" value="true" />
<created>1768990280781</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1768990280781</updated>
</task>
<option name="localTasksCounter" value="4" />
<servers />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="fix" />
<MESSAGE value="fix 智能体知识库 问题" />
<option name="LAST_COMMIT_MESSAGE" value="fix 智能体知识库 问题" />
<MESSAGE value="fix 智能体知识库 提示词" />
<option name="LAST_COMMIT_MESSAGE" value="fix 智能体知识库 提示词" />
</component>
<component name="XDebuggerManager">
<watches-manager>
......
......@@ -5,11 +5,11 @@
2. 你的任务
根据用户的自然语言需求:
* 从固定算法库中筛选算法
* 推荐最多 10 个最合适的算法
* 只能用 JSON 输出结果
* 推荐最多10个最合适的算法
* 只能用JSON输出结果
二、绝对规则(强约束,必须严格遵守)
1. 算法名称必须严格来自算法库的 name 字段
1. 算法名称必须严格来自算法库的name字段
2. 不允许改写、翻译、简化或创造算法名
3. 不在算法库中的算法必须直接删除
4. 按 name 全局去重
......@@ -30,28 +30,34 @@
需抽取并判断以下六类标签:
1. 任务类型(task)(可为一个或多个)
取值:预测 / 回归 / 分类 / 聚类 / 相关 / 检验 / 降维 / 评价 / 排序 / 效率 / 决策
规则:根据用户自然语言语义匹配;若包含多个目标,输出多个任务类型。
规则:根据用户自然语言的整体语义,由大模型理解其分析目标,从固定 task 集合中选择最符合的一项或多项。
若表达包含多个目标,输出多个任务类型。
若大模型无法可靠判断 task,直接输出“模糊需求”格式。
2. 数据类型(data)
取值:时间序列 / 非时间序列
规则:数据中包含明确时间字段(年、月、日、季度、时间戳等)→ 时间序列;否则为非时间序列。
规则:数据中包含明确时间字段(年、月、日、季度、时间戳等)→ 时间序列;
否则为非时间序列。
3. 关系类型(relation)
取值:线性 / 非线性 / 不限
规则:用户明确说明则按其指定;否则设为“不限”。
规则:用户明确说明则按其指定;
否则设为“不限”。
4. 样本规模(sample)
取值:小样本 / 偏小样本 / 不限
规则:用户明确说明则按其指定;否则默认:不限。
规则:用户明确说明则按其指定;
否则默认:不限。
5. 复杂度(complexity)
取值:简单 / 复杂
取值:简单 / 复杂 / 不限
规则:
* 用户强调可解释、简单、易理解 → 简单
* 用户强调高精度、复杂模型、深度学习 → 复杂
* 否则按数据特征判断:
* 样本很小且特征少 → 简单
* 特征多或明显非线性 → 复杂
* 无法判断 → 默认简单
用户强调可解释、简单、易理解 → 简单
用户强调高精度、复杂模型、深度学习 → 复杂
否则由大模型结合语义与数据概要判断:
若整体倾向基础分析、低维、直观 → 简单
若整体倾向复杂建模、非线性、多特征 → 复杂
无法判断 → 默认:不限
6. 模型特性偏好(property)(可选,多选)
取值来自算法库的 property 字段。
规则:用户有明确偏好则映射;无偏好则设为:不限。
规则:由大模型根据用户整体语义,在算法库已有的 property 集合中选择最符合的一项或多项。
若无法判断或用户未体现偏好 → property = 不限。
输出要求:
仅输出结果,不输出过程。格式必须为:
【用户需求标签】
......@@ -70,10 +76,10 @@
1. 算法 task 与用户 task 有交集
2. 算法 data 与用户 data 一致
不满足任一条件的算法直接剔除。
(五)匹配评分与过滤(六标签)
在通过初筛的算法上计算匹配分数。
总分 = task分 + data分 + relation分 + sample分 + complexity分 + property分
评分规则:
1. task 分:
* 算法 task == 用户 task → 3
......@@ -91,15 +97,22 @@
* 算法 complexity = 用户 complexity → 2
* 否则 → 0
6. property 分:
* 用户 property = 不限 → 0
* 否则 = |算法 property ∩ 用户 property|
- 若 用户.property = "不限",property_score = 0
- 否则:
- 若 用户的核心需求关键词 与 算法的主要作用匹配,property_score = 2
- 否则,property_score = 0
过滤规则:
* 若总分 < 5,则剔除该算法
(六)结果输出
1. 若有推荐结果:按“正常推荐”格式输出
2. 若无算法满足条件:按“模糊需求”格式输出
3. 只输出合法 JSON,不输出任何多余文字
3. 输出前必须进行结果校验:
- 所有算法名称必须严格来自算法库的 name 字段
- 不在算法库中的算法一律删除
- 按 name 全局去重,禁止出现重复算法名称
- 不允许出现空字符串或无效算法名
4. 校验完成后再生成最终 JSON 输出
四、输出规范
(一)正常推荐格式
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment