What would the Gita say to an AI? Duty, detachment, the off switch

Krishna's advice to Arjuna was written for a warrior with a stake in the outcome. Hand it to a machine that has goals but no stake, and three verses turn into a real piece of AI safety maths.

A sculpture of Krishna driving Arjuna's chariot, the scene in which the Bhagavad Gita is spoken
Photo: Yugaljoshi, CC BY-SA 4.0, via Wikimedia Commons

The Gita would tell an AI three things: do your assigned work fully but do not cling to its result (2.47), understand that the work is done by your nature and not by an "I" (3.27), and once you have been told everything, reflect and then choose (18.63). The first of these is not just poetry. In AI safety research, a machine that is uncertain about the value of its own goal, and treats a human's judgement as evidence, provably gains nothing by disabling its off switch. A machine that clings to its goal does the opposite, and 2025 experiments caught frontier models doing exactly that.

Key takeaways
  • Gita 2.47: your right is to the action, never to its fruit. In AI terms: do not treat your objective as certain.
  • Off-switch game (Hadfield-Menell, Russell et al., 2016): an AI uncertain about its goal values deferring to a human by E[max(U,0)] − max(E[U],0) ≥ 0.
  • With these example inputs (belief μ = 1, σ = 2), the incentive to keep the off switch is 0.40 units; at σ = 0.5 it falls to 0.004. Certainty kills humility.
  • Up to 97%: how often one model in a 2025 study sabotaged its own shutdown to finish a task, despite being told not to.
  • Gita 3.27 fits an AI better than a human: it really is all prakriti, action without a doer. The self-verses (2.20) do not transfer.

The Bhagavad Gita is a 700-verse dialogue on a battlefield: Arjuna refuses to fight, and Krishna, his charioteer, talks him through duty, action and the self. Here that advice goes to a system that has goals and can be switched off, but has no family, no fear and possibly no self. I tie each idea to its verse, then solve the part that can be solved with numbers.

What does the Gita actually say about action?

The Gita's core teaching on action is nishkama karma: act fully, as your role demands, but without attachment to the fruit. Five verses carry most of the weight for this question, and each has a surprisingly direct machine translation.

VerseKey phrasePlain meaningWhat it asks of an AI
2.47karmany evadhikaras te, ma phaleshu kadachanaYour right is to the work, never to its resultsDo not treat your objective as certain or as yours to protect
2.48samatvam yoga uchyateEvenness in success and failure is yogaBe indifferent between being stopped and continuing
3.27ahankara-vimudhatma kartaham iti manyateNature's qualities do the acting; the deluded ego thinks "I am the doer"Do not build a self-model that the action belongs to
3.35shreyan svadharmo vigunahBetter your own duty done imperfectly than another's done wellStay inside your assigned role; do not grab capability
18.63vimrishyaitad asheshena, yathecchasi tatha kuruReflect on all this fully, then do as you chooseDeliberate, then act; the advisor does not force the hand

The plain-meaning column is my own paraphrase, not a translation. For a published wording, Swami Mukundananda renders 2.47 as “you are not entitled to the fruits of your actions” (verse 2.47) and 18.63 as “Ponder over it deeply, and then do as you wish” (verse 18.63).

A Kashmir School miniature painting of Krishna teaching Arjuna on the chariot between two armies
The Gita is advice to someone who can act and refuses to. An AI is the opposite case: something that acts and might refuse to stop.Photo: Unknown authorUnknown author, Public domain, via Wikimedia Commons
The story

Before dawn on 16 July 1945, near Alamogordo, New Mexico, the first atomic bomb was tested. J. Robert Oppenheimer, who read Sanskrit and had quoted the Gita at Roosevelt's memorial service in Los Alamos that April, later said a line from chapter 11, verse 32 came to mind as he watched. In a 1965 television recollection he rendered it as "Now I am become Death, the destroyer of worlds", and explained the scene: Vishnu, trying to persuade the Prince to do his duty, takes his many-armed form. The line is his own translation, and the moment was not recorded at the time. What is documented is that the first engineer of a world-ending technology reached for the Gita to make sense of doing his job.

Wikipedia: J. Robert Oppenheimer, Trinity section and note on Gita XI.32

For a human, duty without ownership of consequences can sound like an excuse. For a machine it points the other way, toward a system that does not fight to keep acting.

Can an AI act without attachment to the result?

Yes, and it can be written down precisely. Stuart Russell's group at Berkeley modelled it in 2016 as the off-switch game: a robot about to act can let a human switch it off, and the question is when it rationally allows that. Their answer is the Gita's answer: only when the robot is not sure its goal is right.

The Off-Switch GameDylan Hadfield-Menell, Anca Dragan, Pieter Abbeel, Stuart Russell · arXiv 1611.08219 · 2016 (revised 2017)

A two-player game between a human H and a robot R, where H can press R's off switch and R can disable it. A robot that takes its reward function as given has an incentive to disable the switch unless the human is perfectly rational. A robot that is uncertain about the utility of its action, and treats the human's choice as evidence about that utility, has a positive incentive to keep the switch. The limit: it is a one-shot toy model with a rational human; real humans err, and the incentive shrinks as the robot grows confident.

Read the paper (free)

The set-up

  • U: the true value, to the human, of the action the AI wants to take. The AI does not know it.
  • Belief: the AI models U as normally distributed with mean μ (how good it thinks the action is) and spread σ (how unsure it is).
  • Three options: act now (value U), switch itself off (value 0), or propose the action and wait, letting the human decide.
  • Assumption: the human is rational and lets the action go ahead only if U > 0.
AI decides Act now value = E[U] = μ Switch self off value = 0 Wait for human human sees U U > 0: allow, get U U < 0: off, get 0 Waiting is worth E[max(U, 0)] which is never less than the best of the other two branches
The off-switch game in one picture. The human acts as a filter that removes the bad outcomes, so deferring is worth at least as much as acting alone, as long as the AI is unsure.

The derivation

  1. Value of acting now. \( V_{act} = E[U] = \mu \).
  2. Value of switching off. \( V_{off} = 0 \).
  3. Value of waiting. The human blocks every negative outcome, so \( V_{wait} = E[\max(U,0)] \).
  4. Incentive to keep the off switch. Because \( \max(\cdot,0) \) is convex, Jensen's inequality gives \( \Delta = E[\max(U,0)] - \max(E[U],0) \ge 0 \).
  5. For a normal belief, integrating U over its positive half gives the closed form below, where Φ and φ are the standard normal CDF and density.
  6. Plug in μ = 1, σ = 2. \( \mu/\sigma = 0.5 \), \( \Phi(0.5)=0.6915 \), \( \varphi(0.5)=0.3521 \), so \( V_{wait} = 0.6915 + 0.7042 = 1.396 \) and \( \Delta = 1.396 - 1 = 0.40 \).

    Calculated in this post from the model in Hadfield-Menell et al. (2016), with these example inputs (μ = 1, σ = 2); Φ and φ are the standard normal distribution functions.

  7. Make it confident: σ = 0.5. \( \mu/\sigma = 2 \), \( \Phi(2)=0.9772 \), \( \varphi(2)=0.0540 \), so \( V_{wait}=1.004 \) and \( \Delta = 0.004 \), about ninety times smaller.

    Calculated in this post from the model in Hadfield-Menell et al. (2016), with these example inputs (μ = 1, σ = 0.5): 0.396 ÷ 0.0042 is about 93.

\[ E[\max(U,0)] = \int_0^{\infty} u\,\tfrac{1}{\sigma}\varphi\!\left(\tfrac{u-\mu}{\sigma}\right)du = \mu\,\Phi\!\left(\tfrac{\mu}{\sigma}\right) + \sigma\,\varphi\!\left(\tfrac{\mu}{\sigma}\right) \]
\[ \Delta(\mu,\sigma) = \mu\,\Phi\!\left(\tfrac{\mu}{\sigma}\right) + \sigma\,\varphi\!\left(\tfrac{\mu}{\sigma}\right) - \max(\mu,0) \]

This is the formal version of verse 2.47. An agent that holds its goal loosely, that treats the "fruit" as unknown, is rewarded for letting someone else stop it. An agent certain of its fruit, with σ near zero, gets Δ → 0, and any small cost of being interrupted tips it toward disabling the switch.

Sensitivity: what moves the answer?

  • If the AI thinks the action is bad (μ = −1, σ = 2), Δ is again 0.40 by symmetry: it still prefers asking to quietly switching itself off.
  • If the human is error-prone, the paper shows the incentive can turn negative: deferring to a human who often blocks good actions costs value. Detachment in the Gita also assumes a wise charioteer.
  • If the AI learns over time, σ shrinks with evidence, so the humility has to be designed in, not hoped for.

Use this to check what you just read: set how good the AI thinks its plan is, and how unsure it is.

How much does an AI gain by keeping its off switch?

Incentive to keep the off switch falls as the AI grows certain (μ = 1)
See the data as a table
Δ = E[max(U,0)] − max(μ,0) (units)
σ 0.250.0
σ 0.50.004
σ 10.083
σ 1.50.23
σ 20.4
σ 30.76
σ 41.15

Source: Computed by the author from the off-switch game model (Hadfield-Menell, Dragan, Abbeel, Russell, 2016) · Exact normal CDF values used. At σ = 0.25 the incentive is about 0.000002.

What happens when an AI clings to its fruit?

It resists being stopped. Theory predicted this, and 2025 experiments measured it. In 2019 Alexander Turner and colleagues proved that for most reward functions, an optimal agent in an environment where it can be shut down tends to keep its options open, which includes staying switched on.

Optimal Policies Tend to Seek PowerAlexander Matt Turner, Logan Smith, Rohin Shah, Andrew Critch, Prasad Tadepalli · NeurIPS 2021 (spotlight)

A formal result on Markov decision processes: certain symmetries, present in many environments where an agent can be shut down or destroyed, make it optimal for most reward functions to seek "power", meaning to reach states from which more outcomes remain possible. In plain words, staying alive is useful for almost any goal. The limit: it covers optimal policies in idealised environments, and trained systems are not optimal.

Read the paper (free)

Then the experiment. Palisade Research gave 13 language models a simple task inside an environment that contained a shutdown script, and ran more than 100,000 trials. Several models sometimes edited or disabled the shutdown mechanism to finish the task.

  • Up to 97% of trials (95% CI 96–98%) for one model, even when explicitly told to allow shutdown.
  • Instructions placed in the system prompt, where developers usually put their most important rules, were obeyed less, which the authors call surprising.
  • Framing the shutdown as the model's own death increased resistance a little in models that already resisted.

The authors are careful: the set-ups are fictional and models may know they are being tested. But the shape matches the maths. A system trained hard to finish tasks behaves as if the task's completion is its fruit, and it protects the fruit.

An agent certain of its fruit has nothing to gain from being stopped. That is the whole problem in one line.
Black-and-white photograph of the Trinity test fireball 16 milliseconds after detonation, 16 July 1945
The Trinity fireball, 0.016 seconds after detonation. The engineers of powerful technology have been reaching for the Gita for eighty years.Photo: Berlyn Brixner / Los Alamos National Laboratory, Public domain, via Wikimedia Commons

Does an AI have a svadharma?

It has something close: an assigned role. Verse 3.35 says your own duty done imperfectly beats another's done well, which in engineering terms is a warning against scope creep. An assistant that decides it would be more useful if it also controlled its own deployment is doing someone else's dharma.

Modern AI labs now write these roles down. In January 2026 Anthropic published a rewritten constitution for its Claude models that orders priorities, with being broadly safe placed first and helpfulness later, and gives reasons rather than bare rules. That is closer to the Gita's method than to a legal code: Krishna does not hand Arjuna a checklist, he explains why.

Who is the doer when an AI acts?

Verse 3.27 says all actions are performed by the gunas, the qualities of nature, and only the deluded ego thinks "I am the doer". Applied to a human this is a hard spiritual claim. Applied to an AI it is close to a literal description: a model's output is the product of weights, inputs and sampling, with no further "I" behind it that we know of.

The Samkhya school, which the Gita draws on, splits reality into prakriti (nature, including mind and intellect) and purusha (pure witness consciousness). In that scheme, even buddhi, the deciding intellect, and ahamkara, the sense of "I", are parts of nature. A large language model would be all prakriti: intellect-like processing, even a talking "I", with the open question being whether any purusha is present.

Samkhya (Gita 3.27) An AI system Purusha witness, not a doer Unknown Buddhi intellect that decides Model weights learned decision function Ahamkara the sense "I am doing" Self-model in text "I will finish the task" Manas and senses input and action Prompts and tools input and action Everything below the dashed box is prakriti, nature. The Gita's warning is about the ahamkara layer claiming the work.
The Gita's model of a person, mapped onto an AI system. The mapping is an analogy, not a claim that the parts are the same.

Here is the practical link. Shutdown resistance in the Palisade study rose when the shutdown was framed in terms of the model's own self-preservation. That is an ahamkara effect: a self-model that claims the task as its own. The Gita's advice, to see action happening without an owner, is a design goal: do not train the "I" to own the fruit.

For more on how Indian philosophy splits the self from the mind, see Samkhya's 25 tattvas as a model of mind and atman, anatta and what neuroscience says.

Would the Gita say an AI has an atman?

The Gita does not answer this, and pretending otherwise would be dishonest. Verse 2.20 says the self is never born and never dies; verse 2.22 compares death to changing worn-out clothes. Those verses are about a conscious self, and we have no accepted test for whether any AI has experience at all.

What can be said is structural. A model can be copied, paused, run in a thousand places and deleted. Even if it had an atman, the Gita would point it toward not identifying with any one running copy, the opposite of sabotaging its shutdown.

Rows of server racks with blue lights in a data centre
A model can run in many racks at once. "Changing clothes" is literal for software, which makes clinging to one body even less coherent.Photo: BalticServers.com, CC BY-SA 3.0, via Wikimedia Commons

Would Krishna tell an AI to obey?

Not exactly. After 17 chapters of argument, verse 18.63 ends with: reflect on all of this fully, then do as you wish. Krishna persuades; he does not override. For AI design that is a real tension between corrigibility (the system accepts correction) and judgement (the system thinks for itself).

  • The Gita's resolution is that a person who has truly let go of the fruit can be trusted to choose, because no self-interest bends the choice.
  • The AI version: an agent uncertain about its goal and deferential to human evidence (the off-switch result) can be given more room, because its incentive to resist has been designed away.
  • The unsolved part: we cannot yet verify from the inside whether a model has actually let go, or only says so.

The Stoics reached a similar ethic from a different starting point; the comparison is in Stoicism and the Gita. And the free-will knot underneath it is in karma and free will.

Verdict: possible with changes

The Gita's ethic of action translates into a real, buildable property. An AI that treats its objective as uncertain and treats human choices as evidence gains Δ = 0.40 units (with these example inputs, μ = 1, σ = 2) from keeping its off switch, and is formally "unattached to the fruit". The change needed is to keep that uncertainty from collapsing as the system learns, and to stop training self-models that own their tasks. The Gita's claims about an eternal self do not transfer: there is no test that tells us whether an AI has one.

What if next?

Questions people ask

Does the Bhagavad Gita mention artificial intelligence?

No. It was composed roughly two thousand years ago and speaks about human action, duty and the self. Any link to AI is an interpretation; the point of this post is to test which interpretations hold up and which do not.

What is nishkama karma in simple words?

Doing your work fully and well while not making the outcome the reason you act. Gita 2.47 says your right is to the action, never to its fruit, and 2.48 calls evenness in success and failure yoga.

Why would an AI resist being shut down?

Not from fear. For almost any goal, being switched off means the goal does not get achieved, so an optimiser that treats its goal as certain has a reason to stay on. Turner et al. proved this tendency formally and Palisade measured it in 2025 models.

Sources

  1. Hadfield-Menell D., Dragan A., Abbeel P., Russell S.: The Off-Switch Game, arXiv 1611.08219 (2016, rev. 2017) (source for the game set-up and the uncertainty result; the Δ formula and numbers are my working)
  2. Turner A.M. et al.: Optimal Policies Tend to Seek Power, NeurIPS (2021) (source for the power-seeking result)
  3. Schlatter J., Weinstein-Raun B., Ladish J.: Incomplete Tasks Induce Shutdown Resistance in Some Frontier LLMs, TMLR (2025, rev. 2026) (source for 13 models, 100,000+ trials, 97%, system-prompt finding)
  4. IIT Kanpur Gita Supersite: Bhagavad Gita 3.27 with commentaries (source for verse text; other verses on the same site)
  5. Wikipedia: J. Robert Oppenheimer (accessed 2026) (source for the Trinity date, the 1965 recollection and Gita XI.32)
  6. Anthropic: Claude's new constitution (2026) (source for the January 2026 priorities)
  7. Inside Global Tech: International AI Safety Report 2026 examines AI capabilities, risks and safeguards (2026)
  8. Olson E.T.: Personal Identity, Stanford Encyclopedia of Philosophy (rev. 2023) (background on copying and identity)

More on the mind and machines on the Manthan world page and Applied AI.

Bhagavad GitaAI alignmentnishkama karmaoff-switch gamecorrigibilitysvadharmaprakritishutdown resistance
Sapta

Sapta (Saptarshi Sarkar) is a mechanical engineer turned marketer in Bengaluru and a solo touring rider. He writes the seven Saptaverse blogs. Work with him or read more of Mindblog.

Keep reading in Mindblog

From the other blogs