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.
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.
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
- If any inputs are missing, ask for them before starting.
- For each cleaning task, describe the steps to detect the issue (e.g., SQL queries, Python functions).
- Provide a plan to correct the issues, including how to handle missing values (imputation, deletion) and outliers (winsorization, removal).
- Outline how to validate the cleaned dataset to ensure no new errors were introduced.
- 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?