More than two decades after J.K. Rowling introduced the world to a universe of magical creatures, forbidden forests and a teenage wizard, Harry Potter is finding renewed relevance in a very different body of literature: AI research.

A growing number of researchers are using the best-selling Harry Potter books to experiment with generative artificial intelligence technology, citing the series’ enduring influence in popular culture and the wide range of language data and complex wordplay within its pages. Reviewing a list of studies and academic papers referencing Harry Potter offers a snapshot into cutting-edge AI research — and some of the thorniest questions facing the technology.

In perhaps the most notable recent example, Harry, Hermione and Ron star in a paper titled "Who's Harry Potter?” that sheds light on a new technique helping large language models to selectively forget information. It’s a high-stakes task for the industry: Large language models, which power AI chatbots, are built on vast amounts of online data, including copyrighted material and other problematic content. That has led to lawsuits and public scrutiny for some AI companies.