Zhipu Qingyan (智谱清言), powered by Zhipu AI's GLM foundation models, integrates an automated Code Interpreter sandbox that transforms everyday tabular spreadsheets into structured data insights and production-ready visual charts. Rather than requiring users to write Python scripts, configure local development environments, or master complex spreadsheet formulas, the platform allows analysts, marketers, and operations professionals to upload raw spreadsheets such as Excel and CSV files and instruct the assistant in natural language. By executing code securely in a dedicated Python runtime equipped with essential data science libraries like pandas, numpy, and matplotlib, Zhipu Qingyan bridges the gap between raw business records and clear visual decision-making.
Understanding the Code Interpreter Architecture
The Code Interpreter inside Zhipu Qingyan functions as an isolated execution environment paired with an intelligent language model agent. When a user presents an analytical question alongside a spreadsheet, the system does not simply guess the answer using text prediction. Instead, it converts the user's intent into executable Python code, runs the script within a sandboxed virtual environment, captures the standard output and generated graphics, and returns the verified results directly to the chat stream.
This architecture offers several concrete advantages for business users:
- Algorithmic Precision: Numerical calculations, aggregations, and statistical metrics are computed by Python rather than estimated by probabilistic token generation, eliminating arithmetic hallucinations.
- Comprehensive Data Science Stack: The runtime environment comes preloaded with standard analytical libraries, including pandas for tabular manipulation, numpy for numerical operations, and matplotlib and seaborn for charting and visual rendering.
- Dual Artifact Generation: The sandbox produces both graphical outputs—such as inline high-resolution charts—and structured tabular files, allowing users to download modified workbooks or summary tables.
- Transparent Execution Logs: Users can inspect the generated Python code behind any response to verify data transformations, filtering conditions, and mathematical logic.
Preparing and Uploading Tabular Spreadsheets
To ensure smooth analysis and avoid parsing errors in the Python environment, preparing the input spreadsheet according to clean data principles is essential.
Supported File Formats
Zhipu Qingyan accepts several structured data formats through its chat attachment interface:
- Microsoft Excel Workbooks (
.xlsx,.xls): Ideal for business reports with multiple columns, formatted values, and date fields. - Comma-Separated and Delimited Files (
.csv,.tsv): Recommended for large datasets exported from databases, customer relationship management (CRM) systems, or enterprise resource planning (ERP) platforms. - Direct Tabular Text: For smaller snippets, users can paste Markdown tables or tab-separated text directly into the conversation prompt.
Best Practices for Data Hygiene
Before uploading files to Zhipu Qingyan, standardizing layout elements minimizes processing friction:
- Single Header Row: Place descriptive column headers in the very first row. Avoid stacked or multi-level headers, which can require complex multi-index handling in pandas.
- Unmerge Cells: Merged cells in Excel frequently lead to blank values when loaded into standard data frame structures. Fill values across unmerged rows or normalize them before upload.
- Consistent Data Types: Ensure individual columns contain homogeneous data. For example, avoid mixing currency symbols or text annotations into purely numerical columns.
- Data Sanitization and Privacy: Remove or mask personally identifiable information (PII), confidential client names, internal passwords, and sensitive financial credentials prior to uploading files to any cloud-based conversational interface.
Step-by-Step Workflow: From Raw Data to Visual Charts
Utilizing Zhipu Qingyan's Code Interpreter for tabular analysis follows a structured progression from initial profiling to final visual export.
Step 1: Initial Profiling and Schema Inspection
After attaching a spreadsheet to the chat input, the first step is to establish an understanding of the dataset's structure, dimensions, and potential anomalies.
Rather than immediately requesting complex charts, prompt the assistant to conduct a preliminary inspection:
"I have uploaded our quarterly sales spreadsheet. Please inspect the dataset, display the total row and column counts, list each column name alongside its detected data type, and check for any missing or null values."
The Code Interpreter loads the file using pandas (pd.read_excel() or pd.read_csv()), inspects the schema via methods such as .info() and .isnull().sum(), and presents a clear overview. This diagnostic step verifies that numbers and dates were recognized correctly.
Step 2: Data Cleaning and Feature Engineering
Real-world spreadsheets rarely arrive in perfect analytical shape. The assistant can perform automated transformations to clean data and derive new business metrics:
- Handling Missing Records: Filling empty values with column medians, specific category flags, or dropping incomplete records where appropriate.
- Date Standardization: Converting irregular text dates (such as
09/19/26or2026.09.19) into standardized datetime objects to enable chronological sorting and time-series grouping. - Derived Calculations: Generating computed columns, such as calculating gross margins (
(Revenue - Cost) / Revenue), customer lifetime values, or variance against target budgets.
A practical prompt for this phase:
"Please clean the
Transaction_Datecolumn into standard YYYY-MM-DD format. If there are missing values in theDiscountcolumn, replace them with 0. Then, create a new column calledNet_Revenueequal toGross_Sales * (1 - Discount)."
Step 3: Statistical Summaries and Aggregation
Once the data is cleaned, users can extract business insights through grouping and aggregation. Zhipu Qingyan executes pivot tables, group-by operations, and summary statistics on demand.
Useful analytical queries include:
- Grouped Aggregations: Computing sum, mean, or median metrics across geographical regions, product categories, or customer tiers.
- Ranking and Filtering: Identifying top-performing sales representatives, lowest-margin products, or underperforming marketing campaigns.
- Distribution Analysis: Calculating quartiles, standard deviations, and identifying statistical outliers that may distort averages.
Example instruction:
"Group the records by
RegionandProduct_Line. Calculate total net revenue, average order size, and total transaction volume for each group. Present the results in a neatly formatted summary table sorted by total revenue in descending order."
Step 4: Generating Visual Charts
After identifying key metrics, instruct Zhipu Qingyan to produce visual representations. The Code Interpreter writes plotting scripts using matplotlib or seaborn, renders the figure, and returns it inline within the chat.
Selecting Appropriate Chart Types
| Business Objective | Recommended Chart Type | Common Metrics & Dimensions |
|---|---|---|
| Comparing performance across categories | Vertical or Horizontal Bar Chart | Revenue by region, sales by product line |
| Tracking trends over time | Line Chart or Area Chart | Monthly recurring revenue, daily active users |
| Analyzing composition and proportions | Donut Chart or Stacked Bar Chart | Market share, department budget breakdown |
| Evaluating relationships and correlations | Scatter Plot | Advertising spend vs. lead conversion volume |
| Inspecting metric distribution and skew | Histogram or Box Plot | Order value distribution, delivery time variance |
| Multi-dimensional performance comparison | Heatmap | Sales performance across months and regions |
Handling Typography and Layouts
A frequent challenge in automated Python plotting is the handling of non-Latin characters and crowded axis labels. Zhipu Qingyan natively configures font properties to ensure Chinese and English characters render crisply without displaying broken boxes. To further refine chart presentation, specify formatting preferences in your prompt:
"Create a horizontal bar chart showing the top 10 products by
Net_Revenue. Sort the bars so the highest revenue appears at the top. Add explicit data value labels at the end of each bar, format the x-axis with currency signs, and apply a clean, professional corporate color palette."
Step 5: Iterative Refinement and Customization
One of the greatest strengths of the conversational Code Interpreter is the ability to iteratively modify charts without starting over:
- Adjusting Color Schemes: "Switch the color palette to a high-contrast navy and teal theme suitable for an executive presentation."
- Highlighting Key Thresholds: "Add a horizontal dashed red line representing our quarterly target of $50,000 across the monthly trend chart."
- Filtering Focus Areas: "Exclude the 'Uncategorized' segment and regenerate the pie chart showing only the top five categories."
- Refining Axis Labels: "Rotate the x-axis date labels by 45 degrees so they do not overlap, and remove the top and right chart spines for a minimalist aesthetic."
Step 6: Exporting Deliverables and Processed Files
At the conclusion of an analytical session, users typically require both the visual graphics and the underlying cleaned data:
- Saving Visual Assets: Generated charts can be viewed at full resolution and saved directly as image files (
.png) via browser context options or download prompts. - Downloading Transformed Data: Users can request that Zhipu Qingyan export the modified dataset or pivot summary back into a file format.
Example prompt for file generation:
"Please save the cleaned dataset with the newly computed metrics and the regional summary table as two separate worksheets in a new Excel file named
Quarterly_Sales_Analysis_Cleaned.xlsxand provide a download link."
The assistant executes df.to_excel() in the sandbox and provides a clickable link to download the completed spreadsheet.
Practical Business Scenarios and Prompt Templates
The following templates demonstrate how professionals across different departments can structure their interactions with Zhipu Qingyan's Code Interpreter:
Financial Performance and Budget Tracking
- Context: Uploading a general ledger export containing budgeted versus actual expenditures across departments.
- Prompt: "Compare the
Actual_SpendagainstBudget_Allocatedfor each department. Calculate the absolute variance and variance percentage. Plot a dual-bar chart showing budget next to actuals for each department, and highlight any department exceeding its budget by more than 10% in red."
E-Commerce Sales and Inventory Monitoring
- Context: Uploading daily order exports from an online storefront.
- Prompt: "Aggregate total sales and order count by day of the week. Determine which weekday generates the highest average order value. Then, plot a combined line and bar chart showing daily revenue on the primary y-axis and transaction count on the secondary y-axis."
Customer Support and Operational Efficiency
- Context: Uploading a customer support ticket log with open timestamps, resolution timestamps, and satisfaction ratings.
- Prompt: "Calculate the resolution time in hours for each ticket. Filter out records where status is 'Cancelled'. Create a box plot illustrating the distribution of resolution times across different support tiers, and summarize the median resolution time and 90th percentile for each tier."
Best Practices and Operational Boundaries
To maximize efficiency and maintain analytical rigor, keep these operational principles in mind:
- Inspect the Code for Rigor: Always click the code view toggle to review the generated Python script. Checking formulas ensures that filtering logic, handling of zero values, and aggregation functions align with organizational accounting standards.
- Manage Multi-Tab Spreadsheets Explicitly: When uploading an Excel workbook with several worksheets, specify the target sheet name in your prompt (e.g., "Read the sheet named 'Q3_Raw_Data'").
- Be Mindful of Sandbox Resource Limits: The cloud execution environment operates with memory and execution timeout constraints. For multi-gigabyte datasets, pre-filter or aggregate data locally before uploading, or sample representative rows for exploratory visualization.
- Maintain Data Governance: Adhere to company information security policies. Treat public conversational AI instances as external processing environments, ensuring proprietary customer data is anonymized or pseudonymized before analysis.
By combining the natural language agility of GLM models with the deterministic computing power of Python, Zhipu Qingyan enables users to bypass spreadsheet friction, uncover patterns rapidly, and deliver compelling visual charts for business decisions.