Selected work
Case Study Synthetic Reporting Demo

Campaign Wrap-up Workspace

A clean-room portfolio demonstration that turns structured campaign data into a reviewable wrap-up while keeping calculations, generation, and quality checks visibly separate.

Workflow
Data contract to stakeholder brief
Core stack
Python, Pandas, Streamlit
Generation
Optional API or deterministic fallback
Synthetic Campaign Wrap-up Workspace client brief showing campaign outcome, calculated KPIs, tactic evidence, and recommended actions.
Client brief generated from the bundled synthetic campaign sample.

The Reporting Problem

Reliable wrap-ups start before the narrative.

Campaign reporting is not only a writing task. An analyst must reconcile fields, validate delivery, calculate comparable KPIs, identify which evidence supports a recommendation, and shape the result for stakeholders. Sending raw rows directly to a language model would hide those decisions and weaken trust in the output.

The demo turns that process into an inspectable workflow. Analysts can trace the numbers, stakeholders can see the evidence behind the brief, and engineers can identify where loading, retrieval, generation, evaluation, and approval would sit in a production system.

Workflow

From synthetic CSV to a grounded wrap-up.

Each stage has one job and leaves evidence for the next stage to inspect.

  1. Load synthetic campaign data

    Start from the bundled sample CSV, a user-supplied synthetic CSV, or a local table-shaped loader that marks the future warehouse boundary.

  2. Validate the data contract

    Check required fields, date parsing, numeric values, negative values, and optional evidence before any report is produced.

  3. Calculate KPIs in Python

    Derive delivery, CTR, CPM, CPC, CPA, CVR, pacing, video completion, and ROAS from structured data rather than model output.

  4. Retrieve reporting guidance

    Select relevant guidance from a small synthetic markdown knowledge base so the narrative receives explicit definitions and reporting rules.

  5. Build the reporting context

    Combine the calculated summary and retrieved guidance into a bounded input that can be inspected before generation.

  6. Generate or fall back

    Use optional model-backed generation when configured, or produce a deterministic offline wrap-up from the same calculated evidence.

  7. Evaluate before review

    Check section coverage, numeric grounding, recommendation support, and missing metrics before presenting the client brief and analyst evidence.

Design Decisions

Keep calculation outside the language-model layer.

Python owns the numbers

KPIs are calculated from validated rows and serialized into a campaign summary. The generation layer receives those results; it is not asked to calculate or infer them from raw campaign data.

Generation owns the narrative

Retrieved guidance and calculated evidence provide a bounded context for explanation and recommendations. If model access is unavailable, the same evidence drives a deterministic report.

Evaluation remains visible

Numeric claims, expected sections, missing evidence, and recommendation language are checked separately, making failure modes easier to inspect and test.

Interface Evidence

One workflow, three review perspectives.

The interface separates the stakeholder summary from metric evidence and report-quality checks.

Safeguards and Direction

Useful offline today, explicit about production gaps.

Checks in the portfolio demo

  • Required-column, date, numeric, and negative-value validation
  • A calculated-number allowlist for detecting unsupported numeric claims
  • Rule-based checks for unqualified budget or scale recommendations
  • Explicit unavailable states for missing pacing, video, or revenue metrics
  • A deterministic offline path that remains useful without an API key

Required for a production implementation

  • An approved BigQuery connector with managed service-account access
  • Structured output contracts and versioned reporting definitions
  • Human approval before stakeholder-facing publication
  • Evaluation logging, monitoring, authentication, and role-based access

What This Demonstrates

Business workflow translated into a testable system.

The case study combines reporting-domain framing, Python data work, retrieval, optional generation, evaluation, and stakeholder-facing communication without exposing private work material.