Back/Data/Goose
BeginnerData

How to Turn Raw CSV Data into Actionable Insights with an AI Agent

Give Goose a bounded CSV question, let it create and run a reproducible analysis, then inspect the calculations, source rows, and assumptions before sharing a self contained HTML report.

How to Turn Raw CSV Data into Actionable Insights with an AI Agent

Jackie gives Goose a local CSV and asks which farm stand items earn the most revenue, which days are busiest, and what trends matter. Goose finds the file, creates a Python environment, analyzes it with pandas, and turns the results into a shareable HTML report with Plotly charts.

Before you start

What you need

  • A CSV with known owner, scope, date range, units, and data dictionary
  • A clear business question and the metrics needed to answer it
  • A safe working directory with permitted data and no unrelated secrets
  • Expected row counts, totals, and a few manually checked records
  • An audience, sharing boundary, and expiration plan for the final report

What you’ll make

A reproducible analysis with code, data quality notes, tables, charts, and recommendations whose calculations can be traced to the input file and rerun after the data changes.

Tools used

  • Goose

    Open-source AI agent by Block for automating tasks

Step by step

The workflow

Follow the sequence once, then adapt the prompts, checks, and handoffs to your own setup.

4 steps

Step01

Prompt Goose for Data Analysis

Point Goose to the exact CSV and define the business question, metric formulas, grain, date range, segments, and output. Ask it to profile the data and propose a plan before calculating.

Example prompt
Analyze [exact CSV path] for [business question]. First report checksum or file metadata, row count, columns, date range, missing values, duplicates, parsing issues, units, and grain. Then show the formulas and analysis plan for [metrics]. Do not modify the source file or infer missing values without stating the rule.
Step02

Observe Goose's Autonomous Workflow

Let Goose create an isolated environment, install the needed packages, write the analysis, and run it. Keep the script, dependency versions, logs, and transformed outputs so another person can reproduce the result.

Step03

Review Generated Insights

Review the generated tables and recommendations against known totals and sampled source rows. Ask for counterexamples, segment differences, and uncertainty before treating a correlation or ranking as a business conclusion.

Example prompt
Audit the analysis for [question]. Reconcile key totals, show representative source rows for each finding, identify sensitivity to missing values and outliers, and list alternative explanations. Separate calculated facts from recommendations.
Step04

Generate a Shareable HTML Report

Ask Goose for a self contained HTML report with methods, coverage, findings, charts, caveats, and source metadata. Remove row level sensitive data, open it from a clean environment, and share it only within the intended access boundary.

Example prompt
Create a self contained HTML report for [audience] from these reviewed outputs. Include source metadata, coverage, metric definitions, methods, findings, charts, caveats, and reproducibility instructions. Use aggregate data only, omit secrets and local paths, and do not claim causation.

What good looks like

  • The analysis reports file, row count, columns, date range, missing values, duplicates, units, and exclusions before drawing conclusions.
  • Key totals and rankings reconcile with independent spot checks or known control values.
  • Recommendations are labeled as interpretations and include the evidence and uncertainty behind them.
  • The HTML contains only permitted data, opens without a private runtime, and is shared with the intended audience only.

Build your next product with ChatPRD

Turn an idea into a PRD, user stories, and a plan.

Try ChatPRD free

After the steps

Runbook notes

How to recover when the loop fails and where human judgment helps.

Recover

If it goes sideways

Goose analyzes the wrong file or stale export
Provide an explicit path or checksum, confirm metadata before analysis, and archive the exact input with the report.
A plausible metric uses the wrong denominator, date field, currency, or unit
Define the formula and grain, inspect the generated code, and reconcile sample calculations manually.
Missing rows, duplicates, parsing errors, or outliers silently change the result
Run a data profile first, state treatment decisions, and show sensitivity with and without questionable records.
The report exposes confidential rows, customer identifiers, or local paths
Aggregate or redact before rendering, scan the HTML, and publish only to an approved destination.

Start shipping
better products.

Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start
No credit card
SOC 2 certified
Enterprise ready