Data Analysis Business Intelligence Predictive Analytics

AI in Data Analysis & Business Intelligence with Chinese LLMs

Published August 26, 2026 · 12 min read · TokenEase Data Team

Modern businesses generate terabytes of data daily, but extracting actionable insights remains a bottleneck. Chinese LLMs like DeepSeek-V4, GLM-4, and Qwen3 are transforming how analysts work—automating data cleaning, generating predictive models, and enabling natural language querying of complex datasets.

Through TokenEase's unified API, data teams can access these capabilities without managing multiple provider accounts or worrying about rate limits.

The TokenEase Advantage for Data Teams

Process large datasets with Qwen3's 128K context window, generate bilingual reports with GLM-4, and build complex analytical pipelines with DeepSeek-V4's reasoning capabilities—all through a single endpoint with unified billing.

1. Automated Data Cleaning & Preprocessing

Data scientists spend 60-80% of their time on data preparation. LLMs can automate this by identifying missing values, detecting outliers, standardizing formats, and suggesting imputation strategies—all from a sample of your dataset.

Example: Generate Data Cleaning Pipeline with DeepSeek-V4

import requests

sample_data = """
Customer_ID,Name,Email,Purchase_Amount,Date,Category
1001,John Doe,john@email.com,150.50,2026-01-15,Electronics
1002,Jane Smith,jane@email.com,,2026/01/16,Clothing
1003,Bob Johnson,bob@email,299.99,2026-01-17,Electronics
1004,Alice Brown,alice@email.com,-50.00,2026-01-18,Home
1005,John Doe,john@email.com,150.50,2026-01-15,Electronics
"""

response = requests.post(
    "https://tokenease.io/v1/chat/completions",
    headers={
        "Authorization": "Bearer YOUR_TOKENEASE_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "model": "deepseek-v4",
        "messages": [
            {"role": "system", "content": "You are a data engineering expert. Analyze data samples, identify quality issues, and generate Python/pandas cleaning code with detailed comments. Handle missing values, duplicates, outliers, format inconsistencies, and invalid entries."},
            {"role": "user", "content": f"Analyze this CSV sample and generate a complete data cleaning pipeline:\n{sample_data}"}
        ],
        "temperature": 0.2,
        "max_tokens": 2500
    }
)

cleaning_code = response.json()["choices"][0]["message"]["content"]
print(cleaning_code)

Expected Issues Detected: Missing Purchase_Amount (row 2), invalid email format (row 3), negative amount outlier (row 4), duplicate row (row 5 vs row 1), inconsistent date formats.

2. Natural Language to SQL Query Generation

Enable non-technical stakeholders to query databases using plain English (or Chinese). LLMs translate natural language questions into optimized SQL, complete with JOINs, aggregations, and window functions.

Example: NL-to-SQL with GLM-4

import requests

schema = """
Tables:
- orders (order_id, customer_id, order_date, total_amount, status)
- customers (customer_id, name, email, registration_date, country)
- order_items (item_id, order_id, product_id, quantity, unit_price)
- products (product_id, name, category, supplier_id)
"""

user_question = "Show me the top 5 customers by total spending in 2026, including their country and favorite product category."

response = requests.post(
    "https://tokenease.io/v1/chat/completions",
    headers={
        "Authorization": "Bearer YOUR_TOKENEASE_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "model": "glm-4-plus",
        "messages": [
            {"role": "system", "content": "You are a SQL expert. Convert natural language questions into optimized, readable SQL queries. Use appropriate JOINs, aggregations, window functions, and subqueries. Include comments explaining each clause. Support both English and Chinese questions."},
            {"role": "user", "content": f"Database schema:\n{schema}\n\nQuestion: {user_question}\n\nGenerate the SQL query:"}
        ],
        "temperature": 0.1,
        "max_tokens": 1500
    }
)

sql_query = response.json()["choices"][0]["message"]["content"]
print(sql_query)

Production Tip: Add a validation layer that checks generated SQL against allowed tables and columns to prevent injection risks.

3. Automated Report Generation & Narrative Insights

Transform raw metrics into executive-ready narratives. LLMs can analyze datasets, identify trends, calculate growth rates, and generate comprehensive reports with charts recommendations and actionable insights.

Example: Generate Quarterly Business Report with Qwen3

import requests

metrics = """
Q2 2026 Financial Metrics:
- Revenue: $12.5M (+18% YoY, +5% QoQ)
- Gross Margin: 72% (+2pp YoY)
- Customer Acquisition Cost: $85 (-15% QoQ)
- Monthly Active Users: 450K (+25% YoY)
- Churn Rate: 3.2% (-0.8pp QoQ)
- Net Promoter Score: 62 (+8 YoY)
- Support Tickets: 2,400 (+10% QoQ, but per-user down 12%)
- Feature Adoption (new AI tool): 35% of MAU
"""

response = requests.post(
    "https://tokenease.io/v1/chat/completions",
    headers={
        "Authorization": "Bearer YOUR_TOKENEASE_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "model": "qwen3-235b",
        "messages": [
            {"role": "system", "content": "You are a senior business analyst. Generate executive summary reports from metrics data. Include trend analysis, YoY/QoQ comparisons, key drivers, risk factors, and strategic recommendations. Write in professional business English with clear section headers."},
            {"role": "user", "content": f"Generate a Q2 2026 executive summary from these metrics:\n{metrics}"}
        ],
        "temperature": 0.3,
        "max_tokens": 2500
    }
)

report = response.json()["choices"][0]["message"]["content"]
print(report)
# Save: with open('q2_2026_executive_summary.md', 'w') as f: f.write(report)

4. Predictive Analytics & Forecasting

While LLMs aren't replacements for statistical models, they excel at interpreting forecasting results, generating feature engineering ideas, and building end-to-end predictive pipelines when combined with libraries like scikit-learn or Prophet.

Example: Generate Forecasting Pipeline with DeepSeek-V4

import requests

forecasting_requirements = """
We need to forecast monthly sales for the next 6 months.
Data available: 24 months of historical sales with seasonality (peak in Nov-Dec, dip in Feb).
External factors: marketing spend, competitor pricing, economic indicators.
Required output: point forecasts, confidence intervals, and model comparison.
"""

response = requests.post(
    "https://tokenease.io/v1/chat/completions",
    headers={
        "Authorization": "Bearer YOUR_TOKENEASE_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "model": "deepseek-v4",
        "messages": [
            {"role": "system", "content": "You are a data science expert. Generate complete Python forecasting pipelines using Prophet, ARIMA, or machine learning approaches. Include data preprocessing, model training, cross-validation, hyperparameter tuning, and visualization code. Provide model comparison metrics."},
            {"role": "user", "content": f"Generate a forecasting pipeline:\n{forecasting_requirements}"}
        ],
        "temperature": 0.2,
        "max_tokens": 3000
    }
)

pipeline = response.json()["choices"][0]["message"]["content"]
print(pipeline)

5. Anomaly Detection & Alert Narratives

When monitoring systems detect anomalies, LLMs can generate human-readable explanations of what happened, why it matters, and what actions to take—turning raw alerts into actionable intelligence.

Example: Anomaly Explanation with Qwen3

import requests

alert_data = """
Alert: Revenue Drop Detected
Time: 2026-08-26 14:00 UTC
Severity: High

Metrics (last 4 hours vs same time last week):
- Total Revenue: $45,200 (-32% WoW)
- Transactions: 1,240 (-18% WoW)
- Avg Order Value: $36.45 (-17% WoW)
- Cart Abandonment: 68% (+22pp WoW)
- Payment Failures: 12% (+9pp WoW)
- Mobile Traffic: -5% WoW
- Desktop Traffic: -28% WoW

Affected Regions:
- US East Coast: -45%
- Europe: -8%
- APAC: +3%

Recent Changes:
- New checkout UI deployed Aug 25 22:00 UTC
- Payment processor maintenance Aug 26 12:00-13:00 UTC
"""

response = requests.post(
    "https://tokenease.io/v1/chat/completions",
    headers={
        "Authorization": "Bearer YOUR_TOKENEASE_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "model": "qwen3-235b",
        "messages": [
            {"role": "system", "content": "You are a business operations analyst. Analyze anomaly alerts, identify root causes from available data, assess business impact, and recommend immediate and long-term actions. Prioritize based on severity and revenue impact."},
            {"role": "user", "content": f"Analyze this revenue drop alert:\n{alert_data}"}
        ],
        "temperature": 0.2,
        "max_tokens": 2000
    }
)

analysis = response.json()["choices"][0]["message"]["content"]
print(analysis)
# Expected: Points to payment processor maintenance + new checkout UI as likely causes

6. Interactive Dashboard Description Generation

LLMs can generate comprehensive dashboard specifications—including chart types, filters, drill-down paths, and KPI definitions—based on business requirements and available data sources.

Example: Dashboard Spec with GLM-4

import requests

dashboard_requirements = """
Create a dashboard for a SaaS subscription business with these needs:
- Executive overview: MRR, ARR, churn, LTV, CAC
- Sales funnel: leads -> trials -> conversions -> expansions
- Product usage: DAU/MAU, feature adoption, session duration
- Customer health: support tickets, NPS, usage trends, renewal probability
- Revenue breakdown: by plan, region, acquisition channel
- Alerts: churn risk customers, expansion opportunities
"""

response = requests.post(
    "https://tokenease.io/v1/chat/completions",
    headers={
        "Authorization": "Bearer YOUR_TOKENEASE_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "model": "glm-4-plus",
        "messages": [
            {"role": "system", "content": "You are a BI dashboard expert. Generate detailed dashboard specifications including chart types, data sources, filters, dimensions, metrics, color schemes, and interactivity. Format as structured Markdown with sections for each dashboard tab."},
            {"role": "user", "content": f"Generate a dashboard specification:\n{dashboard_requirements}"}
        ],
        "temperature": 0.3,
        "max_tokens": 2500
    }
)

dashboard_spec = response.json()["choices"][0]["message"]["content"]
print(dashboard_spec)

Power Your Data Stack with TokenEase

Connect DeepSeek-V4, GLM-4, and Qwen3 to your BI tools, data pipelines, and analytics workflows. Get started free →

Implementation Best Practices

Model Selection for Data Tasks