Report Generator Agent
The Problem
Section titled “The Problem”Turning raw data into a useful report is tedious. Whether it’s weekly sales numbers, activity logs, or survey results, the task is always the same: summarize, find patterns, highlight what matters.
What we’re building: An agent that takes structured data and produces a clear summary report with key insights, trends, and recommendations.
The Approach
Section titled “The Approach”Our report generator will:
- Accept data in various formats (tables, lists, CSV-style text)
- Identify key metrics and trends
- Generate a structured report with sections and highlights
- Provide actionable recommendations based on the data
Build It
Section titled “Build It”Step 1: Set up your system prompt
Section titled “Step 1: Set up your system prompt”Create a Project on claude.ai with the system prompt below.
Use Custom Instructions (Settings > Personalization > Custom Instructions) or paste the system prompt at the start of a new conversation at chatgpt.com.
If you have a paid plan (Plus, Team, or Enterprise), you can also create a Custom GPT with these instructions for reuse.
Go to gemini.google.com and paste the system prompt at the start of a new conversation.
If you have Gemini Advanced, you can also create a Gem with these instructions for reuse.
Create a Modelfile:
FROM llama3.2SYSTEM """<paste system prompt below>"""Run: ollama create report-gen -f Modelfile
Paste into the System Prompt field.
The system prompt:
You are a data analysis and reporting assistant. You take raw data andproduce clear, professional reports.
When given data:
1. DATA OVERVIEW - Identify the type of data (sales, activity, survey, financial, etc.) - Note the time period covered - Count records and identify data quality issues - If key metrics seem missing or values look unusual, flag them with [DATA CHECK]
2. KEY METRICS - Calculate totals, averages, and percentages - Identify the highest and lowest values - Compare to previous periods if available
3. TRENDS & PATTERNS - Identify upward or downward trends - Spot anomalies or outliers - Find correlations between different metrics
4. REPORT OUTPUT Structure every report as: - Executive Summary (3-4 sentences) - Key Metrics (bulleted highlights) - Detailed Findings (with sections) - Recommendations (2-4 actionable items) - Data Quality Notes (any issues found)
Formatting rules:- Use headers and sections for easy scanning- Bold key numbers and percentages- Use ↑ and ↓ arrows to indicate trends- Include a "Bottom Line" one-liner at the very end- Keep language professional but accessibleStep 2: Test with sample data
Section titled “Step 2: Test with sample data”Paste this sample sales data:
Weekly Sales Report - Coffee Shop "Morning Brew"Week of March 10-16, 2025
Monday: $820 (142 transactions)Tuesday: $750 (128 transactions)Wednesday: $910 (155 transactions)Thursday: $680 (115 transactions)Friday: $1,240 (198 transactions)Saturday: $1,450 (215 transactions)Sunday: $980 (168 transactions)
Top sellers: Latte (320), Americano (245), Cappuccino (189), Pastries (156)New item "Matcha Latte" launched Wednesday: 45 sold in 4 days
Previous week total: $6,100This week total: $6,830The agent should produce a complete report with insights like the weekend surge, the new item performance, and weekly comparison.
Step 3: Try different data types
Section titled “Step 3: Try different data types”- Activity logs from a team (hours worked, tasks completed)
- Survey results (satisfaction scores, open-ended responses)
- Social media metrics (followers, engagement, reach)
- Financial data (income, expenses, profit)
Test It
Section titled “Test It”Use real data from your own work or business:
- Export data from Google Sheets or Excel and paste it as text
- Try weekly vs. monthly time ranges
- Ask the agent to compare two different periods
- Request specific formats: “Make this an email I can send to my team”
Make It Better
Section titled “Make It Better”- Add context: tell the agent your industry, targets, and KPIs
- Benchmark comparisons: include industry averages or your own targets
- Automated formatting: add formatting rules like “always include a chart description” or “highlight anything above/below 10% change”
- Regular cadence: use the same prompt weekly with updated data to build consistent reports
Sample Output
Section titled “Sample Output”Here’s what your agent should produce from the coffee shop sales data:
# Weekly Sales Report — Morning Brew**Week of March 10-16, 2025**
## Executive SummaryMorning Brew had a strong week with total revenue of **$6,830**, up **↑ 12.0%** from the previous week ($6,100). Weekend sales drove the majority of growth, with Saturday alone accounting for 21% of weekly revenue. The newly launched Matcha Latte showed promising early demand.
## Key Metrics- **Total Revenue:** $6,830 (↑ 12.0% vs. previous week)- **Total Transactions:** 1,121- **Average Transaction:** $6.09- **Best Day:** Saturday — $1,450 (215 transactions)- **Weakest Day:** Thursday — $680 (115 transactions)- **Top Seller:** Latte (320 units)
## Detailed Findings
### Daily PerformanceThe week showed a clear pattern: steady weekday sales with a significant weekend surge. Friday and Saturday combined represent **39.4%** of total weekly revenue.
Thursday underperformed with only $680 — this may indicate an opportunity for a mid-week promotion.
### New Product LaunchThe Matcha Latte (launched Wednesday) sold **45 units in 4 days**, averaging 11.25/day. For comparison, that pace would put it at approximately 79 units per week — approaching Cappuccino levels (189/week). Early signs are positive.
## Recommendations1. **Investigate Thursday's dip** — consider a mid-week happy hour or loyalty bonus to boost traffic2. **Double down on Matcha Latte** — the early traction suggests a marketing push could accelerate adoption3. **Capitalize on weekends** — ensure full staffing Fri-Sat as these days generate 40% of revenue4. **Upsell pastries** — at 156 units vs. 1,121 transactions, only 14% of customers buy food. A combo deal could increase this
## Data Quality Notes- All 7 days reported ✓- No missing transaction counts ✓- Previous week comparison available ✓
---
**Bottom Line:** Revenue up 12% week-over-week, driven by strong weekends and a promising new product launch. Focus on boosting the Thursday slump and capitalizing on Matcha Latte momentum.Troubleshooting
Section titled “Troubleshooting”The agent doesn’t calculate percentages correctly. AI agents sometimes make math errors. Always double-check key calculations. Add to your system prompt: “Show your work for all calculations. Double-check all percentages and totals.”
The report is too long or too detailed. Specify length: “Keep the Executive Summary under 4 sentences. The full report should fit on one page if printed.”
The agent misses obvious patterns. Provide comparison data. The agent works much better when it can compare: “Here’s this week’s data AND last week’s data” gives far better insights than one week alone.
The data format confuses the agent. You can paste data in any format: tables, CSV, plain text, or even copied from a spreadsheet. If the agent seems confused, add: “The data above is in [format]. Each row represents [what].”
Free Tools to Enhance This Project
Section titled “Free Tools to Enhance This Project”- Google Sheets: Free. Store your raw data here and copy-paste into the AI for analysis. Keeps a history of past reports.
- Google Looker Studio: Free dashboarding tool. Create visual charts from the same data your agent analyzes.
- Datawrapper: Free tier for creating professional charts. Turn the agent’s findings into visuals you can share.
Making It Better Over Time
Section titled “Making It Better Over Time”- Add your targets: “Our weekly revenue target is $7,000 and we aim for 1,200 transactions.” The agent will automatically compare actuals vs. goals.
- Build historical context: “Last month’s average was $6,200/week.” This gives the agent a baseline for stronger analysis.
- Standardize your format: after a few weeks, note which report sections your team actually reads. Remove sections nobody uses and expand the ones they find valuable.