Skip to content

1.1 Step by step working with AI

A step by step approach to data science

The analysis in this lesson is done inside a folder you can download and use yourself: human-agentic-data-analysis. It is an Obsidian vault, where Report.md is a template for the report you will end up writing. Appendix.md is the running record of everything you did to produce it. And instructions.md is the file that tells the agent how to behave. The folder also contains Attachments/ , which holds the source data and is never modified; Code/ holds the analysis scripts and the Python environment and Sample Report/ holds the an example report for reference. This setup inside Obsidian is shown below.

The Obsidian window for the human-agentic-data-analysis vault, with the file list on the left showing Report.md, Appendix.md and instructions.md beside the Attachments, Code and Sample Report folders, the report open in the editor, and Claude running in a panel on the right

The instructions tell the agent to do one step of data analysis per request, and then stop. It says what changed, says what it found, proposes the next step, and waits. It does not add analysis, statistics, charts, findings or report prose you did not ask for. This is deliberate, and it is the opposite of what an agent left to itself will do. You are being kept in the loop on purpose, because the choices made along the way are yours and not the agent's.

The work proceeds through eight steps, in order. You ask for each one; the agent does not begin a step until you do.

  1. Import and scope the data. The agent records where the file came from and describes what is in it, and you decide which part of it the analysis will use.
  2. Frame the research question. You agree what is being asked before anything is tested, working from what the variables mean rather than from what they show.
  3. Visualisation. Each sub-question gets a chart or a table, proposed before it is made and added to Report.md once you have agreed it.
  4. Statistical tests. Each sub-question is answered with an estimate and an interval, using a method whose assumptions were named and checked first.
  5. Conclusions and limitations. The Discussion is written, with each limitation placed beside the conclusion it qualifies.
  6. Background and abstract. The literature goes in — the one part of the report that does not come out of your data — and the Abstract is written last.
  7. Read through. The whole report is read start to finish in one pass, and the agent lists what is wrong rather than fixing it as it goes.
  8. Export. The report becomes a Word or PDF file, while Report.md remains the version that is true.

Two documents are being built the whole way through. Report.md is the statistical argument and conclusions. Appendix.md is the record of the decisions, the reasoning, the things tried and abandoned.

A pre-Agentic AI statistical test would usually be a graph, a model fit and maybe a p-value. The output of this process is a report that explains the whole approach. We should not, though, see the report as a ready to go article! It is an internal document which helps you document what you have done.

Keeping yourself in the loop

The basis for this approach builds on the paper by Mitchell, Ghosh and Passi (2026), AI Agents Push Humans Out of the Loop. The authors show that, in many cases, having a human working with an AI does not mean that the human is making the decisions. An agent working on its own can produces a stream of reasoning traces, tool calls, plans and outputs that is longer and faster than anyone can follow. While it does this, the user is expected to do several different roles at once: use the system for their own ends, authorise each action, and be the expert judging whether each action was right. What happens in practice is approval fatigue: people keep clicking approve and stop reading what they are approving. "Human-in-the-loop", they write, "is only a meaningful solution if the human can independently see into the loop."

Three panels — discriminative, generative and agentic AI — each showing the same small figure of an overseer watching a loop that grows from a single score, to more text than can be read, to many cascading steps and sub-agents, with the return arrow fading across the three

The eight steps we outline above are an attempt to build that in to your work. In the paper's vocabulary they are strategic friction: cognitive work deliberately required of the user before or alongside the agent's. Step 2 is what they call a pre-commitment mechanism — you fix the question before any result exists, which guards against anchoring bias and leaves an audit trail of what you tried to do. This refelcts the underlying idea of a cognitive forcing function (Buçinca, Malaya and Gajos (2021)). Steps 3 and 4 are action gating: the agent says what it proposes to plot or to test and what that method assumes, then waits, rather than handing you a finished result to wave through. The one-step-per-request rule is their batch review, where a logical unit of work is surfaced whole so that related decisions can be judged together. None of this is friction for its own sake. It follows from their central claim, which is that current agent design centres the agent — systems surface their own processing on their own terms — and that effective oversight requires centring the user instead. In this setup the agent does write its own results but only in specified sections and when the step is completed.

The rules about how the report is written are also a style guide. The report is not allowed to grade its own evidence — no striking, reassuring or remarkable. You are expected to decide how to interpret the results. Nothing in Report.md is bold, since emphasis tells a reader which numbers matter. Every number has to come from the generated output, never from memory and never read off a figure. And we remove repeptive sentences, getting direct to the point. Between them these strip out a good deal of what the studies above found people mistaking for accuracy, and leave a report that has to convince you with numbers you can go and check rather than with prose that merely sounds convincing.

We don't claim this approach fixes all the problems. Mitchell and colleagues take their main warning from Bainbridge's "Ironies of automation" (1983): the better the automation, the more the operator's skill and situational awareness decay, so the rare and difficult cases where a human is most needed are exactly the cases where the human is least equipped to help. The research they review reports skill atrophy and "intuition rust", reduced vigilance, diminished critical thinking and overreliance. The most pointed of these is a multicentre observational study of endoscopist deskilling after exposure to AI in colonoscopy (Budzyń et al., 2025) and a systematic review of students using AI dialogue systems (Zhai, Wibowo and Li, 2024) raises the same concern for cognitive abilities. Expertise is not protection — experts over-rely too (Gaube et al., 2021), and the effect is most pronounced just outside their own speciality, as with a developer using an agent in a language they do not know (Dhanorkar, Passi and Vorvoreanu, 2026). You should perform the underlying task unaided on a regular basis, take breaks, rotate between assisted and unassisted work.

Studies have found that people judging accuracy by things that do not track accuracy: a fluent writing style and the presence of citations (Vorvoreanu et al., 2025), a plan read as a faithful proxy for what the agent would actually do, code assumed correct because it passed its own tests (Dhanorkar, Passi and Vorvoreanu, 2026). A report of the kind this folder produces is fluent, structured and referenced throughout. We will return to these points i 1.7 Turning your analysis into a report.

Exploratory data analysis

When we follow the steps in this section we are performing exploratory data analysis. We are looking for interesting patterns in existing data rather than testing predefined hypotheses.

The core difference between exploratory and confirmatory analysis is when the hypothesis is specified relative to when the data is seen. Exploratory data analysis, in Tukey's sense, looks at data to find out which questions are worth asking — plotting, summarising, slicing by subgroup, trying transformations, noticing what stands out — and its output is candidate hypotheses. Confirmatory analysis takes a hypothesis fixed before the data was examined and asks whether this data supports it. The distinction matters because p-values, confidence intervals and error rates only really make sense in confirmatory analysis. Tukey's own framing was that exploration is detective work and confirmation is the trial — and you do not let the detective be the judge on the same case — from which follows the practical rule that confirmation needs data not used for exploration, whether freshly collected or held out.

The same divide is described under many other names: hypothesis-generating versus hypothesis-testing, abductive versus deductive, post hoc versus pre-registered, discovery versus validation sample, training set versus hold-out, screening versus confirmatory trial, exploratory versus primary endpoint.

Exploratory work carries lots of risks! Data dredging, p-hacking, HARKing, and Gelman and Loken's garden of forking paths. This latter catches the honest case where you ran a single test but would have analysed differently had the data looked different. In practice a lot of analysis sits somewhere between the two. There is nothing wrong with an exploratory finding reported as an exploratory finding. But it is important to acknowledge that almost always when doing statistics with agentic AI you are exploring, rather than confirming. Not least, because when you are using an LLM to draw hypotheses, it has already been trained on data that could be relevant to your study problem. Furthermore, it is often looking at the data iteself