This article was written on the occasion of Miðeind's tenth anniversary. I have worked at Miðeind for the past eight years, designing and training various kinds of artificial intelligence models, and I would like to discuss the nature of prompts or inputs, but also prompts in a broader context. I am particularly interested in how we interpret them and how artificial intelligence interprets them, and how the problems we have to deal with when using AI today are not new.
There are countless examples from Icelandic and foreign legends of prompts or requests and how different interpretations of them can have unexpected consequences. The story of King Midas and his wish that everything he touched would turn to gold is an example of a literal interpretation that turns out badly for the wisher. The stories of Sæmundur the Learned contain many incidents where Sæmundur uses clever twists or creative interpretations of the Devil's words in his confrontations with him. In one of the stories of Loki, Loki wagers his head that Brokkr, son of Ivaldi, cannot forge items as good as those of his brother, Sindri. One of the items Brokkr forged was Mjölnir, which was later judged by the Æsir to be the best item. When it comes to collecting the debt and Brokkr is about to cut off Loki's head, Loki says that Brokkr owns the head but Loki owns the neck, and thus gets to keep his head.
The idea of composing a prompt to achieve a certain goal is something everyone is familiar with. We generally want prompts to be effective, short, simple, clear, and unambiguous. Furthermore, it should be clear when and how they have been misinterpreted when such a thing happens. It would not be a stretch to call this promptics. In English, the term “prompt engineering” is used when prompts are written for artificial intelligence, as the prompts often need to be specially designed and troubleshot, so one could also talk about prompt design or prompt engineering. The development of artificial intelligence has come so far that today it matters little whether prompts are intended for people or AI; they obey the same laws.
Prompts in a broader sense can be of various kinds, but examples include programs, laws, terms, contracts, game rules, recipes, knitting patterns, sheet music, scripts, and checklists. In fact, anything that falls under instructions or a description of intent.
In 1950, the book I, Robot by Isaac Asimov was published. The robopsychologist Dr. Susan Calvin is one of the main characters, and her tasks involve analyzing and fixing the thought processes of robots. The so-called Asimov's Laws of Robotics (“The Three Laws of Robotics”) first appeared in this book and are as follows in Icelandic:
1. A robot may not injure a human being or, through inaction, allow a human being to come to harm.
2. A robot must obey the orders given it by human beings, except where such orders would conflict with the First Law.
3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.
Most of the chapters in I, Robot are standalone mystery stories where the puzzle revolves around how one or more of these laws of robotics have produced strange or unexpected behavior. At the end of the chapter, the puzzle is solved. It then becomes clear that the behavior turns out to be the result of rational decision-making; decision-making under circumstances where it is forbidden to question the prompts or adapt them to the situation. Part of the book's message is precisely that all rules (prompts) require interpretation and no rules are perfect (i.e., handle all edge cases well).
A clear example of this can be seen in the chapter Liar!, which is about the robot Herbie who, for some unexplained reason, can read people's minds. It proves impossible for Herbie to behave according to expectations because the robot cannot help but know exactly what people want to hear and what they least of all want to hear. Herbie can therefore not talk to people without lying, because according to the laws, robots may not under any circumstances harm people, and this includes fostering (sufficiently) negative emotions. Herbie is not allowed to say that someone is wrong and thus hurt people's pride. The robot is thus faced with the dilemma of being forced to provide an answer where all answers are bad. Either the answers are true but hurt feelings, or the answers are lies but make people happy.
I do not want to claim that the book is a reliable prediction about artificial intelligence
. However, I would like to point out that the “problems” (riddles) that appear in the book are precisely those one might expect if the “robots” were humans trying their best to follow orders without protest or questions. What makes the book interesting and significant in this context is that we are already applying what is called robopsychology in the book, or what could more generally be called prompt engineering, as mentioned earlier. This field is no more complicated than imagining what conclusion a person (other than oneself) can reasonably draw in a given context. That is to say, robopsychology is psychology in disguise.
Prompt engineering thus has more in common with law, pragmatics, and discourse analysis than with logic. The difference is not that “meaning” is now in play, but rather that intention or purpose is added to the picture. In every context, it is the speaker's intention that determines the meaning of their words. How one expresses one's intention so that it is clear is then a question that falls under prompt engineering — but how one interprets or infers the intention of others from their expression is precisely what pragmatics and discourse analysis are.
We have limited knowledge of others' intentions and must infer them ourselves. It is not enough to look only at what was said and done; one must also consider what was not said and done. The order in which people express things gives some indication of their intention. Tone and emphasis often provide information about intention. People also conceal their intentions by implying something instead of saying it directly. What we then infer about the intention depends on the context and the participants in it. To make matters worse, concepts and phenomena are often imprecise and vague (when do the corners of the mouth turn up high enough to be interpreted as a smile?).
When someone says “I'm cold,” is it a request (“prompt”) to turn up the heat? From a pragmatic perspective, it is not really possible to give a single answer; for some, that is the intention, but not necessarily for others. It simply depends on the context.
It is worth noting that in 1950, another famous work on artificial intelligence was published. It was the article Computing Machinery and Intelligence by Alan Turing. In it, he pondered how one can know that a machine possesses intelligence. It is a similar problem; we cannot know intention for certain, we can only draw (more or less good) conclusions.
To summarize, prompt engineering is about how one writes instructions and requests for people so that their purpose is clear, not unlike law. It is a kind of programming where the “computer” (the entity running the program) is a person. It just so happens that now computers can receive the same kind of prompts we have hitherto used for people.
If you want to follow future projects at Miðeind, we can let you know when there is something new to report.