The Artificial Intelligence Behind Klara’s Sun-Worship

The Atlantic review of Klara and the Sun describes Klara the Artificial Friend as “a high-tech consumer product, the improbable priestess of something very like an ancient nature cult.” She earns this description from her pious relationship with the book’s other titular character, The Sun. But can a robot really invent her own religion? 

Religion and superstition are each elements of a worldview, and in order to reason in an environment, a machine needs a worldview as much as any human. Klara’s worldview isn’t even so strange. For all the bizarre conclusions she reaches, Klara’s reasoning is consistently logical. Her thought process is very much like that of a human child, and, taking a couple brief detours to explain likely reasons for some of her logical biases, we can go straight from Klara’s observed evidence to her startling conclusions.

Spoiler alert.

In the third act of Klara and the Sun, Klara convinces herself that If she destroys a smog-belching device known as the “Cootings machine,” the Sun, a god-like entity who lives in a nearby barn and heals the sick with his divine rays, will direct these rays upon her human charge, Josie, thereby saving her life. Like a child, Klara comes to the best conclusions she can based on her limited life experience and absence of rigorous scientific training. Let’s break it down.

In order to reach this conclusion, Klara needs to believe the following:

  • The Sun’s rays make the sick well
  • The Sun hates the Cootings machine
  • The Sun lives in a nearby barn
  • The Sun is an intelligent being with whom Klara can reason

The Sun’s rays make the sick well

Klara is a sun-powered robot, which could be explanation enough, but she has two more experiences to further support this conclusion. First off, Boy AF Rex constantly complains that he does not get enough sunlight and is sick as a result. Later, looking out from her place in the shop window, she sees a man and his dog, worse for the wear and not moving. When the sun shines upon them and they arise it looks like a miraculous recovery. Ipso facto – the sun heals. A broad conclusion from narrow evidence, but a conclusion from evidence nonetheless.

The Sun hates the Cootings machine

If we take for granted for a moment that the sun is an intelligent being with opinions, the idea that the Cootings machine’s smog is a frustration to the sun isn’t so strange. That is, if you assume that an intelligent Sun’s goal is to blanket the land and its denizens in sunlight. As opposed to, say, firing sunlight in all directions for its own sake with no concern for where it lands or what may block it. Here, Clara shows an egocentric bias, or in common terms, a preference for explanations based on her own perspective. In this case the perspective is Sunlight is good for me and the people around me and it comes from the sun. I like receiving it, so the sun must like sharing it. What’s interesting is she doesn’t think the sun has a personal interest in her well-being. She treats it more like a prickly Greco-roman god instead. In any case, egocentrism is a natural bias in humans, especially children. It’s a bias worth adding to a robot brain because it functions as an extrapolation tool that enables us to try to understand the unfamiliar using familiar paradigms, which, despite the many bizarre examples of where they fail, are often right.

The Sun lives in a nearby barn

Simply put, Klara goes to a nearby barn and finds the sun there. She looks for the barn because she saw the sun setting behind it, which she interpreted as the sun setting inside it. Inside the barn, she sees reflections of the sun that increase the brightness, confirming its presence. Remember that Klara has no education in astronomy or anything else, so none of this is illogical based on her knowledge. The lengths to which she goes to convince herself that she has indeed found an audience with the Sun, however, suggest confirmation bias. She thought she might find the sun in the barn, she wanted to find the sun in the barn, and therefore evidence that the sun was in fact in the barn and would hear her pleas stuck out to her, whereas evidence against did not. Confirmation bias is an emergent side effect of any understanding-seeking process. It’s satisfying to feel that we have gained understanding and frustrating to learn that we have not, which encourages us to fool ourselves easily and often. The scientific method has revolutionized humanity’s ability to discern truth by intentionally reversing confirmation bias. This is the null hypothesis. Because everyone wants to be right, a good scientist must be trained to assume first that she is wrong and then prove the opposite. Clara has no such training, so the confirmation bias embedded in her reasoning process is to be expected.

The Sun is an intelligent being with whom Klara can reason

Anthropomorphism. This million-dollar word refers to the attribution of human traits or intentions to non-human entities. Unlike egocentric bias and confirmation bias, it’s not a heuristic useful for general reasoning or a natural flaw in understanding systems that must be fought. Instead, it’s a quirk built into human brains in particular. Why? Because we’re social beings. Like other social animals, we survive and thrive only in the context of our family, friends, and neighbors, so we are primed to understand concepts of intention and human traits very well. Guess who else depends on humans to survive and thrive? Artificial friend robots such as Klara.

Because Klara is an artificial friend robot designed to interact with humans, the fact that she manifests this very human trait to see humanity where it is not makes all the sense in the world. 

Cover credit:

Name: Klara

Origin: Klara and the Sun (2021)

Likely Architecture: Reinforcement Learning with rewards for helping the child to which she is assigned and for understanding the world around her. No system to enforce the null hypothesis. Convolutional Neural Networks for vision processing with a particular module that fragments video into freeze-frames for additional analysis, and Transformers for Speech and Language. 

Possible Training Domains: Accumulated data from many thousands of previous artificial friends. No scientific training.

I take requests. If you have a fictional AI and wonder how it could work, or any other topic you’d like to see me cover, mention it in the comments or on my Facebook page.

By Sam Munk

Science fiction and Fantasy author with a focus on philosophical inquiry and character-driven drama.


  1. Thank you for this enjoyable analysis. It appears that Ishiguro’s Klara has a lot to teach us humans about our own, necessarily flawed, embodied intelligence. SciFi at its best, in my view.

Leave a comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: