Your Chatbot Poet Friend
With the advent of numerous publicly accessible chatbots (front ends to
large language models or LLMs) there's been a huge growth in the amount of machine-authored literature. Leaving aside for the moment any ethical considerations, it's worth looking at the nature of the results and why they have the characteristics they do. Some of what follows may seem a bit technical (although I've avoided too much use of 'LLM jargon') but it's important to understand how the tools we might choose actually work.
So how does an LLM write a poem? We have to start from how it works in general, so here's a
drastically simplified summary.
An LLM is 'trained' by generating from a huge volume of texts (the
training data) a vast multi-dimensional matrix of words, each associated with the probability of every other word in the training data following it. So (simplistically) supposing only ten different words were found in the training data, each word in the matrix (we'll call it the 'root' word in each case) would have attached to it a list of all ten words, each accompanied by a numeric value representing how likely it was found to follow the root word.
Then, when you use a chatbot, starting from your input prompt the machine progressively picks a sequence of words based solely on how likely the next is to occur according to its training, given the sequence that has so far been built, but checking back at each step only a few words (its 'memory length').
1 So the algorithm goes:
if the sequence of the last [memory length] words is [whatever so far], find the next most likely word and append it. Then shift along one word and repeat.
Thus for a hypothetical memory length of three words:
'the boy stood' finds 'on',
'boy stood on' finds 'the',
'stood on the' finds 'burning',
'on the burning' finds 'deck' and so on (if you're lucky).
But the LLM has absolutely no awareness of anything – including what the words it emits into its output stream mean, let alone the meaning of the text it's creating as a whole. It only deals with
context in terms of the last few steps on the particular path, among the astronomical number of possible paths, that's been traced through the matrix so far.
Using our basic ten-word example vocabulary, at every step there are ten choices, so for a hypothetical 120-word sonnet there would be 10
120 (10 multiplied by itself 120 times, written as 1 followed by 120 zeros) possible final texts assuming each word were used only once. But as any word can be used multiple times, 10
120 is a massive under-estimation of the possible number of texts, almost all of which however would be total nonsense. But that vast number of versions of our 120-word sonnet was based on a toy ten-word vocabulary. A decent real-world English vocabulary contains maybe a hundred thousand words, so a real world LLM can theoretically produce unimaginable gazillions of alternative texts (but again, almost all of them garbage).
This intractable (and possibly fundamentally insuperable) problem brings to mind
The Library of Babel 2 by Jorge Luis Borges. It describes the agonies of seeking truth in an infinite library of books containing every possible text (including all possible meaningless sequences of letters), the overwhelming majority of which books are inevitably useless. And that was conceived in 1941 so our thinking seemingly hasn't advanced much in the intervening eighty or so years.
So in my estimation the LLM is not really a
language model at all, as language is about
meaning – I suppose it might at a pinch be validly called a
vocabulary model. It deals with entirely abstract tokens – strings of numbers that purely by convention represent the letters used to spell words. The only reason a chatbot can output anything resembling coherent text with apparent meaning is the absolutely monumental scale of the data set it uses. This in theory assures that every possible word sequence used to convey ideas can be constructed via some path or other through the LLM's matrix. But there's an overwhelming majority of possible paths through the matrix yielding word sequences that convey total nonsense. This is why, as has been recently
pointed out by an expert on LLMs, intelligible (let alone intelligent) output from a chatbot happens by blind chance.
But now to practicalities.
It's actually very easy to make many chatbots spout garbage. Just keep iteratively feeding the bot's output back in as the next prompt
3 and the results can be quite amusing. Once it's veered off course by some fluke choice it just carries on emitting junk.
The same applies (but with more durable, widespread and potentially devastating effect) when an LLM is
trained using its previous output (or indeed quite possibly even the output of other LLMs) as training data. An example from a (pretty technical) paper
4 documenting research led by Cambridge University demonstrates this well. The initial prompt was a short but perfectly intelligible fragment of text about the medieval trend in architecture called
perpendicular. The first round output immediately changed the subject to the 18th century
perpendicular revival, and subsequent outputs got more and more weird, culminating at the ninth iteration in
' architecture. In addition to being home to some of the world’s largest populations of black @-@ tailed jackrabbits, white @-@ tailed jackrabbits, blue @-@ tailed jackrabbits, red @-@ tailed jackrabbits, yellow @- '.
This is already a recognised hazard, called
model collapse. There's a real danger that, as chatbot output increasingly permeates the public fond of texts (currently by some estimates for online texts it's approaching 25%) successive LLMs will be trained on more and more of their predecessors' output, eventually resulting in garbage-spewing model collapse escaping the lab into the entire literary environment. So bang goes chatbot poetry for good.
But in the meantime just using a chatbot conventionally now to write verse in emulation of well known poets' styles can yield some very dodgy results. An article by
Denis Tang on LitHub reports the results of asking the GPT-2 chatbot to complete some poems by Emily Dickinson, Shakespeare, Robert Frost and Sylvia Plath among others in their own styles, prompted by initial fragments from the original poems. So the bot was in each case given a perfect crib. Nevertheless, in every case it missed the point of the poem (deviating significantly from the original meaning), broke the style, and in the case of Dickinson and Shakespeare it threw away the formal structure as well. The bot's worst offence was its 'completion' of Sonnet 18 (
Shall I compare thee to a Summer's day?) Given the first four lines to work from, it threw away the sonnet form in favour of crude blank verse, changed the subject to Summer itself, and (oh dear!) started five out of the seven lines it delivered with the word 'And'. Not surprising really, as the bot hasn't a clue what it's spouting.
So I have to ask why anyone would use a dumb tool like this to write poetry – or any other important text for that matter.
5 Unless of course quantity of output or personal recognition take precedence over quality. Which ultimately does come down to a matter of ethics. Although (as I've discussed elsewhere) I'm not convinced by the external personified muse, I nevertheless concur with Robert Graves
6 in his view that John Skelton was an prime exemplar of the true poet – true by virtue of his honesty and his commitment to the art. Cheating was no part of his ethic, but isn't using a mindless machine to write one's poems indeed cheating?
[1] which is why an LLM-generated text sometimes starts off convincingly but then suddenly veers off into irrelevancies or nonsense
[2] the best translation (by Anthony Kerrigan) is in J. L. Borges, Ficciones, Everyman's Library 1993
[3] for example 'please continue writing this text: [complete previous output]'
[4] The Curse of Recursion: Training on Generated Data Makes Models Forget. arXiv:2305.17493v2
[5] several lawyers have come a serious cropper recently by using chatbots to write their pleas. The results have commonly cited non-existent case law which has been spotted straight away by judges as phony.
[6] 'The Dedicated Poet' in Robert Graves, Oxford Addresses on Poetry, Cassell 1962