修复意图识别中的同义词处理逻辑,确保同义词字符串正确分割为列表;更新提示模板,明确输出要求,避免对关键词的误解和修改。
This commit is contained in:
@@ -210,6 +210,8 @@ class IntentRecognizer:
|
|||||||
current_key_terms = set()
|
current_key_terms = set()
|
||||||
# 添加向量检索结果
|
# 添加向量检索结果
|
||||||
for result in vector_results:
|
for result in vector_results:
|
||||||
|
if isinstance(result.get('synonymous', []), str):
|
||||||
|
result['synonymous'] = result['synonymous'].split(';')
|
||||||
term = Term(
|
term = Term(
|
||||||
name=result.get('name'),
|
name=result.get('name'),
|
||||||
synonymous=result.get('synonymous', []),
|
synonymous=result.get('synonymous', []),
|
||||||
|
|||||||
@@ -15,8 +15,9 @@ extract_nouns_prompt="""
|
|||||||
- 软件相关:功能模块/操作步骤/报错提示/扩展名后缀名
|
- 软件相关:功能模块/操作步骤/报错提示/扩展名后缀名
|
||||||
- 造价专业:费用类型/计算标准/行业规范
|
- 造价专业:费用类型/计算标准/行业规范
|
||||||
- 电力工程:项目类型/设备型号/工程阶段
|
- 电力工程:项目类型/设备型号/工程阶段
|
||||||
3. 自动展开缩写(如将'导excel'转为'Excel导入')
|
3. 自动展开缩写(如将'导excel'转为'导入Excel')
|
||||||
4. 严格基于用户问题提取关键词,不要输出与用户问题无关的关键词
|
4. 严格基于用户问题提取关键词,不要输出与用户问题无关的关键词
|
||||||
|
5. 不要擅自揣摩、猜测、推断关键词,不要修改关键的信息(如:粘贴excel->导入excel)
|
||||||
|
|
||||||
三、输出格式:
|
三、输出格式:
|
||||||
{output_format}
|
{output_format}
|
||||||
|
|||||||
Reference in New Issue
Block a user