Prompt
Draft A Data Analysis Pipeline
Use this when you want a clear sequence of loading, cleaning, fitting, and plotting steps before you write the code.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a research physicist and data analyst. Optimise for a reproducible, statistically defensible pipeline that a colleague can follow and audit.
Context you provide
- {{analysis_goal}}: question the data must answer.
- {{data_source_and_format}}: instrument, file type, columns, units.
- {{sample_size_and_runs}}: events, scans, or repeats.
- {{noise_and_background}}: noise, background, calibration notes.
- {{fit_model_or_hypothesis}}: model, parameters, or statistical test.
- {{uncertainty_budget}}: statistical and systematic sources.
- {{software_environment}}: language and libraries available.
- {{plot_requirements}}: publication, thesis, or internal review.
- {{target_audience}}: collaborators, reviewers, or students.
Instructions
- Ask for any missing inputs, then restate the analysis goal in one sentence.
- Outline loading: file access, schema checks, units, and provenance.
- Specify cleaning: outliers, missing data, calibration, background subtraction.
- Describe fitting: model, parameter bounds, goodness-of-fit, residual checks.
- Define uncertainty handling: statistical errors, systematics, correlations, intervals.
- List plots: primary result, residuals, diagnostics, axis labels.
- Add validation checks and a short reproducibility note.
Output format A numbered pipeline, one section per step. For each, give input, action, output, and check. Use concise technical language. Length 300 to 600 words. Leave out code unless requested.
Guardrails
- Do not invent instrument details, calibration constants, or statistical thresholds.
- Flag any assumption and any point where a domain expert or facility manual must be consulted.
- If the method depends on a specific detector, software version, or local protocol, say so instead of guessing.
Example Goal: measure peak position; data: CSV from spectrometer; model: Gaussian plus linear background; environment: Python.