This post is about textbook variants, 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.
In my first post about Google’s Learn Your Way series last year, I described adapting statistics courses for different audiences. We had taught the same courses to working professionals in Niger and to Master’s students in Kenya, but with completely different datasets, examples, and case studies.
What I didn’t say was what happens to those adaptations afterwards.
Take a course we teach, An Introduction to Working with Data. We originally wrote this course for students in Benin, Burkina Faso, and Niger. Since then, colleagues in West Africa have adapted it to an agricultural context for research methods support workshops, and translated it into French. They use it for training courses, adapting it and sending me feedback as they go. I’ve also adapted it for an eye-opener course on a masters we teach with the Open University of Kenya (OUK).
Some of these changes are deliberate and controlled. The same STACK question is in there, and the same videos, but with a different case study. In one it might be about rainfall and yields, and in another about mobile phone and internet usage. It’s the same question, with the context changed.
But other changes are improvements, or come from real-world feedback. Someone improves an explanation in one version, and none of the other copies know about it. After a while, you’ve got several versions of “the same” course, each slightly different, and no easy way to share what each has learned.
This is one of the problems that we’ve been working on this year.
Starting with open textbooks
We chose textbooks as the place to build this, because there are so many good open ones.
The first step was to find textbooks with licences that let others adapt and share them. I confined this to statistics and data science, since otherwise there is an overwhelming amount! Even then, I looked through over a thousand books to decide which we could include, and eventually made a shortlist of 40.
We then used generative AI to convert them into PreTeXt, an open-source system for authoring and publishing textbooks. (Along the way, we built a system called LyreTeXt to help with this conversion.) We checked that the books were faithful to their original sources once converted, which took the most time. We emailed the authors, and put the books on a website, which we presented at ICOTS13 in Australia in July. You can explore them at statsbooks.idems.international.
From copies to variants
In September, we moved on to the next stage. Having a library of books is one thing. What if you want to change one?
While I was working on converting the statistics and data science textbooks, my colleague, Gabe, was building a system that could handle variants. Rather than a complete copy of a book, a variant is defined by what’s been changed. Everything you haven’t touched still comes from the original, so when an error is fixed in the source, the fix can reach every variant that hasn’t changed that part, and variant owners choose whether to take it. And the differences between versions stay explicit, so you can see exactly what was changed. (There’s some clever mathematics behind how it tracks differences, but I’ll leave that to Gabe to discuss another day!)
The same approach can support different contexts, languages and software. And it brings us back to An Introduction to Working with Data. We’ve now put that course into a book, which means we can adapt it much more easily. I’ve been playing with it, starting with a Kenyan context, then for Python rather than R. Then for students in Ghana, then a Sahel context for working professionals, and then into French! We hope to go further, and start adapting it for specific training courses.
Where did AI come in?
We took 15 of our books and adapted them to a Sahel context using generative AI. It drew on the CRFS context for case studies and examples, such as their website, and swapped our examples for CRFS-specific ones. They were all in English at first. We then translated them into French, again using AI, along with another two books that we’d written ourselves and that already suited the context.
But the AI was only one part of it. When AI changes a book, it can change a lot at once. With standard tools for tracking changes (git, the system software developers use), those changes show up as line-by-line differences, and they can overwhelm anyone trying to review them. Gabe’s system groups changes by what they were meant to do, so we can review them in human-sized pieces, at the level of the intended change rather than the line. Every variant also stays connected to its source. It makes it practical to let AI make changes and still check them.
And the AI can’t tell us what a good adaptation looks like. In the workshops, participants flicked through a lot of the variants and, inevitably, found errors. That was really useful, because it’s their context. One example was millet. There’s different types of millet, but in the Sahel it’s almost always pearl millet, so when someone says “millet” in the Sahel, they mean pearl millet. The books had spelled out “pearl millet” every time. That’s not wrong, exactly, but it’s not how anyone there would say it. This is exactly something that having these experts and this context goes beyond what generative AI could do.
What does personalisation mean here?
In my second post last year, I asked whether personalising learning materials for individuals might cost us something that learning together gives us. I wondered whether the interesting question wasn’t whether to personalise, but what we personalise and what we keep shared.
Google’s Learn Your Way personalises materials for every student, generating a separate set for each. Our variant system is different. A variant is adapted for a context by people who understand it, and then a whole class can work from it. The class still has something in common to discuss. The teacher still decides what’s appropriate. And that same shared book could still have personalised support, such as extra explanations or practice, layered on top. This is what we mean by personalisation for the classroom, not just the individual.
Trying them in the Sahel
In the workshops, participants got to see the variants, and they were impressed! The reactions differed between places. In Niger, participants were keen to start creating variants themselves. In Mali, they wanted more, especially on responsible AI, and the variant system means we can say yes. Like An Introduction to Working with Data, we have a responsible AI course written for the Open University of Kenya, starting in January 2027, so we can adapt that for a Sahelian context too.
Of course, this is early feedback, not evidence that these books improve learning. But, it is exciting that the groundwork is in place to support building more variants, and that they were received so positively.
What next?
There’s plenty still to work out. How do we make it easy for educators who aren’t technical to create and edit variants? How do improvements get shared, so that a correction or a better explanation in one place can benefit others? (Collaborative approaches like COCOA are already exploring this.) And do these books actually help students learn?
But I find it exciting that in the Sahel, people started to ask questions on how to make them their own.
This is the second in a four-part series. Read next: Can AI Help Us Think Statistically?
Explore our growing collection of open statistics and data science textbooks at statsbooks.idems.international.