This post is about Waypoint, one of three tools we’ve been building to use generative AI in statistics and data science education. It stands on its own, but if you’d like the wider picture, the first post of the series introduces all three.
Earlier this month, I was in Burkina Faso, running a workshop for researchers and practitioners from the CRFS McKnight programme. Part of it was demonstrating how general-purpose AI tools handle data analysis. So, we asked a participant to volunteer their data, and we analysed it live with ChatGPT.*
They gave us their agriculture data, and their research question: Characterise the farms and the agricultural practices in the data. ChatGPT gave us a lot of images of chicken farming. 25 of them. None of them useful. Hardly any contextually appropriate. Some were at least in Burkina Faso, but others were in South Korea or Denmark!
Excluding the images, it also gave us 19 pages of output. Right at the end was a small paragraph, less than half a page, with an “Important methodological note”, commenting that “The dataset contains some missing values, inconsistent spellings and numerical entries that require cleaning.”
So it knew the data needed cleaning. It just gave us the key findings first, and mentioned the cleaning as a note afterwards.
*I should say I used a different account to my usual one. I talk about good statistical practice in my own accounts with generative AI so much that it’s learnt what I do not want from it, which wouldn’t have been a fair example!
What I kept seeing
I ran this exercise live without knowing what would happen. I’d never seen the data, the methods were whatever the AI chose, and it was in French (which I don’t speak). But I was confident of the result: It would do it irresponsibly. Because it does, all the time. I’ve watched students use general-purpose AI to analyse data, and played around with it myself out of curiosity, and the same things keep happening.
- It makes decisions for you about your data.
Cleaning is skipped, or comes later, and the AI meanwhile decides things on your behalf. In the Burkina Faso example, it noted the missing values, but carried on regardless. It also makes assumptions about your data, such as that two villages are the same village, and that it must be a typo! But what if they’re not? What if they just sound similar? What about Gouindougouni and Gouindougouba? Is that a typo, or the same village? Will ChatGPT or Claude even ask?
- It jumps straight to modelling.
When we did the same exercise in Mali and Niger, it modelled before cleaning the data. But, how can we fit models and make inferences if the data is not cleaned?
- It suggests overly complex methods.
When we had a student use ChatGPT to analyse their data in Rwanda, it fitted a random forest model when a linear model would have been enough.
This is where it becomes irresponsible. Real data is messy. It has values that are impossible, or missing, or incorrect, or extreme, and what you do about them changes what you find. If a model is fitted first, those decisions get sidelined, and you can’t tell how much the answer depends on them.
But it is useful
None of this means AI isn’t useful for data analysis. Coding has been a bottleneck to doing statistics and data science for a long time. Many courses start with the software, usually R, and then with syntax. That’s useful sometimes, but not always. If you want to teach students how to visualise variability, for example by plotting rainfall for each month and noticing the patterns in different months, much of the focus ends up on the syntax for faceting and filtering, rather than on what the plots tell you.
(I’m not trying to dismiss coding, but there’s a time and a place for it – it’s a separate skill to learn in a separate lesson.)
So it’s no surprise people are excited about AI. It looks like it finally removes that bottleneck, and we’ve been wanting that for years. We started building R-Instat, a point-and-click interface to R, 11 years ago to help solve this problem!
I saw that excitement at ICOTS, the international conference on teaching statistics, in July. This was my first ICOTS, and I was absolutely in my element. There was a lot of excitement about AI making data analysis more accessible, and about the barrier to doing good data science or statistics getting lower. I share it. In the sessions I attended, it was doing a good job, particularly with clean data or classic datasets like the penguins data.
But only if…
I have several concerns, including about giving data that could be sensitive or private to AI. (More on that at the end.) But here’s my main concern for this post. If we simply hand our data to a robot, it makes the decisions for us: what counts as an outlier, how to handle the missing values, which models to fit. What I didn’t see much of at ICOTS, yet, was talk about who makes those decisions. This isn’t a criticism. A lot of what we know about good data education comes from that community, and it’s early days. But it stayed with me.
We as humans still need to look at our data. We need to understand it: see each variable individually, answer questions about it, and actively make the decisions. The user should be making the decisions, not the AI. (I’ll come back to a good example from Mali below.)
Our work in statistical consultancy has always started by looking at the data, not at models. You start with what the person is trying to find out, then you look at each variable, clean the data with them, and only then analyse it. The person with the data makes the decisions, because they know it.
So the question became: what if we could put that way of working into an AI system?
Waypoint
This is where Waypoint comes in. Waypoint is a tool you can download from statsbooks.idems.international, under “Data Analysis Tools”. Behind it is a skills file, a set of instructions that guides the AI. You can download that on its own and use it directly with ChatGPT or Claude instead. It guides you through your data in steps, using three agents: a Planner, an Executor and an Interpreter. You loop through the steps many times, and you can clean your data with it, explore it, analyse it, and present it.
The statistical ideas we’ve been encouraging for years are built into it, so that it can help you use AI responsibly with your data. It cleans your data with you rather than making assumptions, and it will not to change your data without your consent. (So where the general-purpose AI quietly decided on your behalf, Waypoint asks.)
You can get a report in a format of your choice, such as HTML or Quarto, with the code, running through what you did. You can use R or Python, work in French or English, and just insert your own API key to pick which generative AI model to use.
Trying it in the Sahel
After showing how ChatGPT and Claude handle data analysis “unstructured”, we introduced participants to Waypoint (and to putting a skills file into Claude or ChatGPT) to analyse their own data. There was real excitement that this analysis is now at their fingertips. They could look at their own data, themselves, and some really good insights came out.
In Mali, Waypoint flagged a potential duplicate to one participant, after it spotted that some farmers had the same name and phone number. The key word here is flagged. It didn’t change anything, whereas in my experience general-purpose tools tend to just make the call. It checked with the user, and the participant explained to me that, actually, these weren’t duplicates at all. In this context, not all farmers have phones, so some of them put down their neighbour’s number. They were just using someone else’s phone number! That’s exactly the sort of decision I want the person with the data to make. Waypoint couldn’t have known that, and neither could I.
In Niger, one participant had made rainfall plots, faceted by month. They noticed something odd in October and wanted to dig into it. I said, okay, just ask for October so you can explore it more. And they were really excited about that. They didn’t have to work out the code, or wait for someone else, but could follow their own curiosity, and had the autonomy to do it themselves.
How would we know it’s responsible?
I want to be careful here. Waypoint is designed to guide people towards better practice, but building safeguards into a system isn’t the same as knowing they work.
The workshops were like a pilot. We didn’t know how it would stand up with different people, or different data, or whether it would work in French or in Python, or how it would be received. We made a lot of changes each evening, ready for a new version the next day. But it stood up well in all three workshops, and people were able to analyse their own data.
We’ve got a lot still to learn about how well it works, and how we’d even measure that. But it looks to me, at this stage, to be far more responsible than general-purpose AI tools used on their own. In Mali, for example, it flagged the possible duplicates rather than deciding for us.
What next?
There are so many ideas for Waypoint, to make it more responsible and help it hold up at a high standard, and there’s a whole list of advancements to work through. Most of all, we’d like to find a way to use a generative AI tool that isn’t one of the big ones, and which can run on its own server. (That would also help with the concern I mentioned earlier about sensitive or private data: it would stay on your own computer.) But it’s an exciting start.
This is the third in a four-part series. Read next: How Can AI Help in Writing Questions?
Explore Waypoint at statsbooks.idems.international.