The Friday Afternoon That Gave Me a Headache: How I Use AI to Write Weekly Reports
1. That Friday Afternoon That Gave Me a Headache
Independent developers and small teams probably all know this feeling: the product is up and running, the data is piling up, but the weekly operations report—for partners, investors, and yourself—is always the last thing anyone remembers to do.
My old workflow looked like this:
- Open the database, manually run five or six SQL queries—new users this week, active users, order volume, GMV, retention rate, top 10 products;
- Copy the results one by one into Excel, calculate week-over-week and year-over-year changes;
- Stare at the numbers for ten minutes, trying to remember "what actually happened this week";
- Squeeze out a few hundred words of report text, repeatedly tweaking the wording—should "decline" be softened to "pullback"? Is "surge" too dramatic?
The whole process took an average of 110 to 130 minutes. But the worst part wasn't the time—it was step 3: the numbers were right in front of me, but my brain was already fried, so what I wrote was often "this week's data as follows" followed by a list of numbers. That's not a weekly report; that's number搬运—just shoveling data around.
I also tried having an intern write it, but the training cost was higher than writing it myself, and her understanding of the business metrics never matched mine.
2. What AI Can Do for You Here
The turning point was a simple realization: writing a weekly report is fundamentally not "creation"—it's "translation"—translating SQL query results into text that humans can read, with highlights and context. And that's exactly what large language models are best at.
I broke the whole process into three stages, with AI taking on the two heaviest ones:
Stage one: interpreting the numbers. I paste the SQL results as-is (or pull them automatically with a script) into the AI, along with business context. The AI automatically calculates week-over-week changes, finds anomalies, and points out cross-cutting signals like "order volume went up but average order value went down"—things I often missed.
Stage two: drafting the report. The AI generates a first draft based on the format and tone I specify—a more formal version for investors, a more casual one for the internal group chat, switchable with one click.
Stage three: I review. This step can't be skipped. AI occasionally "over-interprets"—for example, calling a normal cyclical fluctuation a "significant growth trend"—so a human check is needed. But editing a draft is ten times faster than writing from scratch.
The whole process now reliably takes 8 to 15 minutes, most of which is spent verifying the numbers—a step I should have been doing all along, but often skipped when writing everything myself.
3. How to Build It: Three Steps
Step 1: Fix Your SQL Query List
Don't improvise what to query each week. I created a fixed query list file, run a script once a week, and all results are automatically consolidated into a single text block. If you use Python, sqlite3 or pymysql can handle it in a dozen or so lines of code.
Step 2: Feed It to the AI with a Prompt Template
This is the core of the whole approach. If the prompt isn't well-crafted, the AI's output will drift. Here's the template I've refined over several iterations—feel free to copy and modify it:
你是一位数据分析顾问,请根据我提供的SQL查询结果,撰写一份数据周报。
## 业务背景
- 产品:{一句话描述你的产品,例如"一款面向大学生的二手书交易小程序"}
- 当前阶段:{例如"上线3个月,处于增长期"}
- 本周已知事件:{例如"周三开展了拉新活动"、"周五服务器故障2小时",没有则写"无"}
## 数据口径说明
- 活跃用户定义:{例如"7日内有打开行为的不重复用户"}
- 时间范围:{本周起止日期},对比上周同期
- 金额单位:元
## SQL查询结果(上周 / 本周)
新增用户:{数字} / {数字}
活跃用户:{数字} / {数字}
订单量:{数字} / {数字}
GMV:{数字} / {数字}
{其他指标照此格式追加}
## 输出要求
1. 结构:整体概览(2-3句)→ 亮点 → 需关注的问题 → 下周建议关注点
2. 所有百分比和环比数据请基于我提供的数字计算,禁止编造任何未提供的数据
3. 如果某指标波动超过±15%,必须单独解释可能原因;如果无法解释,明确写"原因待查"而不是猜测
4. 语气:{客观、克制,给内部团队看的周报}
5. 篇幅:400-600字
6. 数字保留与原始数据相同的精度,不要四舍五入到失真
先输出周报正文,再单独列出"本次数据中你无法解释的异常点"清单,方便我人工核查。Two parts of the template were added after learning things the hard way: first, "do not fabricate data"—early on, the AI would occasionally invent a "conversion rate of approximately X%", which was alarming; second, the anomaly list at the end essentially makes the AI self-check, and every time it helps me focus on what to verify.
Step 3: Turn It into a Semi-Automated Workflow
My current setup is a single script: pull data → assemble the prompt → call the LLM API → output to a document. API calls are billed by token, and the monthly cost is very low (check the official pricing page for exact rates)—negligible compared to the time saved.
4. Before and After: The Math Is Clear
| Item | Before AI | After AI |
|---|---|---|
| Time per report | 110-130 minutes | 8-15 minutes |
| Monthly time cost (4 weeks) | ~8 hours | ~1 hour |
| Frequency of missed cross-metric anomalies | At least 2 per month | Nearly zero (AI flags them proactively) |
| Report format consistency | Depends on the day | Highly consistent |
| My actual role | Shoveling numbers + writing text | Only review and judgment calls |
Over a month, that's about 7 hours saved—roughly an entire workday. For an independent developer, those 7 hours could mean one more feature shipped; for a small team, it means the weekly report no longer needs a "dedicated person."
There was an unexpected bonus too: since the marginal cost of writing a report dropped to nearly zero, I upgraded from "weekly reports" to "daily reports." Every morning I spend 3 minutes reviewing the AI-generated data summary, and I now catch many problems three or four days earlier than before.
5. A Few Reminders
- Don't skip the review step. AI-generated text is so fluent that it's easy to forget to verify the numbers. My habit is to spot-check two or three key figures against the source.
- Write the business context clearly. "Order volume down 12%" means completely different things in peak season versus off-season. The more context you provide, the more reliable the AI's interpretation.
- Mind data privacy. If the report involves users' personal information, do the aggregation and anonymization at the SQL level first, and only feed the AI aggregated metrics.
- Put metric definitions in the prompt. Ambiguity in the definition of "active users" is the most common failure point in data reports, which is why the template includes a dedicated section for it.
Final Thoughts
The pain point of data reporting has never been "not knowing how to write"—it's "not being worth that much time." Handing off the translation work from SQL results to finished draft to AI, while humans keep only judgment and review—that division of labor, I believe, is the right one.
If you want to build a workflow like this, you'll need a stable LLM API to support scheduled tasks. You can try this platform's registration portal: https://api.thistoken.ai/register —once you've set up your key, that script template can be adapted and running in no time, and next Friday afternoon can be yours again.
---
Ready to try it yourself? Sign up at https://api.thistoken.ai/register to get your API key and start building.
Vous voulez essayer Token.AI ?
Créez une API Key au niveau du projet, activez les canaux dans la console et configurez le routage, les budgets et les journaux d'audit.
注册 ThisToken.AI 并获取 API Key