Industry Insight Report Generation
Generate professional industry analysis / research reports as .docx using python-docx, with cited sources throughout and optional ERP 系统 value-matching sections.
When to Use
- User asks for an "industry analysis", "行业洞察", "行业分析报告", "white paper", "market research"
- User asks for a "survey/investigation document" (调研问卷/调查文件)
- User has high-level domain (e.g., "biomedical", "电子设备") and wants a comprehensive report
- python-docx .NET environment is NOT available (python-docx fallback)
Workflow
Phase 1: Multi-Angle Research
Run parallel searches across at least 3 directions:
# Typical search angles:
searches = [
f"{industry} {year} 运行数据 营业收入 增加值增速 工信部 国家统计局", # Macro data
f"{industry} 数字化转型 智能制造 政策 趋势 {year}", # Policy & trends
f"{industry} 数字化转型 痛点 需求", # Pain points
f"ERP 厂商 ERP 系统 {industry} 解决方案 案例", # Vendor capability
]
Data source priority: government statistics (工信部/国家统计局) > industry association reports (中国医药企业管理协会/联合资信) > consulting firms (德勤/毕马威/IDC/普华永道) > vendor official sites.
Prefer web 搜索 with search_depth='advanced', max_results=10 for thorough coverage.
Deep Research with Parallel Sub-Tasks
For in-depth reports that require systematic multi-dimension coverage, use parallel decomposition via delegate_task instead of sequential searching.
Methodology: Decompose the research into 3 parallel sub-tasks, each run by a subagent with toolsets=['web']:
| Sub-task | Research direction | Search targets |
|---|---|---|
| Macro data | Industry scale, GDP share, policy environment, official statistics | 国家统计局、工信部、权威咨询机构 |
| Sub-sectors | Segment market sizes, growth rates, key players, tech trends | IDC, Gartner, 信通院, 艾瑞等 |
| Competitive landscape | Head-to-head analysis, market share, funding dynamics, challenges | 财报、行业媒体、36氪等 |
Sub-task prompt design principles:
1. Search target — explicitly state what to search (e.g., "搜索2025-2026年中国XX行业宏观数据、市场规模、政策环境")
2. Data requirements — "所有数据必须标明来源和年份"
3. Authority requirement — "数据来源以官方/权威渠道为准"
4. Output requirement — "搜索结果整理为markdown文件保存"
Compilation phase (after all 3 complete):
1. Read each sub-task's output markdown file
2. Cross-validate key data points (when sources disagree, use the more authoritative one)
3. Note data calibre discrepancies (e.g., "工信部口径" vs "IDC口径")
4. Compile into the unified report template below
Pitfalls:
- Sub-tasks may time out (7s model wait). If a sub-task didn't write its output file, manually supplement the search.
- Parallel task count is capped at 3. For more dimensions, batch or merge.
- Sub-task output files land under ~/ with patterns like *行业*_2025-2026.md
- Different sources define "market size" differently — always note the source's measurement scope.
Phase 2: Document Structure Template
Two proven structures. The canonical (11-section) covers everything; the compact (8-section) is the user's preferred format for most industry reports — faster to read, more business-friendly. Pick based on depth needed and user's signal.
Canonical Structure (full academic/comprehensive)
1. 前言 (Preface) — macro background, why this report
2. 行业全景 (Industry Panorama) — definitions, macro data tables, regional breakdown
3. 行业特征 (Industry Characteristics) — 3-6 unique attributes
4. 政策环境 (Policy Landscape) — key national policies with document numbers
5. 发展态势 (Development Trends) — 5-7 major trends with evidence
6. 数智化转型全景 (Digital Transformation Landscape) — system penetration rates, policy targets
7. 痛点深度解析 (Pain Points) — 5-7 bottlenecks with detailed analysis
8. 竞争格局 (Competitive Landscape) — 4-6 types of players
9. 市场机遇 (Market Opportunities) — 4-6 opportunity areas
10. 价值匹配分析 (Value Matching) — pain×capability mapping table, scenarios, differentiation
11. 结语 + 参考文献
Compact Structure (preferred for business insight reports)
1. 行业概览与核心发现 — 一句话定位 + 核心数据速览表(8-12个关键指标)
2. 宏观基本盘与政策环境 — GDP数据 + 核心政策年表
3. 行业全景市场规模 — 行业增加值/总产值/全球对比
4. 细分领域深度分析 — 每个子赛道独立章节(市场规模+产能+价格+竞争)
5. 竞争格局与头部企业 — 3-5类玩家表格化+集中度变化
6. 挑战分析 — 5-7个核心挑战,每个有数据和案例支撑
7. 趋势研判 — 5-7条关键趋势,每条有依据
8. ERP 系统价值匹配 — 能力对照表→核心价值→路径→竞品对比→选型理由
+ 附录:参考文献
When to use which: If user says "越详细越好" or starts with academic phrasing, use canonical. If user says "洞察" or "参考之前写过的那种格式", use compact — this is what the user expects for business insight reports (validated across 科技服务、电子设备、生物医药、农牧).
All data points MUST carry citation markers like 【1】, 【2】 that correspond to a references section at the end. Use superscript-style numbers in the text.
Phase 3: Format Detection (Report vs Questionnaire)
CRITICAL: Before generating, confirm what format the user wants.
| Format | Structure | When User Says |
|---|---|---|
| Report | Continuous prose, sections (H1/H2), tables, analysis | "洞察", "分析报告", "白皮书", "行业分析" |
| Questionnaire/Survey | Numbered questions, □ options, sections by department | "问卷", "调研问卷", "调查文件", "需求调研" |
Questionnaire format rules (from reference analysis, validated across 9-section ERP surveys):
- Title → Heading 1 (e.g., "XX行业数智化转型需求调研问卷")
- Sections → Heading 2 (一、Xxx, 二、Xxx)
- Questions → bold normal text, numbered consecutively across the entire document (Q1, Q2, ..., not reset per section)
- Options → separate paragraphs with " □ " prefix — never inline comma-separated
- Some open-ended questions leave blank paragraphs for free-text answers
- Include a "填写说明" (filling instructions) section after title, including who should fill, how to mark checkboxes, confidentiality
- End with a polite closing line
- 1-2 blank paragraphs between question groups
- Page breaks between major sections (every 1-2 sections)
Question archetypes found in real templates:
- Type A (Single-select): Options in separate paragraphs, single choice implied
- Type B (Multi-select): Mark "(可多选)" in the question text
- Type C (Limited-select): Mark "(可多选,限选N项)" in the question text
- Type D (Open-ended): Leave blank paragraph(s) after the question
- Type E (Rating matrix): Use a table with module names as rows and Likert-scale columns
Typical 9-section ERP survey template (adapt per industry):
1. 企业总体概况 — employee count, revenue, subsector, IT maturity, existing systems
2. 高层战略访谈 — strategic direction, IPO plans, AI expectations
3. 财务管理 — accounting method, pain points (budget/reimbursement/tax/reporting)
4. 营销与客户管理 — sales model, channel digitization, customer profitability
5. 计划与生产制造 — production mode, pain points, automation level, APS/AI needs
6. 采购与供应链仓储 — sourcing model, supplier management, subcontracting
7. 研发项目管理 — R&D mode, pain points, PLM-ERP integration
8. 质量管理与合规 — quality pain points, certifications, inspection methods
9. 信息化期望 — selection criteria, deployment preference, budget timeline, module interest matrix
Report format rules (the default for industry insight documents):
- Cover page with title, subtitle, date, organization
- Table of contents
- Continuous prose with first-line indent
- Data tables embedded in analysis
- All claims cited with reference numbers
- References section at end
Do NOT default to report format when the user said "问卷" or "调查文件" — these are questionnaire signals.
Reference template analysis workflow (when a .docx sample exists):
from docx import Document
doc = Document("reference.docx")
for i, p in enumerate(doc.paragraphs):
style = p.style.name if p.style else "None"
text = p.text[:150] if p.text.strip() else "(empty)"
if text.strip():
print(f"[{i:3d}] [{style:30s}] {text}")
Analyze the extracted structure for: Heading styles, question numbering pattern, option prefix characters, section organization. See references/questionnaire-template-pattern.md for a complete analysis example.
Phase 4: DOCX Generation
Route by .NET availability:
dotnet --version # if succeeds → minimax-docx primary path (C# OpenXML SDK)
# if fails → python-docx fallback
.NET is installed (verified: SDK 10.0.300), so always prefer the minimax-docx path unless explicitly told otherwise.
Primary Path: minimax-docx (C# OpenXML SDK)
Use a standalone console project for structural document generation. This produces professional-quality DOCX with proper TOC, page numbers, headers/footers, and styled tables.
Workflow:
-
Create temp project:
bash cd /tmp dotnet new console -n DocReport --force cd DocReport dotnet add package DocumentFormat.OpenXml --version 3.2.0 -
Write
Program.cs— read the scaffold fromreferences/minimax-docx-integration.mdfor the full C# template with report-style and questionnaire-style helper classes.
Key patterns used in the scaffold:
- DocDefaults — Normal style with 微软雅黑 10.5pt, CJK RunFonts
- Heading 1/2/3 styles with OutlineLevel, dark blue (#1A3C6E)
- Body paragraphs with first-line indent (2 char)
- Styled tables (三线表 style with bottom border + header shading)
- Bullet points
- Cover page (centered title + subtitle + date + org)
- Static table of contents
- Page numbers in footer (Page X of Y via field codes)
- CJK-safe font configuration (w:eastAsia on every RunFonts)
-
Build and run:
bash dotnet run -- output.docx -
Clean up:
bash rm -rf /tmp/DocReport
Advantages over python-docx:
- True TOC fields (dynamic, updatable in Word)
- Professional page numbers (Page X of Y, odd/even differentiation)
- Header/footer per section
- Three-line table style (三线表) with header banding
- Smaller file size, better Word compatibility
- 13 aesthetic recipe support from minimax-docx (IEEE, APA, Nature, etc.)
Fallback Path: python-docx
Only when .NET is unavailable. Read references/python_docx_boilerplate.md for full scaffold.
pip3 install python-docx # if not installed
Key patterns (from the reference file):
from docx import Document
from docx.shared import Pt, Cm, RGBColor
from docx.oxml.ns import qn
doc = Document()
# Page setup
for s in doc.sections:
s.top_margin = Cm(2.54); s.bottom_margin = Cm(2.54)
s.left_margin = Cm(3.17); s.right_margin = Cm(3.17)
# CJK font setup
sty = doc.styles['Normal']
sty.font.name = '微软雅黑'
sty.font.size = Pt(10.5)
sty.element.rPr.rFonts.set(qn('w:eastAsia'), '微软雅黑')
# Heading fonts
for lv in range(1, 4):
hs = doc.styles[f'Heading {lv}']
hs.font.name = '微软雅黑'
hs.element.rPr.rFonts.set(qn('w:eastAsia'), '微软雅黑')
hs.font.bold = True
hs.font.color.rgb = RGBColor(0x1A, 0x3C, 0x6E)
doc.styles['Heading 1'].font.size = Pt(18)
doc.styles['Heading 2'].font.size = Pt(14)
Helper function patterns:
- add_body(text) — body paragraph with first-line indent
- bold(text) — bold standalone paragraph
- blt(text) — bullet point
- blank() — empty paragraph
- tbl(headers, rows) — styled table (centered, Light Grid Accent 1, 9pt)
Phase 5: Reference Collection
At the end of the document, append a "参考文献" section with numbered entries:
【1】Source name. Document title [R/EB/OL/Z]. Date.
Reference types:
- [R] — Report
- [Z] — Policy document
- [N/OL] — Online news
- [EB/OL] — Online resource
- [J] — Journal article
Phase 6: Humanizer Pass — Remove Chinese AI Writing Traces
After the report text is drafted (before or during docx generation), scan for Chinese AI tells and strip them. This is not optional — the user may explicitly demand "去除 AI 写作痕迹" (remove AI writing traces), and even when not demanded, the report reads better.
Scan order for Chinese text:
- High-frequency AI words to remove: 标志着、值得注意的是、赋能、至关重要、显而易见、未来可期、为…奠定了基础、彰显了、凸显了、生动诠释了
- 信号词 to strip or rewrite: 翻译成大白话就是、换句话说、从行业角度看、这意味着什么、一句话概括——直接说结论,不要预告
- 过度正式化 (replace): 范式→做法/路子、服务于→用来、落地→做出来/用起来
- 伪深度升华 (每段末句):检查这句是事实还是评价——评价句通常是伪深度,删了不影响信息量
- 排比三段 (不仅…还…更…、从…到…再到…、让…让…让…):拆成1-2句或删最虚的一段
- 公式化标题:「挑战与展望」「未来可期」等——标题应从内容提炼,不从模板套
- 泛泛结论:结尾段不写空话,改为具体判断或行业观点
Quick check: Read the opening 100 characters aloud. If it sounds like a press release or textbook, rewrite until it sounds like a person talking.
ERP 系统 Value Matching — Deep Pattern
When the user explicitly asks for ERP 系统 value matching (or mentions ERP 厂商/ERP 系统 in the request), go beyond a simple table. Use a 5-layer structure validated across 4 industries:
Layer 1: 行业趋势×能力对照表
A full table mapping 5-8 industry trends to specific customer pains and ERP 系统 capabilities. Each row must be specific to the industry — no generic "数字化解决方案" filler.
Structure per row:
| 行业趋势 | 客户痛点 | ERP 系统解决方案 |
|----------|---------|-----------------|
Layer 2: 核心价值 (4-6 items)
Each value item should follow: headline (bold, with measureable outcome like "批次级成本核算——从算不清到算得明") → body paragraph explaining the mechanism. Use concrete industry terms (e.g., for 农牧: PSY、料肉比、能繁母猪; for 电子: SMT、BOM、良率).
Layer 3: 典型落地路径
Present as a phased timeline table:
第一阶段:基础夯实(1-3个月)→ 上线什么模块,解决什么问题
第二阶段:核心贯通(3-6个月)
第三阶段:智能升级(6-12个月)
第四阶段:产业互联(12个月+)
Layer 4: 竞品对比
Use a structured comparison table, max 6 dimensions, that shows why ERP 系统 beats:
- 传统国产ERP(本地部署老旧产品)
- 国外SAP/Oracle(贵、水土不服)
- 金蝶云星空(通用制造业为主)
Layer 5: 选型结论
End with a 一句话定位 + 3-5条选型理由 that tie back to the industry's specific pain points.
Pitfalls
- Don't assume format: If user says "调查文件" or "问卷", generate questionnaire style, not report style. If unsure, ask.
- Data rigor — never fabricate: User may explicitly demand "数据不能瞎编". Every single data point (revenue, growth rate, penetration, count) must trace back to a search result or authoritative source. Apply citation markers
【1】to every table cell and key claim. If you don't have a source for a number, search again — don't approximate or interpolate. Time-stamp all data with when it was sourced (e.g., "数据截至2026年5月"). - ERP 系统 value section belongs LAST: The report is about the industry first, ERP 系统 matching is the conclusion.
- Large scripts: For documents with 500+ lines of generation code, write the C# file first (under
/tmp/DocReport/Program.cs), thendotnet run. Never use inlineexecute_codefor scripts over 100 lines — it blows up context. For 2万字+ reports, write a markdown draft first as a reference, then build the docx generator from it. - C# CJK font rendering: Always set
w:eastAsiaon RunFonts for Chinese text. Without it, characters may render as boxes (tofu) in some environments. - Static TOC: OpenXML supports real TOC fields (
<w:instrText>TOC \o "1-3" \h \z \u</w:instrText>). When using the standalone project approach, these are dynamic in Word. For the python-docx fallback, hardcode a static TOC. - Clean up temp projects: Always
rm -rf /tmp/DocReportafter generating. For C# projects, this is critical — leftover projects cause confusion in subsequent runs. - C# punctuation in strings: When embedding Chinese text with double-width quotes or smart quotes in C# string literals, use verbatim strings (
@"...") or escape properly to avoid compilation errors.
Visual Output (After DOCX Report)
When user asks for visual presentation after a report:
| Request | Skill | Notes |
|---|---|---|
| PPT | PptxGenJS, 10"×5.625". If ERP 厂商 brand, also load for brand constants. | |
| HTML (ERP 厂商风) | (yonyou-html-presentation) | Gitee CDN logos, red/white/gray brand, scrollable slides. |
| HTML (非ERP 厂商) | or |
General web design. |
CRITICAL: Before coding any visual output, check available skills first — user explicitly corrected about "不看skill". Run skills_list + skill_view(name) for the relevant skill.
The report structure is validated across four industries:
MES/IoT/SCADA penetration, supply chain complexity, SMT & BOM management | 智能制造、供应链、PLM |
CSV validation, GxP compliance, marketing compliance, 药品追溯 | 质量管理、合规、供应链 |
Timesheets, resource utilization, CRM, project P&L, 人天计价 | 项目云、CRM、人力资源 |
猪周期分析、批次级成本核算、饲料原料价格跟踪、非洲猪瘟生物安全、能繁母猪调控指标、料肉比/PSY/死淘率等养殖KPI | 智能制造(批次养殖)、敏捷供应链、数字营销、数智资产 |
Related Skills
- python-docx — Primary DOCX engine. Full-featured OpenXML SDK (.NET) generation with 13 aesthetic recipes, TOC, page numbers, headers/footers, template application. Read its
Samples/directory for C# code patterns. - python-docx — Fallback when .NET is unavailable. Simpler but limited styling. See
references/python_docx_boilerplate.mdin this skill for code scaffold. - — ERP 厂商ERP 系统风格HTML报告生成(Gitee CDN资产)
- — PptxGenJS-based PPT generation
- — ERP 厂商品牌PPT设计规范
Reference Files in This Skill
| File | What It Contains |
|---|---|
references/minimax-docx-integration.md |
Primary C# scaffold for report-style and questionnaire-style docx generation via standalone .NET console project (OpenXML SDK) |
references/python_docx_boilerplate.md |
Fallback Python code scaffold for report-style and questionnaire-style docx generation |
references/nongmu-agriculture-research.md |
农牧行业核心数据速查、政策年表、价格基线、头部企业参考、关键信息来源 |
references/deep-research-docx-pattern.md |
Deep research report docx styling — custom dark-blue table headers with zebra striping, color reference, cover page pattern (absorbed from industry-deep-research) |
references/deep-research-example-tech-services.md |
Real example: 2026-05-25 科技服务行业 deep research workflow, data sources, and value-matching writing tips (absorbed from industry-deep-research) |
references/questionnaire-template-pattern.md |
Complete questionnaire archetype inventory (5 types, 9 sections), formatting rules, and reference docx analysis workflow (absorbed from industry-survey-questionnaire) |