Reconstruct the calculation logic behind a reported number
Inherited dashboards often show metrics with no documentation of how they are calculated. Before you can trust or replicate a number, you need to reverse-engineer the logic—this prompt walks through that systematically.
I have a reported metric that I need to understand and replicate, but there is no documentation for how it is calculated. Here is what I know:
- Metric name as it appears in the report: {{METRIC_NAME}}
- The value(s) reported: {{REPORTED_VALUES}} (include date range or segment if known)
- Data sources I have access to: {{AVAILABLE_DATA_SOURCES}}
- Any related metrics shown alongside it in the same report: {{RELATED_METRICS}}
- Business context (what team owns this, what decision it informs): {{BUSINESS_CONTEXT}}
Please do the following:
1. Based on the metric name and context, propose 2–3 plausible calculation definitions (e.g., for 'active users': distinct users with any event vs. users with a qualifying event vs. users with sessions above a length threshold).
2. For each definition, write the corresponding SQL pseudocode using placeholder table names so I can adapt it to my actual schema.
3. Suggest a verification approach: how would I know which definition is correct? Describe what test or cross-check I should run (e.g., compare the result against a related metric, ask a specific question to the original report owner).
4. List the 5 most common reasons a replicated metric diverges from the original (timezone handling, deduplication logic, inclusion of nulls, filter order, etc.) so I can check each one.
5. Produce a one-paragraph documentation draft I can save once I confirm the correct definition, written so a new analyst can understand it without asking follow-up questions. {{METRIC_NAME}}{{REPORTED_VALUES}}{{AVAILABLE_DATA_SOURCES}}{{RELATED_METRICS}}{{BUSINESS_CONTEXT}}
How to use this prompt
- Copy the prompt above (Copy button on the top-right).
- Replace each
{{VAR}}with your own value. Variables:{{METRIC_NAME}}{{REPORTED_VALUES}}{{AVAILABLE_DATA_SOURCES}}{{RELATED_METRICS}}{{BUSINESS_CONTEXT}}. - Paste it into one of the recommended tools below.
- Iterate: tighten constraints in the prompt if the output is generic.
Why this prompt is structured this way
The prompt is split into explicit steps because LLMs do better when the path is named, not implied. Each variable forces specificity at the input layer — vague inputs get vague outputs.
Pair this prompt with a tool
Notion AI
$8/user/mo add-onAI baked into the docs/wiki/projects tool you already use.
Notion AI is unremarkable as a standalone writer but indispensable if Notion is your team's source of truth — it works on the docs and databases you already have.
Cursor
$20/moAI-first code editor forked from VS Code.
Cursor is VS Code with first-class LLM integration. Multi-file edits, codebase Q&A, autocomplete that's actually useful. The default IDE for many shipping engineers in 2026.
Claude (Anthropic)
$0/mo (Pro at $20)Frontier model with long context and strong reasoning.
Claude (Opus / Sonnet / Haiku tiers) is the assistant favored by writers and engineers who care about reasoning quality and tone. 1M token context on Opus.
ChatGPT (OpenAI)
$0/mo (Plus at $20)The category-defining general-purpose AI assistant.
ChatGPT has the broadest feature surface: image gen, voice, custom GPTs, web browsing, code execution. Often the right default; sometimes beaten on specific tasks by Claude or Perplexity.
The PlaybookPrompts weekly
One short email per week. The five sharpest prompts we found, one tool worth your attention, one anti-pattern to avoid. Unsubscribe in one click.
Newsletter signup is not configured. Set PUBLIC_NEWSLETTER_USERNAME in the build env.