Share this Article

This paper explores the intersection of ancient Vedic narrative structures and contemporary AI safety through the lens of “Prompt Engineering.” By analysing variegated mythological boons (Vardans) as early forms of prompts based on logic, this study illustrates how the exploitation of a literal instruction to achieve unintended results has posed a challenge timelessly. The concept of “mytho-superlogical” reasoning is introduced to describe narratives where divine constraints act as sophisticated “guardrails” that anticipate and mitigate the vulnerabilities present inherently in any and every one of the various human-generated prompts. Instead of global AI safety frameworks, now India can contribute to the world’s indigenous logical AI safety frameworks through a Hindu mythological paradigm that could serve as a manifesto for the entire world, which has entered the AI-age.

Introduction

Ancient Hindu mythology offers a philosophical, pre-computational framework to help understand the nuances and complexities of intent and execution. Long before the advent of Large Language Models (LLMs), the “Boon-Granting” (Vardan) system mirrored the modern relationship between a user (Asura, in this case) and a highly capable agent (Gods/deities). In both contexts, the outcome is strictly incumbent upon the precision of the request (Liu et al., 2023). This paper argues that when prompts are framed with logical fallacies or arrogance, the outcomes are often “outlandishly unforeseen.” In other words, the case of some Asuras could be termed as the use of “Boolean Logic Overfitting,” “Adversarial Prompting,” and more. By mapping these ancient narratives onto modern AI safety paradigms, I suggest that the “Mytho-superlogical” order of the universe acts as a final fail-safe against “Prompt Injection” attacks and unethical alignment.

Mythological Case Studies

The most relevant examples or case studies from the Indian mythology include those of Hiranyakashipu, Bhasmasura, and Ravana that inform the reader about how prompt engineering could go wrong (White et al., 2024). On the other hand, there are also curses that place constraints upon the models (AI agents). For instance, the four Sanatkumaras placed a curse upon Hiranyakashipu (when he was one of the gatekeepers of Lord Vishnu), since he had not allowed them to enter Vaikuntha (Lord Vishnu’s abode). He therefore sought a boon from Lord Brahma, which made him almost immune to death (immortal), but was killed by none other than an avatar of Lord Vishnu (Lord Narasimha) due to inaccurate prompt engineering and in part due to divine order (Vyasa, 1988).

Hiranyakashipu was, in fact, the first ever prompt engineer in the history of Indian mythology, who tried the if-then-else logic while designing his prompts, assuming that he had closed every single loophole in them. In other words, he tried to perform a prompt injection.

Bhasmasura had once, for instance, acquired a boon from Adiyogi Lord Shiva (Doniger, 1975). The boon was that anything he touches turns into ashes. He decided and tried to test it on Lord Shiva, ran off to hide inside a cave near where he was meditating.

Ravana, on the other hand, chose to take a different route than the Asuras usually would. All he did was try to win the favour of the gods by simply asking for immunity from death by gods, demons, and celestial beings. Not even in his wildest dreams would Ravana have thought that Lord Vishnu would take the form of an ordinary human being, pretend not to know that he is one of the gods himself, and kill him in the future. Due to his arrogance, Ravana wrongly assumed that humans were weak (Valmiki, 2000). Eventually, Lord Rama killed him. Ravana had, in fact, attempted prompt injection, but failed in front of Lord Rama’s prompt alignment.

Every single Asura in Indian mythology was either trying to design the most dangerous of prompts or jailbreaking the divine systems by trying to exploit the loopholes in the Vardans to get to immortality (Pattanaik, 2014).

That being said, these Asuras were some of the first few prompt engineers in the history of the world. Way before prompt engineering could have even become a thing, the Vedic Vardan system had already introduced the delicate relationship between the deities (agents) and Asuras (users). Lord Narasimha and the other deities were the “edge cases” that the model had not accounted for.

Similarly, there are also stories of Vardan-seeking serving as lessons for some power-users, such as Nahusha, who realised that even seeking boons, such as wishes for remaining young forever like Peter Pan, can be reset by the gods in Hindu mythology (Dimmitt & van Buitenen, 1978; Vyasa, 2004).

Types of Prompt Failures

Prompt failures are usually the result of loopholes in the literal constraints placed on the model (Artificial Intelligence agents) or, in some cases, inevitable or inescapable situations (such as those found in the Hindu mythology). In a few situations, misalignment in the prompt can be corrected by intervention, but such cases are very rare to come by.

Suggestions for Modern AI

Programs written to allow prompts to be made by users of Artificial Intelligence service providing websites or agents should be prepared in such a way that some provision is made for loopholes to be auto-corrected (Bommasani et al., 2021). Secondly, one should also design agents in such a way that they can handle prompt injection attacks without letting their users fall prey to them. From the story of Bhasmasura, we can learn that without safety precautions or guardrails, any prompt can be easily misused by antisocial elements (Elgammal, 2020).

All AI models should, therefore, not be granted too many capabilities. On the other hand, they should be regulated before being released and tested at least once before they can be used by the standard users of Artificial Intelligence agents.

Conclusion

Even in the presence of constraints on prompts, they could either be exploited or circumvented when one finds vulnerabilities or loopholes in the same (Underwood, 2019). In some other cases, as in mythological ones, since a higher order is inherently involved, they could be circumvented with ease (Forth & Drucker, 2021). Even threat modelling in prompts should be performed correctly, failing which they could pose severe security threats to both the Agentic AI websites as well as their users. The truth is that the struggles between agents’ intentional alignment and literal logic have been classic and timeless, thus making it possible for parallels to be drawn between ancient Hindu mythological prompt engineering, intentional alignment, literal logic, and prompt injection cases. Eventually, these cases can be used as manifestoes to protect and safeguard the users of Artificial Intelligence websites and agents now and in the future.

References

  1. Bommasani, R., Hudson, D. A., Adeli, E., Altman, R., Arora, S., von Arx, S., … & Liang, P. (2021). On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258.
  2. Doniger, W. (1975). Hindu myths: A sourcebook. Penguin Classics.
  3. Dimmitt, C., & van Buitenen, J. A. B. (1978). Classical Hindu mythology: A reader in the Sanskrit Puranas. Temple University Press.
  4. Elgammal, A. (2020). Creative AI and cultural expression: Opportunities and challenges. AI & Society, 35(4), 901–916.
  5. Forth, L., & Drucker, J. (2021). Computing culture: AI, narrative, and humanistic inquiry. Digital Humanities Quarterly, 15(2).
  6. Liu, P., Yuan, W., Fu, J., Jiang, Z., Hayashi, H., & Neubig, G. (2023). Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Computing Surveys, 55(9), 1–35.
  7. Pattanaik, D. (2014). Myth = Mithya: Decoding Hindu mythology. Westland Publications.
  8. Underwood, T. (2019). Distant horizons: Digital humanities and computational narrative analysis. Digital Scholarship in the Humanities, 34(3), 427–445.
  9. Valmiki. (2000). The Ramayana (R. K. Narayan, Trans.). Penguin Classics.
  10. Vyasa. (1988). Bhagavata Purana (B. K. Chaturvedi, Trans.). Motilal Banarsidass.
  11. Vyasa. (2004). The Mahabharata (J. A. B. van Buitenen, Trans.). University of Chicago Press.
  12. White, J., Gao, C., & Smith, R. (2024). The prompt report: A systematic survey of prompting techniques. arXiv preprint arXiv:2406.06608.

Title Image Courtesy: https://ai.plainenglish.io/

Disclaimer: The views and opinions expressed by the author do not necessarily reflect the views of the Government of India and the Defence Research and Studies.


By Sharmila Shankar

Sharmila Shankar holds an MPhil in Eurasian Studies from the University of Mumbai and has previously worked as a strategic content translator for banking and pre-press clients. With experience in competitor research and transnational communication, she brings a unique interdisciplinary lens to defence and geopolitical writing. Her recent work focuses on emerging warfare paradigms, civilian-military resilience, and narrative strategy in multi-domain conflicts.