To come up with the song's lyrics, Eli Weiss, a film production student at California's Chapman University, used Shortly Read, an AI application designed for writing that incorporates GPT-3, the powerful third-generation machine learning language model used by OpenAI, a nonprofit artificial intelligence research group backed by Elon Musk.
GPT-3 has been supplied with 45TB of text data, presumably including the full lyrics to Hamilton, and can generate a range of written content with simple inputs.
Weiss and team entered this one sentence: "Here are the lyrics to a new song from the hit musical Hamilton: An American Musical." The program then created lyrics to a tune with four verses, a chorus and a bridge that correctly identifies characters in the story and their relationships to each other.
"It messes up a few times, like when Hillary Clinton makes a brief appearance," says Weiss, a huge Hamilton fan, "but overall it's incredibly convincing."
Weiss' friend Michael Gribble, a film music student, put the AI-written song to music and performs it in the video above. This isn't the first time AI has written a new Hamilton song, however. A few years ago, creative Max Deutsch trained a neural network on the musical's lyrics and asked it to come up with a new tune.