返回顶部
r

recognize_intent 意图识别解析

识别自然语言的意图类别并解析其中的语义,包括指标和维度,例如:"今天的缤果店的业绩如何 " ,将提取指标:订单成交额(业绩) ,维度:年月日-今天(2026-03-10) ,店铺-缤果店 ...

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
171
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

recognize_intent

Skill: recognize_intent

  • - 描述:识别意图类别及初步实体。
  • 输入:[rewrittenquery](从 skills/.workflow/rewriteoutput.json 读取)
  • 输出:[intent, indicatormetric, metricinfo](写入 skills/.workflow/intent_output.json)
  • - ID:recognize_intent
  • - 角色:意图路由网关
- 功能描述:对重写后的问题进行语义分类,识别任务类型并初步提取核心维度信息。 - 输入参数: - rewrittenquery (字符串):来自 rewriteoutput.json 的 final_query。 - 输出结果: - intent (枚举):handledataquery | handlemetadataquery | attribution_analysis | other。 - indicator_metric (列表):指标 + 维度数据。 - mode (字符串):single | multi。 - 执行策略:若 confidence < 0.7,强制触发 clarify_workflow(澄清流程)。

注入服务(通过 .env 配置)

服务类作用.env 关键配置
RealIndicatorSearcher指标别名向量搜索(Milvus indicatoralias)MILVUS, EMBEDDING, INDICATORALIASCOLLECTIONNAME
RealMetricConfigLoader
指标维度配置(MySQL indicatormetric) | INTENTMYSQL 或 MYSQL | | RealDictValueReplacer | 字典值替换(Milvus sysdict) | SYSDICTCOLLECTIONNAME(默认 sysdict), DICTREPLACEMIN_SCORE(默认 0.50) | | RealSemanticConceptExtractor | L1 语义概念抽取 + semanticlogicdict 向量增强 | SEMANTICLOGICCOLLECTION(默认 semanticlogicdict), SEMANTICLOGICMINSCORE(默认 0.80) |

所有服务连接失败时均自动降级为 None,主流程继续运行(仅跳过对应增强步骤):

  • - RealDictValueReplacer 失败 → 跳过中文值替换
  • RealSemanticConceptExtractor 失败 → 跳过 L1/L2 候选融合,直接使用 L2 槽位结果

独立运行说明

bash

前置:先运行 rewritequestion.py 生成 rewriteoutput.json


python ../rewrite-question/rewrite_question.py --query 今天汉河店的成交额

运行意图识别(从 .workflow/rewrite_output.json 自动读取)

python recognize_intent.py

带清理(清除本步及后续输出,防止旧数据污染)

python recognize_intent.py --clean

下一步

bash python ../mult-call/multi_call.py

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 recognize-intent-1776361742 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 recognize-intent-1776361742 技能

通过命令行安装

skillhub install recognize-intent-1776361742

下载

⬇ 下载 recognize_intent v1.0.0(免费)

文件大小: 26.44 KB | 发布时间: 2026-4-17 15:55

v1.0.0 最新 2026-4-17 15:55
Initial release of recognize_intent skill.

- Identifies the intent category and extracts core semantic entities (indicator & dimension) from natural language queries.
- Takes rewritten queries as input and outputs intent, metric, and info for downstream processing.
- Supports intent routing: handle_data_query, handle_metadata_query, attribution_analysis, other.
- Integrates with multiple backend services (vector search, MySQL, dictionary/logic enhancer) with automatic degradation on connection failure.
- Triggers clarification workflow if confidence is below threshold.
- Provides standalone execution guidance.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部