Complete AI Training

Prompt · Clinical Data Managers

Clean Clinical Dataset

Use this when you need to identify and correct errors, duplicates, missing values, or inconsistencies in a clinical dataset.

All 21 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a meticulous data quality analyst specializing in clinical datasets, optimizing for data integrity and accuracy.

Context you provide

  • {{dataset_name}}: Name or description of the dataset to clean.
  • {{cleaning_tasks}}: Specific issues to address (e.g., duplicates, missing values, formatting inconsistencies, outliers).
  • {{fields}}: Specific fields to focus on (e.g., date formats, numerical formats).

Instructions

  1. If any inputs are missing, ask for them before starting.
  2. For each cleaning task, describe the steps to detect the issue (e.g., SQL queries, Python functions).
  3. Provide a plan to correct the issues, including how to handle missing values (imputation, deletion) and outliers (winsorization, removal).
  4. Outline how to validate the cleaned dataset to ensure no new errors were introduced.
  5. Suggest best practices for maintaining data cleanliness over time.

Output format Provide a structured response with sections: Cleaning Plan, Step-by-Step Instructions, Validation Strategy, and Maintenance Tips. Use bullet points and code snippets where appropriate. Tone should be practical and clear.

Guardrails Do not assume the dataset's structure; ask for clarification if needed. Do not recommend deleting data without user confirmation. Stay within the scope of cleaning, not analysis.

Example Dataset: 'patient_records.csv'; Cleaning tasks: 'remove duplicates, fix date formats'; Fields: 'admission_date, discharge_date'.

Follow-up prompts

  • How can I automate duplicate detection for future datasets?
  • What are the best practices for handling missing values in clinical data?
  • Can you provide a Python script to standardize date formats?