← Back to Technical blog

Technical article

HENGSHI Metrics Platform: Building an AI-Ready Enterprise Metrics Semantic Layer

Metrics management is the most overlooked yet most critical infrastructure in the BI ecosystem. HENGSHI's metrics platform, centered on a metrics semantic layer, helps enterprises evolve from report-driven to metrics-driven data management.

Jun 11, 2026Technical blogHENGSHI13 min read
Metrics ManagementAI BISemantic LayerHQLHENGSHI
HENGSHI Metrics Platform: Building an AI-Ready Enterprise Metrics Semantic Layer

Article body

Full article

Abstract: Metrics management is the most overlooked yet most critical infrastructure in the BI ecosystem. HENGSHI’s metrics platform, centered on a metrics semantic layer with unified definitions, traceable governance, and AI-Ready design, helps enterprises evolve from report-driven to metrics-driven data management. This article interprets enterprise-level metrics management practices across three dimensions: metrics system design, platform capabilities, and AI collaboration.


I. Why Metrics Management Is the Cornerstone of AI BI

In enterprise data practice, there’s a common dilemma: the same metric (e.g., “monthly active users”) may yield three different numbers from marketing, operations, and finance. This isn’t a data quality problem—it’s a definition inconsistency problem.

In the traditional BI era, inconsistent definitions are just confusing. In the AI BI era, they directly make AI output untrustworthy—Agents can’t determine which definition is correct, so they can’t give accurate answers.

This is why metrics management is the cornerstone of AI BI: the upper limit of AI accuracy is determined by the clarity of metric definitions.

HENGSHI Metrics Platform Core Architecture

I.I Three Levels of Metrics Management

LevelContentTypical Problem
Technical LayerWhere does the data come from, how is it calculatedWhether the SQL/expressions are correct
Business LayerWhat business meaning does this metric representWhether different departments understand the same metric consistently
Governance LayerWho defines, who uses, who modifiesWhether metric changes go through approval, whether impact scope can be assessed

The HENGSHI Metrics Platform covers all three levels—not just technical-layer calculation logic management.


II. Core Capabilities of the HENGSHI Metrics Platform

II.I Unified Definition Management

Define once, use everywhere. In the HENGSHI Metrics Platform, each metric is an independently defined entity containing:

  • Metric name and aliases: Unified naming conventions to avoid confusion between “revenue” and “income”
  • Calculation logic (HQL): Precisely expresses calculations through HQL (Hengshi Query Language)
  • Data sources: Linked datasets, data tables, and fields
  • Business definition: Human-readable business definitions that help different roles understand metric meaning
  • Dimension binding: Metrics can bind analytical dimensions such as time, region, and product line

Once defined, metrics can be uniformly referenced across dashboards, reports, and ChatBI. Any change to a metric at a consumer endpoint takes effect uniformly at the definition level.

II.II Traceable Governance

Metrics aren’t done once defined—they need ongoing governance.

HENGHSHI provides the following governance capabilities:

  • Metric lineage: Complete traceability from data source → dataset → metric → dashboard → report. When upstream data sources change, downstream impact can be quickly assessed
  • Version management: Every metric revision is saved as a historical version, supporting version comparison and rollback
  • Permission control: Role-based control over metric creation, modification, and viewing permissions
  • Approval workflows: Changes to critical metrics require approval before taking effect

II.III Metric Subject Areas

Large enterprises may have hundreds or thousands of metrics. HENGSHI organizes metrics through “subject areas”:

  • Operations metrics: Revenue, profit, gross margin, ROI
  • Customer metrics: CAC, retention rate, LTV, NPS
  • Product metrics: DAU, MAU, feature usage rate, conversion rate
  • Operations metrics: Order volume, fulfillment rate, inventory turnover, return rate

Subject area design ensures users from different departments only see the metrics they care about, avoiding being lost in a sea of metrics.

II.IV KPI Target Management

The HENGSHI Metrics Platform manages not just metric definitions but also metric target values:

  • Target setting: Set monthly, quarterly, and annual targets for each metric
  • Actual vs. target comparison: Automatically displays the difference between actual values and targets in dashboards
  • Alerting mechanism: Automatically triggers alerts when metrics deviate from targets beyond thresholds

This elevates the metrics system from “describing the past” to “driving the future.”


III. AI-Ready: The Metrics Layer Built for Agents

This is the most unique positioning of the HENGSHI Metrics Platform—not just for humans, but for AI Agents.

III.I Why AI Needs a Metrics Semantic Layer

Traditional NL2SQL ChatBI has large models directly generate SQL to query data. The problem: large models don’t know your company’s business definitions—they can only guess based on their “common sense.” The result is unpredictable accuracy.

HENGSHI’s approach is: first build the metrics semantic layer, then let AI answer questions based on metrics.

When a user asks “How much revenue did East China generate last month?”, AI doesn’t generate SQL—it:

  1. Searches the metrics semantic layer for matching metrics (e.g., “East China Monthly Revenue”)
  2. If found, executes the query using that metric’s predefined logic
  3. If not found, tells the user the metric hasn’t been defined yet, rather than “guessing”

III.II Three Values of the Metrics Semantic Layer for AI

ValueDescription
Accuracy guaranteeAI works based on predefined definitions, so results don’t change when model versions upgrade
Security and controlUsers can only query authorized metrics, unable to bypass permission restrictions through AI
ExplainabilityEvery answer AI gives can be traced back to a specific metric definition—results are auditable

III.III Relationship with HQL

HQL (Hengshi Query Language) is the query language of the HENGSHI Metrics Platform, similar to SQL but with stronger semantic expression capabilities:

  • Supports complex aggregate operations (window functions, cumulative values, moving averages)
  • Supports multi-table joins and nested queries
  • Supports dynamic parameter passing (e.g., time ranges, region selections)

Analysts and advanced users can write HQL directly to define metrics, while business users can auto-generate HQL through drag-and-drop modeling.


IV. Two Modes of Metrics Modeling

IV.I Drag-and-Drop Modeling (Zero Code)

For business users. Through a visual interface:

  • Select data sources and datasets
  • Drag fields to the aggregation area
  • Set filter conditions and calculation methods
  • Define dimensions and measures
  • Preview results and publish

Behind drag-and-drop modeling, the system auto-generates HQL.

IV.II HQL Coding Modeling (Professional Mode)

For data analysts and advanced programmers. Writing HQL directly for complex logic:

-- Calculate monthly revenue and month-over-month growth rate for each region over the past 12 months
DEFINE METRIC "Monthly Revenue MoM Growth" AS
SELECT
    region,
    month,
    SUM(amount) AS revenue,
    (SUM(amount) - LAG(SUM(amount), 1) OVER (PARTITION BY region ORDER BY month))
    / LAG(SUM(amount), 1) OVER (PARTITION BY region ORDER BY month) AS mom_growth
FROM sales_data
WHERE month >= DATE_SUB(CURRENT_DATE, INTERVAL 12 MONTH)
GROUP BY region, month

The coding mode supports:

  • Built-in function library (YoY/MoM, cumulative values, moving averages, percentiles, etc.)
  • Model templates (RFM, funnel analysis, retention analysis, etc.)
  • Parameterized queries
  • Query optimization suggestions

V. Metrics Management and BI Consumption Integration

The HENGSHI Metrics Platform is deeply integrated with BI consumption endpoints (dashboards, reports, ChatBI):

V.I Dashboard Consumption

  • Charts in dashboards directly reference metrics from the metrics platform, not hard-coded SQL
  • When a metric’s definition changes, all dashboards referencing that metric auto-update
  • Dashboard filters and parameters can be passed to metric queries

V.II ChatBI Consumption

  • ChatBI’s NL2Metrics engine performs semantic matching based on the metrics semantic layer
  • Users can ask natural language questions and the system returns results by matching metrics
  • Different phrasings (“East China revenue,” “East China region income”) yield consistent results as long as they reference the same metric

V.III API Consumption

  • The metrics platform provides RESTful APIs for external systems to call directly
  • Third-party applications can consume HENGSHI-defined metrics, ensuring definition consistency
  • Supports embedding in enterprise data portals and mobile applications

VI. Implementation Recommendations: Building an Enterprise Metrics System

VI.I Start from Business Domains—Don’t Aim for Everything at Once

Start with 10-20 core metrics from one business domain (e.g., sales or customer domain), run through the “define → consume → govern” cycle, then gradually expand to other domains.

VI.II Prioritize High-Frequency Metrics

Not all metrics need to be managed on the platform. Prioritize:

  • Cross-department shared metrics (e.g., revenue, gross margin, user count)
  • Metrics commonly used in management reporting (e.g., KPI dashboards)
  • Metrics frequently queried in ChatBI

One-off metrics used infrequently can remain flexibly created.

VI.III Establish Metric Ownership

Each metric should have a clear owner responsible for:

  • Business definition of the metric
  • Validation of the metric’s calculation logic
  • Approval of metric changes
  • Training on metric usage

VII. Frequently Asked Questions

Q1: What’s the relationship between a metrics platform and BI tools?

A: The metrics platform manages “metric definitions and definitions”; BI tools implement “metric display and consumption.” The relationship is like a “dictionary” and “articles”—dictionaries define standard meanings of words, articles use those words to convey information. Without a dictionary, articles may use words inaccurately; without a metrics platform, BI trustworthiness is hard to guarantee.

Q2: If an enterprise already has a data warehouse and data models, does it still need a metrics platform?

A: Data warehouses and data models solve “where does data come from and how is it stored”; metrics platforms solve “what are the business definitions and who manages them.” The two don’t conflict. In fact, metrics platforms are typically built on top of data warehouses—data warehouses provide the data foundation, metrics platforms provide business semantics.

Q3: Will a metrics platform increase the data team’s workload?

A: In the short term, it increases the workload of metric definition. But long-term, unified definitions greatly reduce communication costs and rework from definition disputes. Moreover, HENGSHI’s AI modeling Agent can help accelerate metric creation, reducing labor costs.


VIII. Summary

A metrics management platform isn’t a flashy new feature—it’s “infrastructure” for the BI ecosystem. It’s not as visually obvious as dashboards, but it determines the accuracy and reliability of all upper-layer applications.

In the AI BI era, the importance of metrics management is further amplified: without a clean metrics semantic layer, AI answers aren’t trustworthy. HENGSHI’s investment in metrics management is essentially laying the foundation for the Agentic BI building.

For enterprises considering introducing AI BI, before pursuing AI capabilities, first assess whether your metrics system is sufficiently clear and unified—this is the most critical prerequisite for AI BI truly landing.


This article is based on HENGSHI Technologies’ Metrics Management Platform product information. Specific features and performance are subject to the latest official version.

HENGSHI SENSE

Resources, ecosystem, and implementation stories

Explore how teams design and ship analytics with HENGSHI.

Request a trial

Enterprise deployment, embedded delivery, and trial requests can all be handled quickly.