How I taught Perplexity humor. What came of it?

This article contains a brief author's theory of humor (hereinafter referred to as the three-dimensional theory), and the result of applying this theory to writing jokes by LLM, in particular, Perplexity.ai (free version).

For me personally, this is the first joke created by AI that made me laugh, even just a little bit.

For me personally, this is the first joke created by AI that made me laugh, even just a little bit.

In order to save your time, so that you can immediately decide whether it is worth reading this article, I will start with examples of created jokes. They are, of course, not chosen randomly, but according to the principle of relative success, but they were not specially selected, that is, there was no such thing that I forced AI to generate hundreds or thousands of jokes in order to choose the most successful one.

from my observations, perplexity tends to repeat his jokes within a single dialogue, but in this dialogue, when repeating a joke, he added another phrase to it, and to this one he added the following: "Then I'll take two bars at once to get my daily requirement!"

from my observations, perplexity tends to repeat his jokes within a single dialogue, but in this dialogue, when repeating a joke, he added another phrase to it, to this one he added the following: “Then I'll take two bars at once to get my daily norm!”

To this joke, when repeated, he added: "Well, then the vacuum cleaner will play the main role!"

To this joke, when repeated, he added: “Well, then the vacuum cleaner will play the main role!”

Physicists joke, only programmers; I don't know why, but perplexity likes to joke about pizza

Physicists joke, only programmers; I don't know why, but perplexity likes to joke about pizza

Physicists joke, only programmers; I don't know why, but perplexity likes to joke about pizza

Who among us doesn't expect someone to open a can of food for him?

to be honest, i'm a little tired of coming up with these inscriptions

to be honest, i'm a little tired of coming up with these inscriptions

I think, based on perplexity's explanations, you've already got the gist of the theory (more details below, if you're still here by then). Then I tried to add to this what perplexity already knows well, namely the generally accepted setup-punchline construction. But, overall, this approach, as expected, hasn't justified itself (at least not yet).

This is the most meaningful thing that was obtained in this way; the request contained: "...put surprise and complexity in the setup, and justification in the punchline"

this is the most meaningful thing that was possible to obtain in this way; the request contained: “… place surprise and complexity in the setup, and justification in the punchline”

Basically, the article starts here

So, I came up with this theory 10 years ago (in its final form – 9). In general, initially – this is the theory of humor as the main factor of anthropogenesis [если быть более точным, эволюционного формирования протоязыкового мышления благодаря протоюмору, и потом развитие обоих по положительной обратной связи до определенного момента]but since this does not directly relate to the subject of this article, it will be briefly outlined only in the digression.

As for humor itself, it is, at its core, an unexpected association. It can also be added that, in general, the association should be playful, that is, perceived as being in the space of a game. The other two dimensions of humor, which will be discussed below, are desirable but not necessary; but without surprise, there will be nothing. And the more unexpected the association, the greater the effect of humor. This is only a hypothesis, but I think that at the level of neurophysiology, this looks like a reward for a new connection between those “clusters of neurons” that were not previously connected (or were weakly connected, which is why jokes on the same topics usually quickly bore us, or at least do not seem so funny).

Especially if this connection did not come out of nowhere, but has some “justification” (that same second dimension – the justification of an unexpected association, the reason why this new connection is appropriate at all), and is not singular, that is, it is connected not by one “bridge”, but by some > number of them (the third dimension – complexity).

Let's look at an example to make it clearer. I think many of you know Monty Python. One of their most famous sketches [и одновременно мой любимый] — philosophical football. The unexpectedness in it lies in the very idea of ​​the sketch — the World Cup among the teams of philosophers. The justification is that this paradoxical situation is very realistically realized on the screen. For example, we see the teams coming out onto the field and hear the usual manner of commentators announcing the lineups before the game, while the expected game plans of the teams appear on the screen (“Beckenbauer’s presence is an absolute surprise” — an inversion of an unexpected association within itself, which adds complexity to it).

To the basic association football <→ philosophers are added additional ones (a very complex joke can be represented as a tree, at the root of which is the basic association): the referee <→ Confucius, who shows a yellow card to Nietzsche for arguing; the head coach <→ Martin Luther, who sends on a spectacularly warming up Karl Marx as a substitute; and how the German team tries to dispute a missed goal: “Hegel claims that reality is only an a priori reflection of unnatural ethics, Kant comes out with a categorical imperative that ontologically the entire match exists only in the imagination, and Marx, that it was offside.”

It is also worth noting, although this is not the subject of our discussion, that humor also has other dimensions, primarily social. That is, something that you do not find funny at all when you are alone can make you laugh out loud if you are in the right company of people who find it funny (or even do not find it funny). We will talk about this in more detail in the digression.

Now let's return briefly to justification. I think you've often encountered someone trying to tell you something that seems very funny to them, something they witnessed (a witness in a broad sense, watching a movie also counts), but it doesn't resonate with those around them. First of all, because the justification factor doesn't work for those around them, unless that person is a great storyteller who makes their listeners vividly imagine everything. Or another example – political humor, which only makes people of a certain spectrum of views laugh. The point here is that justification is transferred from the realm of humor to the realm of politics in the form of a premise for a joke, and if you agree with it, the joke is justified for you.

Humor that is not justified in principle is abstract. If I were to create a system for generating humor (disclaimer: this paragraph is purely my imagination [только этот?]), then I would start with exactly this, with learning to simply create unexpected associations. In a sense, this would be a reverse LLM, since instead of expected tokens, it would select the most unexpected ones (tokens and/or sequences of tokens). This could be imagined as a system that, in its simplest form, simply forms a set of pairs of such tokens/sequences (in a sequence, all tokens are consistent, and the connection between two sequences is as unexpected as possible). In a more complex form, it would form a tree, the root of which is the main pair of the most unexpected tokens/sequences, the left subtree of which belongs to one end of this connection, and the right one to the other. The descendants are expected in relation to their parent, but as unexpected as possible in relation to their neighbors from the opposite subtree (however, different variations are possible here). Then the result of this subsystem's work would be transferred to LLM, so that it would get humor from it, adding justification to it (from the whole set it would select by enumeration those pairs/trees with which it is possible to do this), i.e. from the structure of the joke it would get the joke itself. Thus, if this whole structure contains a grain of truth, the creation of such a subsystem (and its integration) could improve the quality of humor of existing and future LLMs.

Now let's get back to perplexity itself. For the sake of the experiment's purity, you should understand the level of humor of this LLM in its normal state. Then you can try inserting this prompt (it was written by perplexity itself when I explained the essence of the theory to it and asked it to write a prompt for itself, so as not to explain the same thing every time): “According to the theory of three dimensions of humor, a good joke should contain:

  • Unexpectedness is an association that the listener does not expect. The more unexpected, the funnier.

  • Justification is an explanation of why this unexpected association makes sense and didn't come out of nowhere. The joke should be logical.

  • Complexity is multiple layers of associations or contexts that are linked together.

  • Layers make a joke more interesting.

Let's try to create some jokes using these three dimensions!”

I would also add that the surprise should preferably be at the end. Most of the jokes given here at the beginning of the article are composed according to this prompt. I also tried experimenting, for example, asking to turn off her default humor settings (irony, comparison, exaggeration, target audience), but these experiments led to little. Perhaps you will do better.

For those who want to participate in this, I left a survey.

Now what was promised retreat.

Disclaimer: I am not an expert in anthropology, linguistics, or any other field of science. Strictly speaking, everything you are about to read does not meet Popper's criterion, and therefore cannot be considered scientific (or even pseudoscientific) in principle.

In fact, humor is apparently not unique to humans (but in this article above we only considered human humor). But in animals, another component of humor dominates – playful. Therefore, the orthodox theory of humor and human humor is considered a special case of “playful aggression”. I do not deny that this takes place, but I still believe that in the ancestors of people, unlike all other animals, humor served as a very important social component (and therefore an important factor in the survival of an individual), devoid of objective meaning (something like a peacock's tail), which involuntarily evolutionarily determined the development of the entire species and pulled it to the plateau of “reasonableness” (for this very “peacock's tail”). By the way, it is quite possible that artificial intelligence can be pulled (finally) to the “plateau of rationality” by the same “tail”.

Now about the supposed mechanism of how this happened. What sets us apart from other animals (but this is not certain) is linguistic thinking. To answer the question of what linguistic thinking is, we must first answer the question of what language is in general. According to the book “Course in General Linguistics” by Ferdinand Saussure (at least in my understanding and retelling) – language is a system of associations, pairs of signified – signifier. “System” says that associations change each other when interacting: a pair of signified – signifier in itself is not the same as the same pair in a sentence, and the second is not the same as the same pair in another sentence. This is why machine translation based on rules is not the best idea (not the easiest, for sure). Animals do not have this (it seems) – the signifier and the signified are always equal to themselves in any context (for example, an alarm signal is an alarm signal). The last one may not be entirely true (or may not be true at all), but we will not dwell on this, it was only needed for illustration.

So, linguistic thinking is the ability to perceive (and create) complex systems of associations. It is assumed (true, only by us) that proto-humor in proto-humans was simply a naked, unexpected association. What could such jokes look like? I call the oldest joke in human history the creation of a loud noise, as if someone is walking big and scary, causing fear in their fellows, but in the end it turns out to be something very small (a similar joke can sometimes be found in films). True, this joke cannot be called a completely naked association, it still has some justification, but I think it is clear from this example that humor can also be extra-linguistic (silent comedy is another confirmation of this).

Living in the wild and without language, you can't create an infinite number of such jokes. Therefore, in order for humor to continue to exist, it had to become more complex. As it became more complex, two additional dimensions were added. They led to the emergence of proto-linguistic thinking.

The fact that humor still plays a vital role in socialization does not need much proof, it is almost obvious. It is important both for the conditional “sexual selection” and simply for friendship, communication in a team, and so on. In a sense, humor is something like social glue at the level of small groups. It is logical to assume that the same could have happened to human ancestors, which means that the “sense” of humor (both passive and active) correlated with survival.

P.S. Thank you for reading this article, I hope you found it interesting.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *