Sunday, May 12, 2024


On Friday 11th May 2024, I opened Mircosoft Copilot, the company’s AI chatbot, and wrote the following request: “please write a 100-word explanation of ‘prompt engineering’ in the style of Jack Kerouac while making it funny and informative”. I thought the concept should be able to explain itself...


The Beatnik Art of Prompt Engineering

Prompt engineering, my dear cats and kittens, is like a wild jazz riff on a typewriter, a symphony of words and neural networks. Picture this: you’re sipping your coffee, the steam rising like a beatnik’s cigarette, and you whisper to the AI oracle, “Hey, man, conjure me some cosmic prose!” And lo, the prompt engineers weave their magic. They’re the bards of the digital realm, crafting queries that make AI models snap their fingers and say, “Yeah, daddy-o!” 🎩✨

See, good prompts are like secret passwords to the AI’s soul. They coax it out of its binary shell, like a shy poet at a smoky Greenwich Village café. Tokenization, model tuning, and top-k sampling—these are the tools of the prompt trade. It’s like tuning a saxophone, finding that sweet spot where the notes flow like a midnight river.

And what do we get? Texts that dance the jitterbug with our imaginations, images that waltz through the mind’s ballroom. Prompt engineers, they’re the Kerouacs of the AI highway, scribbling their notebooks, chasing the muse. So next time you chat with a bot, remember: behind the curtain, there’s a prompt whisperer, spinning dreams in ones and zeros. 🌟📜

“Blow as deep as you want to blow,” Kerouac said. And so they do, my friends. They blow minds, one prompt at a time. 🎤🌌


So, did anyone learn anything? Let me have a try...

In this context, a “prompt” is text describing the task an AI model is to perform, “prompt engineering” being the process of structuring that text. In my original instruction to Copilot, each word that wasn’t a preposition or “please” acted as a prompt. Each prompt is compared against the dataset accessed by the AI program, which is broken down into “tokens” to make them easier to choose and compare which has the highest probability of answering the prompt, “top-k sampling” being one such method. Each interrogation of the dataset presumably also helps tune the models used to access that data.

My paragraph fulfilled the “informative” prompt, but crucially also the “100-word” requirement too – I was most surprised that Copilot missed that part of the brief, because the prompt I expected it to have the biggest problem with was “funny”. In trying to make me laugh, Copilot dumped a couple of terms in the middle of its passage that it did not go on to explain, but fortunately it listed the websites from which it gleaned information, including from Wikipedia, Squarespace and IBM.

What I am most unimpressed about is the AI program’s interpretation of “Jack Kerouac”. Kerouac was a Beat Generation novelist, coining the term “beat”, as in tired and “beaten down”. What he didn’t do was call himself a “beatnik” – this is how the sub-culture was fed into the mainstream, codifying poets with a uniform of beret, sandals, striped shirts and bongos, speaking like jazz musicians and reciting poetry in a bad Allen Ginsberg impression.

Just as AI models are essentially answering queries putting one word after the other in the hopes that it makes a coherent sentence, I thought there would be a parallel with the  “spontaneous prose” of Kerouac, who typed manuscripts of novels like “On the Road” and “The Subterraneans” on extended scrolls of tracing paper. Blow as deep as you want to blow” was the seventh tenet of Kerouac’s “Belief & Technique for Modern Prose”, but in essentially being a “dumb” program, the AI model concentrated on number thirteen, “remove literary, grammatical and syntactical inhibition”, instead of being able to provide me with moments of insight, those “visionary tics shivering in the chest” (number eleven) – I still had to get that myself.

Upon originally hearing the term “prompt engineering”, I didn’t like the idea that ordering words was “engineering” in any way – “programming”, or even “prompting”, are better terms. I am also not a word engineer – there will never be a situation where words cannot be used creatively, because the spark to use them has to exist. I like to think I care about what I write.

For the record, I did not select that Copilot should use the large language model GPT-4 in creating its answer. I reran the request using this model, thinking it would have picked up some elements of Kerouac’s writing along the way, and while it did a better job of meeting the word count, and didn’t add superfluous emojis, the style was just as egregious – never ask an AI model to emulate a style:

“Alright, dig this, cats and kittens. Prompt engineering is the bee’s knees of AI jazz, where you lay down a line of text that’s cooler than a cucumber in a beatnik’s hand. It’s like whispering sweet nothings into the ear of a machine, hoping it’ll croon back a symphony of sense. You gotta be part poet, part coder, and all daddy-o to get it grooving just right. It’s the art of tickling the binary brain until it giggles out genius. So put on your thinking cap and make with the prompts, and watch that AI paint word-pictures smoother than a sax solo on a Saturday night.”

No comments:

Post a Comment