Report Generator
Overview
Create clean, decision-ready reports from structured data files or user-described datasets. Prioritize business readability: clear KPIs, trend visuals, concise narrative insights, and practical recommendations.
Workflow
- Validate input data source (CSV/XLSX/JSON or user-provided schema description).
- Identify report goal and audience (executive summary vs operational detail).
- Compute KPIs and trends relevant to the goal.
- Generate visuals (bar + line at minimum; add breakdown charts as needed).
- Produce formatted report sections in this order:
- Executive summary
- KPI dashboard
- Detailed analysis
- Charts/tables
- Recommendations
- Sanity-check numbers and narrative consistency before returning deliverable.
Report Blueprint
Use this canonical structure unless user asks otherwise:
report = {
"title": "Monthly Sales Report",
"period": "January 2024",
"sections": [
"executive_summary",
"kpi_dashboard",
"detailed_analysis",
"charts",
"recommendations",
],
}
KPI Defaults
Use these by default when fields exist; adapt names via user mapping when needed:
- Revenue total / average
- Order count and average order value
- Growth rate (period-over-period)
- Top category/product/customer by contribution
- Trend direction (up/down/flat)
Output Rules
- Keep narrative concise and business-facing.
- Highlight 3-5 key findings max in executive summary.
- Flag missing/dirty data explicitly.
- Never claim causality without supporting data.
Implementation Resources
- Use
scripts/generate_report.pyfor deterministic report generation. - Use
references/report-templates.mdfor section templates and phrasing patterns. - Use
references/chart-guidelines.mdfor chart selection and formatting standards.