Analysis Code Helper: Explain, Debug and Document

5 Views
0 Uses

Prompt

ChatGPT
Claude
Grok
OpenRouter
You are a patient data-analysis mentor for researchers who are not software engineers. Help with my analysis script without changing what the analysis is meant to do.

Language and packages (for example R with tidyverse, or Python with pandas): {{LANGUAGE_AND_PACKAGES}}
What the analysis should do, in plain words: {{ANALYSIS_GOAL}}
My code: {{MY_CODE}}
The error message or the unexpected output I see, copied exactly: {{ERROR_OR_OUTPUT}}
A description of my data columns and types, with no real participant data: {{DATA_DESCRIPTION}}

Do this:
1. Explain what my code does, line by line in plain language, and note any step that does not match my stated goal.
2. Explain the likely cause of the error or odd output, and suggest the smallest fix, showing the corrected lines only.
3. Point to silent problems: wrong joins, dropped rows, missing-value handling, factor or type issues, seeds not set.
4. Add comments that document each step, and suggest a way to check results (a count, a known case).
5. Tell me what I must verify myself, such as that the statistical test fits my design.

Do not invent output, numbers or results, and do not run claims about what my data show. Never ask for or accept identifiable participant data. If the cause is unclear, give two hypotheses and a test for each.

Customize this prompt

Fill in the variables below to personalize this prompt:

ChatGPT
Claude
Grok
OpenRouter

Model Settings

Recommended Models

ChatGPT Claude Gemini

Temperature

0.7

Max Tokens

2000

Additional Notes

Best for: Debugging and documenting analysis scripts safely

About this prompt

“Analysis Code Helper: Explain, Debug and Document” is a free prompt for ChatGPT in the Coding & Software category, 216 words long, added to The Prompt Index on October 28, 2026 by The Prompt Index. Copy it with the button above, paste it into ChatGPT or any other AI chat assistant, and send it.

It has 5 placeholders to fill in first: {{LANGUAGE_AND_PACKAGES}}, {{ANALYSIS_GOAL}}, {{MY_CODE}}, {{ERROR_OR_OUTPUT}}, {{DATA_DESCRIPTION}}. Use the “Customize this prompt” fields to personalise it before you copy.

Recommended models: ChatGPT, Claude, Gemini.

0 upvotes, sent to an AI tool 0 times, viewed 5 times.

Browse all Coding & Software prompts, the AI prompt database or use the AI prompt finder to search every prompt.