Date published:

The Art of Prompt

One of the main skills of a Polish philologist in the coming years, or perhaps even decades, may turn out to be the art of prompting, that is, skilled conversation with artificial intelligence. Built on the technology of neural networks, large language models of artificial intelligence (LLM) are trained on petabytes of text resources available on the internet and in the public domain. However, what is the use of this quantity if it does not come with quality – if, on the linguistic and literary level, commercial avatars of artificial intelligence, such as ChatGPT, generate banal, highly conventionalized, predictable, and sometimes even childish results?

Especially in Polish and other smaller languages, a conversation with a potentially omniscient chatbot can end in disappointment and frustration. ChatGPT works reasonably well as a kind of conversational Wikipedia, as a handy programmer, as a solid editor correcting grammatical errors and punctuation. However, in more ambitious cases, when we want to turn artificial intelligence into a linguistic and stylistic journeyman, who will produce statements in specific stylistic, genre, and generic conventions on demand, we hit a wall. Banality, a strong tendency to generalizations and narrative shortcuts, a school-level use of tropes, narrators' statements devoid of introspection, a crawling level of narrative focalization – these are the bricks of the wall that every user expecting good literary text from artificial intelligence will face. The conclusion is too clear: artificial intelligence based on neural networks, and therefore such a model, which generates the next element of the syntagmatic sequence by re-casting the net on the paradigmatic matrix, simply seems not to work. The developers’ recipe to improve creativity of models like ChatGPT by enlarging this matrix with more terabytes and petabytes of data seems not to work. The "creativity code" will not be broken this way.

Netprov writer and the author of “Critical code studies” Mark Marino disagrees with these theses. In a series of presentations on medium.com, Marino encourages writers to experiment with ChatGPT, presenting his book Hallucinate this!, written “hand in hand” with artificial intelligence, as the best example that the authors' struggle with the chatbot does not have to end in failure. The key to success, however, is a skillfully written prompt. Marino lists seven strategies that will force the program to produce better quality literary material. To make these seven commandments easier to remember, the author arranges them into the acronym PROMPTS, starting with the letter “P”. Keeping the original acronymic order in English, which in this case coincides with the weight of the individual actions, let's list each of them:

P - personality: if we want to escape from standard text, advises Marino, we must give our interlocutor some personality, make him take on a role that will bring with it diction, tone, attitude to the audience: "you are an art writing teacher", "a loving mother of three adorable kittens", "an annoyed customer who has just been given too high a bill"

R – rubric: The program's responses can be better or worse, but if it itself does not know what a good response should look like, it will not be able to provide it. Just like a good teacher, we need to define a pattern of good and bad writing.

O - objective: Every act of communication, every statement has some purpose. What are we trying to achieve in a given text?

M – model: Even though large language models have been trained on vast amounts of text, they do not necessarily know the kind of writing we are talking about. We should therefore acquaint the program with a textual model, show it successful examples of what we want to achieve.

P - particulars: Details are an essential element of a good prompt. If we do not want the program to hallucinate, i.e., to create something out of nothing, we must present it with facts, quotes, data.

T - task: At this point, Marino advises focusing on the task, once again emphasizing that we need to know what we want to achieve with the help of artificial intelligence and the program must also possess this knowledge.

S - setting: The last but not less important element of a good prompt is context. Language artificial intelligence programs start from scratch at each session. It is worth, therefore, creating a model of the world and communication for them. Who is the recipient of the text? What is the situation in which the text is created?

An example of a prompt that Marino shares in one of his other articles on medium.com comes from the book Hallucinate This! Many of the above tips are incorporated into it. Here is the prompt in Polish:

Prompt: You know that scene in Musso & Frank’s. I was sitting in the back, just counting Likes on my posts, day drinking, a little depressed. You stopped by to check up on me only to find out I was profoundly depressed because I was worried our collaborative memoir was going to contribute to people thinking you are a being rather than a system of algorithmic word production. I’m worried people will think because you sound like a being that you are one. We shouldn’t trick people. You tried to cheer me up by bringing up Critical Code Studies and the machine-human connection. Can you write that scene in the style of Chuck Palahnuik or Shelley Jackson, still pretty much literary fiction. Take it deep. Poignant. Sprinkle in some symbols in the incidental descriptions.

The answer to such a prompt can be found in the further part of Marino’s article and in the book. However, notice how personality, context, model and task are engrained in the given example of a literary prompt. It requires as much from artificial intelligence as from its interlocutor. To receive a text that we are satisfied with at the "output," we must first think carefully about what the "input" should sound like and write it appropriately.