Your thermostat is an intelligent agent

June 7, 2024
5 minute read

Hey,

This week I joined about a dozen AI communities. I'm looking for a new home for Promptmaster. Most of these communities are full of talks about "AI Agents". Ironically, in every community that means something different.

Then I got an email this week from one of our long time students, John asking about it. He said:

"David, you referred to workflow automations built with frameworks like Make or Zapier as "AI agents." I, and ChatGPT, think they're different things"

Then I realized that we talk so much about these things, yet we never really cleared the air on these terms. Today I'll give you the real cheat sheet to understand the difference between Terminator and Replicator (old SG-1 reference, I'm REALLY hoping at least someone will get it. If you don't ask me in a reply.)

Okay, so let's begin with the elephant in the room 🐘:

What the hell is an agent?

In these communities (including ours) when we say AI, we really mean a Large Language Model. Which is part of Natural Language Processing, which uses a lot of parts of Deep Learning, which is part of Machine Learning which is part of AI. That's it, but not really, there's more. Geez Louise, why do nerds have to make everything so complicated?

So for ease of understanding and to stay practical, for now we'll say: AI = GPT-4o. But still, what's the "agent" bit? Let's see. Stuart Russell and Peter Norvig published a book on the topic to help us, called Artificial Intelligence: A Modern Approach. This is basically The Book on AI, that is being used in 1500+ universities worldwide.

In this book, this is how they define an intelligent agent:

An intelligent agent (IA) is an agent acting in an intelligent manner. It perceives its environment, takes actions autonomously in order to achieve goals, and may improve its performance with learning or acquiring knowledge. An intelligent agent may be simple or complex: A thermostat or other control system is considered an example of an intelligent agent, as is a human being, as is any system that meets the definition, such as a firm, a state, or a biome.

Wait, what? My thermostat is an intelligent agent?

I can already see this unfolding, oh God. Add some sass to the Custom Instructions accidentally and then:

Don't worry I obviously instructed it to respond this way.

But jokes aside, let's unpack this:

It perceives its environment, takes actions autonomously in order to achieve goals, and may improve its performance with learning or acquiring knowledge.

The industry uses the PEAS System to classify these 4 criteria of an intelligent agent. Performance measure, Environment, Actuator, Sensor

Performance measure is to help the agent understand if the goal was achieved.

Environment is just the environment of the agent. Where is it being used.

Actuator is a fancy word to describe the actions taken autonomously. This can be anything from writing a text to clicking buttons or sending emails.

Sensor is about perceiving the environment. This doesn't have to be hardware. One of our agents watches incoming emails via a Make module. That's a sensor.

So your thermostat's goal is to set the desired temperature in the room and if it perceives that the temperature is lower it'll automatically turn the heat up until it senses that the goal is achieved. On its own. Your dumb old thermostat your dad never let you touch was an intelligent agent. Who would've thought?

But wait, there's one more thing!

The definition says "may improve its performance with learning or acquiring knowledge". So learning is...optional?

Of course it is. Sometimes you don't need to automate EVERYTHING, you just need the system to be somewhat intelligent.

When an agent becomes an AI agent

As you can see whether or not AI is involved in the agent definition depends on HOW it checks against the four criteria above.

If GPT decides based on a pre-defined prompt if the goal is achieved, it's an AI agent. If it's a variable, it's just an agent.

If GPT writes the email or status report or error message or triggers an action, it's an AI agent, if not, it's just an agent.

If GPT translates an image to text using OCR to then do something with the information (process an order maybe) then it's an AI agent, if not, it's just an agent.

You're already using a bunch of intelligent agents in your life. But sometimes you need to intervene, because a smart, beautiful, amazing human like you needs to make a decision before the agent can continue with its job. Like you need to decide if you want the heat turned up.

If you delegate this decision making to GPT, you're dealing with an intelligent agent. But why would you?

ChatGPT is software that can say 0, 1 or none

Because software is REALLY good at doing things fast. But it's deterministic. It cannot make smart decisions for you. If you click on a button the same thing will happen every time. If that thing doesn't happen, it's a problem, a bug that needs to be fixed.

Humans on the other hand are non-deterministic. If Dave comes into the room and I ask him "Do you want a coffee?" he may say yes, no, start talking about the F1 race last weekend (which I always try to listen enthusiastically but I think I always fail) or do any other things. Because Dave's brain is not a Boolean search, but most software is.

However, when you ask something from ChatGPT it'll react with the same unpredictability. I tell GPT-4o to write a poem and it might give me a sonnet, a haiku or explain that as an AI large language model developed by OpenAI...

You get it.

So in that regard, ChatGPT and any other LLM is the first non-deterministic software.

But that doesn't make it a genie so you can stop rubbing the lamp. It looks silly.

If you want an AI agent to do things for you in your life, you still need to describe it as an agent: measuring performance, perceiving its environment, and taking autonomous action. Thankfully, the ITO Framework explained by Dave does a stellar job at that exactly.

That's really it. Don't get intimidated by fancy talk about custom GPTs and AI agents. It's just a GPT-4 with some custom instructions, actions and an interface.

If you had your AI agent...

This is all very complicated I know. Nerds complicate everything. I should know, I'm one of them. So if you feel that there's a ABYSS between you and your desired AI agent that solves your most painful problems for you, we got you.

Some of our Prompt Masters (remember Janos?) are graduating and becoming really good at these things. So if you want to get your own AI agent but this all feels very intimidating, book in a call to see if hiring a Prompt Master would be appropriate for you. This is a free call, where I'll ask you a couple questions and if I think you should hire one, I'll offer you a paid service.

Have a GREAT weekend,

David (yes hair, no glasses)

PS: Also if you want my help in building your AI agent, you can just book the call and talk to me.