Article body
Full article
I. The “Last Mile” Problem in ChatBI Deployment
Over the past two years, “ChatBI” has become a standard feature for almost every BI vendor. The market says “just speak and you can do data analysis,” but the reality is: most enterprise ChatBI implementations are still stuck at the Demo stage — the demo looks amazing, but when it comes to actual promotion, users abandon it.
Why is this happening? Because ChatBI deployment isn’t as simple as “plug in a large model.” It involves data governance, metric management, permission control, user experience, security compliance, and more dimensions. In serving 200+ enterprise customers, HENGSHI has distilled a complete ChatBI deployment methodology, which can be summarized as two engineering disciplines: Metric Engineering and Context Engineering.

II. Metric Engineering: The Foundation of ChatBI Accuracy
The accuracy problem of ChatBI is fundamentally a semantic problem — AI doesn’t understand the precise definitions of business metrics. The essence of Metric Engineering is to “teach” AI how humans understand metrics.
2.1 Step One: Metric Inventory and Standardization
Sort out the enterprise’s current core business metrics and confirm the “one correct definition” for each metric. This process usually requires collaboration between the data team and business departments. Typical questions include:
- Is “GMV” the order amount or the actual payment received? Does it include refunds?
- Is “active user” defined by login, by visit, or by operation? What is the time window?
- What is the denominator of “conversion rate”? All users or target users?
Recommended priority: Start with Top 30 core KPIs. You don’t need to define all metrics at once — start with the 30 metrics that executives and business heads care most about.
2.2 Step Two: HQL Metric Modeling
In the HENGSHI metric management platform, use HQL to formalize the calculation logic of each metric. HQL is designed to be “human-readable, machine-executable” — easy for data teams to write and understandable for AI.
Metric modeling is not a one-time task but a continuous iteration process. As the business evolves, metric definitions may need adjustments. HENGSHI’s metric lineage tracking capability can assess the impact of each change.
2.3 Step Three: Metric Permissions and Tiers
Not all users can see all metrics. Sensitive metrics like “net profit” and “gross margin” are only visible to specific roles. Metric permissions should be set at the metric definition level, not at the report level — this ensures that no matter which ChatBI conversation the metric appears in, the permission rules are consistent.
III. Context Engineering: Making AI Understand Your Business
Metric Engineering solves the problem of “can AI calculate correctly,” but the ChatBI experience also depends on another factor: whether AI can understand the user’s true intent.
3.1 Problem Scenario Comparison
AI without context:
User asks: “Why did sales drop last week?” AI responds: “Please provide more details. Possible reasons include: weather factors, holiday impacts, competitor activities, market demand changes…” (vague platitudes, no actual value)
AI with context:
User asks: “Why did sales drop last week?” AI responds: “Last week’s sales were 3.2M, down 28.9% week-over-week from 4.5M. Main attribution: ① 2 of the TOP 5 customers had contracts expire without renewal (impact ~800K); ② New customer acquisitions in East China = 0 (past 6-month average: 5/month). Recommendation: Initiate customer retention process, strengthen new customer acquisition in East China.”
3.2 Core Content of Context Engineering
HENGSHI’s approach uses a vector database + RAG retrieval to implement Context Engineering. Business knowledge is stored as vectors. When a user asks a question, the system first retrieves relevant context, then combines it with the metric semantic layer to generate responses.
Context content to prepare:
- Business knowledge base: organizational structure, product line definitions, sales region definitions, business process descriptions, etc.
- Analysis templates: common analysis dimension and logic combinations, such as “compare by region,” “monthly trends,” “year-over-year and month-over-month”
- Historical analysis records: past analysis reports, decision records, business interpretations
- Real-time data context: current user’s role, department, and data scope they follow
3.3 Context Vectorization and Retrieval
Business knowledge (unstructured text)
↓ Chunking
Text chunks (512-1024 tokens each)
↓ Embedding model (fine-tuned for BI scenarios)
Embedding vectors
↓ Storage
Vector database (e.g., Milvus, Chroma, FAISS)
↓ Retrieval (when user asks a question)
User question → Embedding → Vector similarity search → TOP-K relevant context
↓ Augmented generation
Inject TOP-K context into Prompt → LLM generates response
IV. HENGSHI NL2Metrics Technical Architecture
The core of HENGSHI’s ChatBI accuracy guarantee is NL2Metrics technology — not translating natural language directly to SQL, but first translating it into a “metric query.”
4.1 NL2SQL vs NL2Metrics Comparison
NL2SQL directly translates natural language to SQL, requiring AI to understand the database schema itself. NL2Metrics acts through a metric semantic layer as an intermediary — AI only needs to understand business metric definitions, not the underlying data table structure. This means NL2Metrics has higher accuracy rates in cross-table complex queries and multi-metric joint analysis scenarios.
4.2 End-to-End Query Flow
- Intent Understanding: LLM analyzes the user’s natural language question, extracting key entities (metric name, time range, dimensions, filter conditions, etc.)
- Metric Matching: Vector retrieval looks up matching metric definitions in the metric semantic layer. If what the user calls “sales amount” has the highest semantic match with “operating revenue” in the metric library, the system prompts the user to confirm
- Definition Confirmation: For queries that may be ambiguous, the system displays the metric’s definition explanation and asks the user to confirm whether the logic is correct
- Query Generation: Based on the confirmed metric definition, combined with the user-specified time range and dimensions, generate the final query statement
- Execution and Presentation: Execute the query on the data engine, presenting results to the user in the form of tables, charts, or natural language descriptions
V. End-to-End Implementation Path
Based on HENGSHI’s experience from 200+ enterprise customer deployments, ChatBI implementation is recommended in three phases:
Phase 1: Proof of Concept (2-4 weeks)
Goal: Validate technical feasibility, build confidence
Core tasks:
- Select one business scenario (e.g., sales data analysis) as a pilot
- Sort out 10-15 core metrics for that scenario and model them with HQL
- Configure one dataset covering the pilot scenario
- Let 5-10 target users trial it and collect feedback
- Evaluate accuracy rate (proportion of correct query results) and satisfaction (whether users want to continue using it)
Success criteria:
- Query accuracy ≥ 80%
- User satisfaction score ≥ 7/10
- Top 10 high-frequency questions coverage ≥ 90%
Phase 2: Expand Pilot (4-8 weeks)
Goal: Expand coverage, establish operational processes
Core tasks:
- Expand metric scope to 30-50 core KPIs
- Cover 2-3 business scenarios (e.g., sales, finance, user operations)
- Build business knowledge base to improve AI’s contextual understanding
- Establish user feedback collection and issue tracking mechanisms
- Train business teams to use ChatBI
Success criteria:
- Query accuracy ≥ 85%
- Weekly active users (WAU) as proportion of target users ≥ 30%
- User feedback response rate within 72 hours ≥ 90%
Phase 3: Full rollout (8-16 weeks)
Goal: Full launch, continuous optimization
Core tasks:
- Integrate more data sources and business scenarios
- Launch metric marketplace portal, enabling business users to browse metric definitions self-service
- Configure automated report push (e.g., daily business brief)
- Establish ChatBI usage guidelines and best practices documentation
- Continuous optimization: adjust metric definitions, expand knowledge base, and improve response quality based on user feedback
Success criteria:
- Query accuracy ≥ 90%
- Monthly active users (MAU) as proportion of target users ≥ 60%
- User NPS (Net Promoter Score) ≥ +20
VI. Key Factors for Successful Deployment
6.1 Executive Support
ChatBI deployment requires cross-department collaboration (data team, business departments, IT department). Without executive push, it’s hard to advance. It’s recommended to secure explicit support from at least one executive at project startup.
6.2 Metrics First
Don’t skip Metric Engineering and go straight to ChatBI. Without unified metric definitions, ChatBI accuracy cannot be guaranteed. This is the core reason many ChatBI projects fail.
6.3 Focus on Scenarios
Don’t try to cover all business scenarios from the start. Select one high-value, low-complexity scenario to start with, and expand after validating the effect.
Recommended entry scenarios (by priority):
- Sales data analysis (high frequency, clear value)
- Financial report queries (stable demand, clear logic)
- User behavior analysis (internet/consumer goods industries)
- Supply chain monitoring (manufacturing/retail industries)
6.4 Continuous Operations
ChatBI is not a “deploy and done” project. You need to continuously collect user feedback, optimize metric definitions, expand the knowledge base, and monitor usage data.
Recommended operational mechanisms:
- Bi-weekly review meetings: data team + business representatives, reviewing ChatBI usage and issues
- Monthly optimization iteration: optimize metric definitions and knowledge base based on user feedback
- Quarterly business review: report ChatBI usage results and business value to executives
6.5 Security Baseline
Clarify data security boundaries — what data can be queried and what cannot; which users have permission to use ChatBI; whether query logs need to be audited.
VII. HENGSHI’s Differentiated Advantages
7.1 Agentic BI Architecture
Not just ChatBI Q&A, but a Data Agent system covering the full Ask → Model → Deliver process. AI Agents can participate from data preparation to report generation.
7.2 NL2Metrics + HQL
Guarantee query accuracy through the metric semantic layer — not letting AI “guess” the logic, but making AI “follow” pre-defined metric logic.
7.3 Flexible Deployment
Supports cloud deployment, private deployment, and HENGSHI BOX hardware integrated deployment, meeting different enterprises’ security and compliance requirements.
VIII. Summary
The value of ChatBI is not “letting AI replace humans in analysis,” but making analysis more democratic, efficient, and intelligent.
HENGSHI’s Agentic BI architecture provides the technical foundation, Metric Engineering and Context Engineering provide accuracy guarantees, and the end-to-end implementation methodology provides the deployment path.
For teams preparing to promote ChatBI within their enterprise, this approach deserves serious consideration. But the most important thing is: start small, iterate continuously, and make the value of each phase real.