Skip to content
cccskills
FreePublished on GitHub

bi-semantic-layer-guide

语义层工具使用规范。在发现语义层工具可用、需要查询指标定义/维度信息、验证业务口径、处理指标歧义时,必须优先调用此技能。无语义层工具时不调用。

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md3.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

bi-semantic-layer-guide

概述

语义层是统一管理业务语义元数据的服务,包括指标定义、维度定义、指标维度绑定和数据集映射。


可用工具

语义层暴露三类工具:

  • 全局:list_domains()
  • 指标查询:list_metrics(domain)、search_metrics(query, domain)、get_metric(name, domain)、get_north_star_metrics(domain)
  • 维度查询:list_dimensions(domain)、get_dimension(name, domain)、list_dimensions_of_metric(name, domain)、get_dimension_hierarchy(name, domain)、get_dimension_values(name, domain)
  • 数据集查询:list_datasets(domain)、get_dataset_columns(name, domain)、get_dataset(name, domain)

具体参数和返回格式参见工具自身描述。


查询策略

指标匹配

在语义层中查找指标,可选策略:

  • 语义检索(search_metrics),语义层会自动匹配同义词
  • 查看具体业务域的北极星指标列表(get_north_star_metrics),从中选择最相关的
  • 若以上均未命中,列出该域全部指标(list_metrics),逐一判断和分析条目的相关性。

no_match 必须拦截,不得当作空结果:语义层返回 no_match(或空候选集)表示 该指标在语义层中不存在,与"指标存在但当前无数据"是两件不同的事。

  • 禁止把 no_match 当作 0、空表或"该指标无数据"继续往下分析
  • 禁止绕过语义层自行猜测指标口径、自行拼 SQL 计算一个同名指标
  • 先按上述三条策略换用检索方式重试;仍为 no_match 时,明确向用户说明该指标未在 语义层定义,并请其确认口径或改用已定义的近似指标
  • 报告中不得出现以 no_match 指标为依据的结论

指标属性确认

通过 get_metric 获取指标属性,重点属性:

  • 是否是北极星指标(is_north_star):用于角色分配
  • 是否展示指标(is_display):该指标是否应出现在展示面板中
  • 是否展示分布(is_display_distribution):展示指标时是否同时展示分布图
  • 维度绑定(dimensions):指标可拆解的维度列表,含 is_display_dimension、is_contribution_dimension 标记。

维度信息获取

通过 list_dimensions_of_metric 获取指标可拆解的维度列表(is_contribution_dimension=true 的维度才可用于贡献度拆解),通过 get_dimension_hierarchy 获取维度间的父子层级关系。


消歧规则

搜索指标时可能遇到歧义,按以下规则处理:

  • 匹配到多个指标:优先选北极星指标(is_north_star=true)。若仍有多个候选,结合指标类型和标签综合判断,必要时向用户确认。
  • 精确名称 vs 同义词:若同时出现精确名称匹配和同义词匹配,精确名称优先。例如搜索"DAU",若同时命中指标名为"DAU"的指标和同义词含"DAU"的"访问用户数",取前者。
  • 同名指标跨业务域:若同一指标名出现在多个业务域中,用当前分析任务的业务域限定范围。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

将用户的数据分析需求转化为结构化的分析计划并与用户确认。用户提出 BI 业务分析、数据探索、统计建模等需要规划的分析任务时使用。简单数据查询、公式明确的定量计算等流程简单、无需规划的任务不使用。

The English summary is being prepared. Showing the original description.

agentscope-ai/QwenPaw-Data166Updated Oct 20, 2026

通过量化历史数据的自然波动幅度,自适应计算判定阈值。当需要从数据本身确定阈值(如波动阈值、影响度阈值等)、而非使用固定值时调用。仅适用于日/周粒度阈值确定。

The English summary is being prepared. Showing the original description.

agentscope-ai/QwenPaw-Data166Updated Oct 20, 2026

基于阈值检测时间序列中的显著异常波动点。当需要找出指标异常波动日期、识别数据异动时调用。

The English summary is being prepared. Showing the original description.

agentscope-ai/QwenPaw-Data166Updated Oct 20, 2026

计算各维度(组)值对指标变动的贡献度,支持可加型量值指标和加权平均型/率值指标。当需要计算贡献度、解释指标"为什么涨/跌"时调用。

The English summary is being prepared. Showing the original description.

agentscope-ai/QwenPaw-Data166Updated Oct 20, 2026

从运营周报、活动文档、对话输入或文档工具 API 中提取业务事件,与指标异常时间窗口对齐,生成有证据支撑的因果归因假设并排序。当已知指标存在异常波动、需要从外部文档证据中解释"为什么"时调用。

The English summary is being prepared. Showing the original description.

agentscope-ai/QwenPaw-Data166Updated Oct 20, 2026

对用户、产品等业务对象做分群:用波士顿矩阵法做象限分群,或用分层聚类、K-means、DBSCAN 等聚类技术分群。当需要做客群/产品分群、象限策略、画像或密度型子结构发现时调用。触发条件:当对话中出现“分群”、“分类”、“聚类”、“不同类型”、“不同场景”等体现分群分析词语时触发。

The English summary is being prepared. Showing the original description.

agentscope-ai/QwenPaw-Data166Updated Oct 20, 2026

See all skills by agentscope-ai

Report a problem with this skill