What AI Can and Cannot Do in Data Science
Learning goal: map AI roles across framing, code, debugging, interpretation, documentation; retain human responsibility.
You hand an AI assistant the "Analysis Package" dataset and ask: "Tell me which group most needs attention." It quickly returns a block of code, a chart, and a conclusion: "Group unit_b has the worst numbers; recommend reinforcing it first." That answer looks complete, but it hides several unchecked assumptions: does the AI realize the unit column determines which metric value actually represents this time (case volume, response hours, cost per case...)? Did it exclude rows still marked draft or superseded that should not feed a live analysis? Without a human check, this fluent-sounding conclusion may just be a well-written mistake.
Treating AI output as the answer
"AI says group unit_b has the worst numbers" is quoted straight into the report, with nobody confirming which metric the value column represents this time, or whether draft, superseded, and validated rows were mixed together.
Treating AI output as a proposal, verified by a person
- What AI can do
- Quickly list candidate angles for analysis, draft code, flag possible data issues, translate statistics into plain language, and assemble a documentation draft.
- What AI cannot do
- It cannot confirm whether a column's business definition is correct, cannot guarantee the code truly understands the data's grain, and cannot stand in for a human being responsible for the final conclusion.
- What a person must do
- Confirm the data context, review the critical code line by line, verify the conclusion truly follows from the data, and make the call that the result is trustworthy before it is delivered.
import pandas as pd
# clean: the Analysis Package dataset, one row per capacity record for a service group in a given period
df = pd.read_csv("DS202_Analysis_Package_Clean.csv", parse_dates=["period"])
df.shape
df.dtypes
df[["record_id", "period", "group", "value", "unit", "status"]].head()
# Ask first: what unit does value use this time? How many status values exist?
df["unit"].unique()
df["status"].unique()| Stage | What AI is good at | What a person must still confirm |
|---|---|---|
| Framing | List candidate prediction problems or analysis angles | Which angle truly maps to a business decision |
| Code | Draft loading, cleaning, and aggregation code | Whether column definitions, units, and grain are used correctly |
| Debug | Flag possible errors or inconsistencies | Whether the conclusion needs re-checking once the fix is applied |
| Interpretation | Translate statistical results into a plain-language summary | Whether the summary is more optimistic or definitive than the data supports |
| Documentation | Assemble prompts, code, and conclusions into a draft document | Whether the document honestly reflects limitations and what was not verified |
The same analysis group has a value of 58.4 for some month. If this represents case volume (unit=count), 58.4 cases is a light workload; if it represents average response hours (unit=hours), 58.4 hours is a serious overtime warning. AI's conclusion "58.4, on the high side" could be read either way, and only one reading is correct, unless the unit is confirmed first.
- Confirm which unit (metric) value represents this time, before judging whether a number is high or low
- Confirm whether rows with status draft or superseded have been excluded
- Confirm whether rows with sensitive_flag true, which should not flow into a general analysis, have been excluded
- Confirm the group and period scope being aggregated actually matches the question you want answered
Warning
Info
An AI assistant gives a fluent analysis conclusion about the service data, and the code ran cleanly with no error messages. What does this actually tell you?