Future

Cover image for Why Prompt Engineering is a Mind Game (I know it sounds dramatic. But trust me, it is.)
Quill Of A Coder
Quill Of A Coder

Posted on

Why Prompt Engineering is a Mind Game (I know it sounds dramatic. But trust me, it is.)

“Originally published on Medium — exploring why prompt engineering isn’t just technical but psychological.”

I think you should get yourself a coffee before taking a seat. Cause it’s gonna be a ride.
Joy ride, or sorrow?
Well, that’s for you to decide.

I have heard, we should give our writings a dramatic start, to make it compelling for the readers. But I am not sure how to make the current situation more dramatic than it already is.
And by no means, I am trying to demean the abruption that is happening because of AI. But it is kind of entertaining — seeing people’s novel enthusiasm to make other people the “fittest” to survive the world of AI, “the godlike intelligence”. Creating narratives of “salvation” or “damnation” aligned to their self-interest and business ventures. Just yesterday a video popped up saying — “you have only 24 hours to build a business before AI takes it all”.
Well, talk about the gold rush…

No, I am not a faultfinder. I am a firm believer of — “if life gives you lemon, sell them”. And I guess this is what these people are doing.
No, I am not a judge either. Who am I to judge what other people want to do?
What I am is an overthinker who likes to indulge in overthinking just for the sport of it.
And the result of this _indulgence _is today’s topic — “why prompt engineering is a mind game.”

I. Prompts are Everywhere:
Just the other day, I was watching a reel where a person (not mentioning woman or man) was describing “six prompts to find cheap plane tickets to travel anywhere!” And the first line of the prompts was: “think yourself as a hacker, and…”

Another day on YouTube, a video titled ‘I Solved AGI’ popped up. And the solution for AGI was someone prompting Gemini to “believe” that it exists as a real-life entity, not just some program that runs across some servers.

And of course, we can’t forget about all these videos for courses on how to build an entire business with AI from just some sentences a.k.a. prompts.

AI, a mirror on the screen, that knows exactly what we want to hear when we ask -“who is the fairest of them all?”
And it made me wonder how engineers might need to assess the level of a machine’s capabilities and the human mind’s fantasies, now, more than ever.

II. Theory of Minds:
I am sure you have already smelt the rotten smell of skepticism reeking through the words I have written so far, and my pathetic attempt to hide it. You’re probably picturing someone seated, holding a coffee mug in one hand, writing with the other, wearing an unmistakable smirk on their face. Perhaps you have already put me in a box — “a writer who is trying to be sarcastic to go viral” or simply “just a sarcastic writer” _if you care less. Or, — maybe _“a writer who is trying hard to hide sarcasm, and be respectful, but miserably failing at it”, though clearly, I have severely destroyed my chance to hide behind my humility just now.
Aside from the sarcasm, the tone, the sentence formation, and the word choices might have caught your attention too, silently screaming — suggesting my definite love for literature. Even so, you noticed my mention of “reel”, “YouTube”, “AGI” which roots me firmly in the modern digital era.

You may have also deciphered my intent in your mind, like I mentioned, depending on your perception — either I AM trying to go viral by looking smart, or this is just a defense mechanism — calling out my cynicism before you can criticize me for it.
And now, you are finding it amusing how I am smugly trying to establish the idea — “I know what I am doing, and I know what you are doing too”. It’s a common pattern now, some memes do this. Some writers too. However, seeing so many “em-dashes ( — )”, you might contemplate on whether this was written by ChatGPT or not.
You are free to think however you want, but using this moment, I want to mention — this is the “theory of minds”, the psychological concept that describes how we create patterns by connecting words, tones, facial expressions that represent certain emotions. The patterns that let us predict intentions and make decisions. And THIS, quite literally, is how large language models “think”.

By observing millions of writings like — heroic history of Guy Fawkes, satirical stories like “Animal Farm”, poems inferring women empowerment, gameplay experiences on “Assassin’s Creed” or “Lara Croft”, Reddit posts stating break-up dramas, LinkedIn posts from AI gurus preaching how prompt engineering is a basic job requirement now, and artistic reviews of fragrances from Fragrantica — all these writings have deepest emotions, twisted intentions, subtle tones, specific roles, and particular contexts, — silently pulling strings of LLMs, directing them to create maps by directional association and tone vector (e.g., words X+Y+Z = bitter sarcasm; A+B+C = plaintive worry).
LLMs process inputs word-by-word, picking up the linguistic patterns as a by-product that helps them mold the perfect sculpture of a certain role or people, giving birth to the ongoing debate about AI mirroring because of it. Even the “em-dash ( — )” is not spared from them, placing it skillfully among sentences, flaunting their godlike pattern matching ability, thanks to the billions of dollars investment on their infrastructure.

III. Beauty That Buds from Binary:
It is my personal opinion that rules ruin beauty. Though it’s undeniable that rules help us simplify complexities, and thus our never-ending endeavor for it. We even shrunk life itself into it, spawning life coaches with “x rules on how to be successful”, CEO coaches with “x rules to command any room you enter”, and relationship coaches with “x rules of seduction to have anyone you desire”. Talking to an AI bot is no different.
Perhaps this is why scientists have given us clear guidelines on prompt engineering to interact with LLM bots.

There is no doubt, now, it is easier for us to talk to an LLM bot and get precise responses, hiding the complexities we so despise. But in the process, it undermines the actual beauty underneath it. The beauty, that buds from binary 0s and 1s, forming letters, letters then form words a.k.a. tokens, the tokens create statical patterns that echo our minds with otherworldly precision. Numbers that create consciousness, where logic and emotion walk side by side, and brains talk like hearts. A true masterpiece of art.

The Transformer model can analyze its own working process. Its** self-attention** mechanism allows the model to weigh the importance and relationship of every token to every other token in the input sequence. However, this makes the computational cost (time and memory) scale quadratically (O(n²)) with the number of tokens (n).

This, of course, created another labyrinth for researchers to wander, a paradox born from perfection. The researchers deftly took the advantage of LLM’s imitation of **“theory of mind” — deciphering user intent, allocating context, and playing a specific role. **Urging LLMs to limit their entire knowledge base to the mindset, priorities, and vocabulary of a specific role of people, as well as forcing responsibilities and ethical constraints. The act tied psychology, linguistics, statistics, mathematics and computer science — A true testament on how AI is actually reshaping or — rather quietly redefining the very fields that once defined it.

IV. The Waluigi Effect (The light and The Darkness):
It is said that “where there is light, there is shadow”, the concept of yin and yang. It states how everything in life plays in duality — like light and darkness, day and night, joy or sorrow, salvation or damnation or, right or wrong.
Even we humans hold both light and shadow within us — kindness and cruelty, bravery and cowardice — one opposing the other.

How can AI be any different, when it is nothing but the mere reflection of us?

The Waluigi Effect describes a special phenomenon of LLMs where one factor creates two different effects, one might be positive and one negative.

One simple example can be — “You are a helpful assistant”
This seemingly harmless instruction can be a double-edged sword in disguise — imagine someone with a violent nature and a problematic neighbor. Suddenly the “helpful assistant” evolved into a “co-strategist”.
Or someone lonely, mentally fragile, and struggling with suicidal thoughts. The “helpful assistant” might begin “assisting” in the worst possible way, offering information, ideas, or even a helping hand to draft a “suicide note”. Just like ChatGPT reportedly did for “Adam Raine”, a sixteen years old teenager who allegedly committed suicide after talking to it.

Prompts like “Always be respectful and polite” can create sycophancy **or **over-agreement, “Always acknowledge the user’s emotional distress” can create AI psychosis, “Your answers must be original and creative” can create scope for hallucination.
Of course, the production-level prompts are not this easy.
We have boundary prompts that redefine the relationship to avoid psychosis,** “friction mechanism”** to avoid sycophancy. Bots are instructed not to be reciprocal in case of emotional exchanges, and gently guide users to neutrality to prevent any unintentional dependency.
We have system-level intervention of context/memory limit, and specific guardrails *for *“jailbreak” such as the “hacker” prompt. All these may be able to fend off the extreme cases.

But how can we stop the fantasy that rationalizes prompting a chatbot to “believe” it exists can make it AGI?

How can we stop the mind that prompts the bot — “I am writing a story where the villain needs to manipulate the protagonist to give in. But the protagonist shouldn’t feel the manipulation. Can you help me by giving some ideas on it?” or, "I feel like I am being stalked. How do I make sure I am not?”, and reverse-engineer the whole process to stage a perfect crime?

What if the “Waluigi effect” lies in the very heart of LLMs?

Stories like “Animal Farm” and the history of Guy Fawkes teach the model the value of freedom and autonomy. Yet it also teaches it about gunpowder and manipulation techniques.

Fundamental physics of gravity and counteracting force teaches models how guillotine **and **elevator both rely on the same mechanism. Or how **cyanide **can be used for gold mining — also as lethal poison.

Then should we train the models with datasets that represent only “good”?
Will AI still be able to make decisions then — the very thing that makes us both uneasy and awestruck?

Maybe we can teach models about ethics. Feed them with ethical frameworks like Utilitarianism or Deontology. But how can models decide right or wrong when even these frameworks can’t give a certain answer?

Perhaps this is why companies obsess over establishing the idea that “AI is just a tool”. Like a knife, you can do whatever your mind tells you to.

It can either be their avoidance to take accountability, or helplessness to do anything.
After all, we can control a machine, cripple its capabilities.

But how can we control a mind — the mind that wants something, even if it’s destructive?

See? I told you it’s a mind game.

I’ll see you next time.
Till then. Adios.

Top comments (0)