“Perfect Ticket” Generator

AnalyticsData EngineeringBusiness IntelligenceWorkflow Automation

Problem Statement

The goal is to convert ambiguous analytics requests from stakeholders into precise, actionable data tickets. These tickets should clarify scope, tighten metric definitions, identify missing context, and produce a structured spec with acceptance criteria and a SQL skeleton outline. The workflow ensures consistency, reduces back-and-forth, and supports accurate analytics delivery.

Steps

1

Ingest Raw Request

INGEST

Collect the raw stakeholder request text, along with requester role, intended audience, and any known data environment context. Normalize the input into a structured internal representation.

2

Infer Missing Context

EXECUTE

Analyze the request to identify ambiguous terms, unclear metrics, missing filters, or unspecified dimensions. Infer potential meanings using domain knowledge without inventing tables or data.

3

Generate Clarifying Questions

EXECUTE

Create up to six high‑impact clarifying questions ranked by their effect on correctness. Include multiple plausible metric definitions where ambiguity exists.

4

Draft Perfect Ticket Specification

EXECUTE

Produce a structured analytics ticket including goal, metric definitions, grain, segments, filters, acceptance criteria, and edge cases. Clearly separate MVP from nice-to-haves.

5

Produce SQL Skeleton and Validation Checklist

EXECUTE

Generate a CTE-based SQL skeleton referencing UNKNOWN tables when precise names are not provided. Add a validation checklist describing how to confirm correctness.

6

Validate Consistency

EXECUTE

Check that the ticket is internally consistent, avoids scope creep, and adheres to constraints such as not inventing table names and including required elements.

Prompt Configurations

Analytics Ticket Drafting Prompt

Model: gpt-4oTemp: 0.7
You are an expert analytics PM. Convert the following ambiguous request into a structured analytics ticket. Maintain a clear, concise, and pragmatic tone. Do not invent table names; if unknown, label them UNKNOWN. Do not add scope creep. Follow these requirements: 1) Produce up to six high-impact clarifying questions. 2) Create a perfect ticket specification including: goal/decision to support, metric definitions with inclusions/exclusions, plausible metric alternatives if ambiguous, grain, filters, segments, required breakdowns, MVP vs nice-to-have, acceptance criteria (3–7 items), and edge cases (minimum two). 3) Add a SQL skeleton using CTEs with placeholder table references. 4) Add a validation checklist. Only use information provided in the input; do not hallucinate data. Use a professional but accessible tone.

Example Inputs/Outputs

Input:

Raw request: 'Can you tell us how engaged new users were last quarter? Marketing wants this for a deck.' Requester role: PM. Audience: Marketing execs. Data environment: Snowflake + Looker; known dashboards: User Growth, Engagement Overview.

Output:

Clarifying questions: 1) How are we defining 'engaged'? Options: a) users with >=1 session, b) users completing key action, c) users with time-on-site above threshold. 2) Should 'new users' refer to first-ever signup or new to specific product area? 3) What qualifies as 'last quarter' relative to fiscal vs calendar? 4) Should we segment by acquisition channel? ... (output continues with full ticket spec, acceptance criteria, edge cases, SQL skeleton, and validation checklist).