Answers.Body: <p>In game AI context:</p>
  <ul>
  <li>An <strong>Agent</strong> is a player that plays the game. Basically, its a function that gets the current state of the game and returns the next action.</li>
  <li>A <strong>Model</strong> is a representation of the game.</li>
  </ul>
  <p>For example, I have made a Gin-Rummy game + AI-agents.  One aspect in the model was the representation of the deck as a <span class="math-container">$4*13$</span> matrix, where each entry in the matrix is the card status (location, whether the card has been seen by opponent).</p>
  <p>One can model the same game in different ways, most times there is a tradeoff between representability and simplicity.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-09T13:16:26.630Z
Answers.Text: Note that in game AI contexts, people also often refer to a trained neural network (or other kind of trained machine learning thing) as the "model", and the full thing that makes decisions (often a combination of a tree search algorithm + such a neural network) as the "agent"
Answers.UserDisplayName: Dennis Soemers
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-09T08:19:02.530Z
Answers.LastActivityDate: 2024-12-20T17:40:17.800Z
Answers.LastEditDate: 2024-12-20T17:40:17.800Z
Answers.UserDisplayName: Cohensius
Answers.Body: <h2>Agents act</h2>
  <p>The key property of agents is that they act. Quoting one possible definition (Russel&amp;Norvig, AI: A modern approach), &quot;An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators.&quot; The environment can be the physical world around us, or some computer system, or a simulation, however, the key part of an agent that distinguishes it from non-agents is that it acts to affect that environment - as opposed to merely observing it and/or making some calculations.</p>
  <p>Within the field of artificial intelligence there are many contexts where various models are used to decide upon a course of action. For example, reinforcement learning, or world models that are used in planning systems. In this case the whole system would be an agent, but the model would be just a part of that system.</p>
  <p>However, that does not apply for all contexts - there are systems that are used for making decisions not related to any action (e.g. an OCR system recognizing particular letters), and there are systems that make a decision about some action, but are not intended to actually act on that decision (e.g. they show the proposed decision to a human which might act on that information). Such systems may contain models but in this case also the whole system should not be called an agent, because the actual act of acting is out of scope for that system.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-09T22:43:09.023Z
Answers.LastActivityDate: 2021-02-09T22:43:09.023Z
Answers.UserDisplayName: Peteris
Answers.Body: <p>Andrew Ng differentiates agents from non-agents as follows:</p>
  <p><a href="https://i.sstatic.net/TMyKhN8J.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/TMyKhN8J.png" alt="enter image description here" /></a></p>
  <p>Example:</p>
  <p><a href="https://i.sstatic.net/82gqr5cT.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/82gqr5cT.png" alt="enter image description here" /></a></p>
  <p>Typical agentic design patterns:</p>
  <p><a href="https://i.sstatic.net/Wx3iWS2w.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Wx3iWS2w.png" alt="enter image description here" /></a></p>
  <p>And here are a bit more details on each of these agentic design patterns:</p>
  <p><a href="https://i.sstatic.net/3eo01KlD.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3eo01KlD.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.sstatic.net/MECir4pB.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/MECir4pB.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.sstatic.net/51ivWyeH.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/51ivWyeH.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.sstatic.net/oT4IQkbA.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oT4IQkbA.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.sstatic.net/4hHef4zL.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4hHef4zL.png" alt="enter image description here" /></a></p>
  <p>Source: <a href="https://youtu.be/KrRD7r7y7NY" rel="nofollow noreferrer">https://youtu.be/KrRD7r7y7NY</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-21T14:05:35.613Z
Answers.Text: Rather than providing screenshots, it would be more useful to provide a summary, in words, of their definition of agent and model and how they are different (and still leave the link to the original source). Not just because this shows a bit of laziness but also because it's difficult to read some text in the screenshots. I have not fully read this but this seems to be more specific to LLM. The concept of agent has been around for a lot longer and it's not LLM that will redefine the concept just because a famous guy decided to redefine it. Also, the question is not about agents vs non-agents.
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-21T16:07:47.993Z
Answers.Text: @nbro I thought AI people knew about OCR. My answer explains the current typical use of the term in the context of LLMs, which are rather popular these days
Answers.UserDisplayName: Franck Dernoncourt
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-20T17:30:02.603Z
Answers.LastActivityDate: 2024-12-20T18:22:32.600Z
Answers.LastEditDate: 2024-12-20T18:22:32.600Z
Answers.UserDisplayName: Franck Dernoncourt
Answers.Body: <h3>Agent</h3>
  <p>The other answer defines an agent as a <em>policy</em> (as it's defined in reinforcement learning). However, although this definition is fine for most current purposes, given that currently agents are mainly used to solve video games, in the real world, an intelligent agent will also need to have a <strong>body</strong>, which Russell and Norvig call an <strong>architecture</strong> (section 2.4 of the 3rd edition of <a href="https://cs.calvin.edu/courses/cs/344/kvlinden/resources/AIMA-3rd-edition.pdf#page=65" rel="noreferrer">Artificial Intelligence: A Modern Approach</a>, page 46), which should not be confused with an architecture of a model or neural network, but it's the computing device that contains the physical sensors and actuators for the agent to sense and act on the environment, respectively. So, to be more general, the agent is defined as follows</p>
  <blockquote>
  <p>agent = body + policy (brain)</p>
  </blockquote>
  <p>where the <strong>policy</strong> is what Russell and Norvig call the <a href="https://ai.stackexchange.com/q/1756/2444"><strong>agent program</strong></a>, which is an implementation of the <strong>agent function</strong>.</p>
  <p>Alternatively, it can be defined as follows</p>
  <blockquote>
  <p>An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators.</p>
  </blockquote>
  <p>This is just another definition given by Russell and Norvig, which I also report in <a href="https://ai.stackexchange.com/a/12995/2444">this answer</a>, where I describe different types of agents. Note that these definitions are equivalent. However, in the first one, we just emphasize that we need some means to &quot;think&quot; (brain) and some means to &quot;behave&quot; (body).</p>
  <p>These definitions are quite general, so I think people should use them, although, as I said above, sometimes people refer to an agent as just the policy.</p>
  <h3>Model</h3>
  <p>In <a href="https://ai.stackexchange.com/a/25460/2444">this answer</a>, I describe what a model is or what I like to think a model is, and how it is different from a function.</p>
  <p>In AI, a model can refer to different but somehow related concepts.</p>
  <ul>
  <li><p>For example, in <em>reinforcement learning</em>, a model typically refers to <span class="math-container">$p(s', r \mid s, a)$</span>, i.e. the joint probability distribution over the next state <span class="math-container">$s'$</span> and reward <span class="math-container">$r$</span>, given the current state <span class="math-container">$s$</span> and action <span class="math-container">$a$</span> taken in <span class="math-container">$s$</span>.</p>
  </li>
  <li><p>In <em>deep learning</em>, a model typically refers to a neural network, which can be used to compute (or model) different functions. For example, a neural network can be used to compute/represent/model a policy, so, in this case, there would be no actual difference between a model and an agent (if defined as a policy, without a body). However, conceptually, at a higher-level, these would still be different (in the same way that biological neural networks are different from the brain).</p>
  </li>
  <li><p>More generally, in <em>machine learning</em>, a model typically refers to a system that can be changed to compute some function. Examples of models are decision trees, neural networks, linear regression models, etc. So, as I also state in the other answer, I like to think of a model as a <strong>set of functions</strong>, so, in this sense, a model would be a <em>hypothesis class</em> in <em>computational learning theory</em>. This definition is roughly consistent with <span class="math-container">$p(s', r \mid s, a)$</span>, which can also be thought of as a (possibly infinite) set of functions, but note that a probability distribution is not exactly a set of functions.</p>
  </li>
  <li><p>In the context of <em>knowledge bases</em>, a model is an assignment to the variables, which represents a &quot;possible world&quot;. See <a href="https://cs.calvin.edu/courses/cs/344/kvlinden/resources/AIMA-3rd-edition.pdf#page=259" rel="noreferrer">section 7.3, page 240, of the cited book</a>.</p>
  </li>
  </ul>
  <p>There are possible other uses of the word <em>model</em> (both in the context of AI, e.g. in the context of <strong>planning</strong>, there's often the idea of a <strong>conceptual model</strong>, which is similar to an MDP in RL, and in other areas), but the definitions given above should be more or less widely applicable in their contexts.</p>
  <h3>What is the difference between an agent and a model?</h3>
  <p>Given that there are different possible definitions of a <strong>model</strong> depending on the context, it's not easy to <em>briefly</em> state what the difference between the two is.</p>
  <p>So, here's the difference in the context of RL (and you can now find out the differences in other contexts by using the different definitions): an agent can have a model of the world, which allows it to predict e.g. the reward it will receive given its current state and some action that it decides to take. The model can allow the agent to plan. In this same context, a model could <em>also</em> refer to the specific system (e.g. a neural network) used to compute/represent the policy of the agent, but note that people usually refer to <span class="math-container">$p(s', r \mid s, a)$</span> when they use the word <em>model</em> in RL. See <a href="https://ai.stackexchange.com/q/4456/2444">this post</a> for more details.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-09T13:00:21.680Z
Answers.Text: Worth mentioning model-free vs model-based in context of RL? There is a question about that on the site that you could link - https://ai.stackexchange.com/questions/4456/whats-the-difference-between-model-free-and-model-based-reinforcement-learning . Answers to that question would tend to contradict your last sentence (the term "model" is avoided for neural networks that output policy or value etsimates in RL context, although it is reasonable in general because "model" can be any system that makes predictions for, or simulates some other system)
Answers.UserDisplayName: Neil Slater
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-09T13:19:41.607Z
Answers.Text: @NeilSlater I will link to that post. I say "a model could _also_ refer to...", but you're right that people could still get confused.
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-09T11:51:05.000Z
Answers.LastActivityDate: 2021-02-09T15:12:44.857Z
Answers.LastEditDate: 2021-02-09T15:12:44.857Z
Answers.UserDisplayName: nbro
Body: <p>In the context of Artificial Intelligence, sometimes people use the word &quot;agent&quot; and sometimes use the word &quot;model&quot; to refer to the output of the whole &quot;AI-process&quot;. For examples: &quot;RL <strong>agents</strong>&quot; and &quot;deep learning <strong>models</strong>&quot;.</p>
  <p>Are the two words interchangeable? If not, in what case should I use &quot;agents&quot; instead of &quot;models&quot; and vice versa?</p>
  
Tags: <terminology><definitions><models><intelligent-agent>
Title: What are the differences between an agent and a model?
UserDisplayName: malioboro
ThreadText: # What are the differences between an agent and a model?
  
  (Asked by: username_0 on 2021-02-09)
  
  In the context of Artificial Intelligence, sometimes people use the word "agent" and sometimes use the word "model" to refer to the output of the whole "AI-process". For examples: "RL **agents**" and "deep learning **models**".
  
  Are the two words interchangeable? If not, in what case should I use "agents" instead of "models" and vice versa?
  
  **Tags:** terminology, definitions, models, intelligent-agent
  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_5 on 2021-02-09. Score: 9 | Accepted answer
  
  ### Agent
  
  The other answer defines an agent as a *policy* (as it's defined in reinforcement learning). However, although this definition is fine for most current purposes, given that currently agents are mainly used to solve video games, in the real world, an intelligent agent will also need to have a **body**, which Russell and Norvig call an **architecture** (section 2.4 of the 3rd edition of [Artificial Intelligence: A Modern Approach](https://cs.calvin.edu/courses/cs/344/kvlinden/resources/AIMA-3rd-edition.pdf#page=65), page 46), which should not be confused with an architecture of a model or neural network, but it's the computing device that contains the physical sensors and actuators for the agent to sense and act on the environment, respectively. So, to be more general, the agent is defined as follows
  
  > agent = body + policy (brain)
  
  where the **policy** is what Russell and Norvig call the [**agent program**](https://ai.stackexchange.com/q/1756/2444), which is an implementation of the **agent function**.
  
  Alternatively, it can be defined as follows
  
  > An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators.
  
  This is just another definition given by Russell and Norvig, which I also report in [this answer](https://ai.stackexchange.com/a/12995/2444), where I describe different types of agents. Note that these definitions are equivalent. However, in the first one, we just emphasize that we need some means to "think" (brain) and some means to "behave" (body).
  
  These definitions are quite general, so I think people should use them, although, as I said above, sometimes people refer to an agent as just the policy.
  
  ### Model
  
  In [this answer](https://ai.stackexchange.com/a/25460/2444), I describe what a model is or what I like to think a model is, and how it is different from a function.
  
  In AI, a model can refer to different but somehow related concepts.
  
  * For example, in *reinforcement learning*, a model typically refers to $p(s', r \mid s, a)$, i.e. the joint probability distribution over the next state $s'$ and reward $r$, given the current state $s$ and action $a$ taken in $s$.
  * In *deep learning*, a model typically refers to a neural network, which can be used to compute (or model) different functions. For example, a neural network can be used to compute/represent/model a policy, so, in this case, there would be no actual difference between a model and an agent (if defined as a policy, without a body). However, conceptually, at a higher-level, these would still be different (in the same way that biological neural networks are different from the brain).
  * More generally, in *machine learning*, a model typically refers to a system that can be changed to compute some function. Examples of models are decision trees, neural networks, linear regression models, etc. So, as I also state in the other answer, I like to think of a model as a **set of functions**, so, in this sense, a model would be a *hypothesis class* in *computational learning theory*. This definition is roughly consistent with $p(s', r \mid s, a)$, which can also be thought of as a (possibly infinite) set of functions, but note that a probability distribution is not exactly a set of functions.
  * In the context of *knowledge bases*, a model is an assignment to the variables, which represents a "possible world". See [section 7.3, page 240, of the cited book](https://cs.calvin.edu/courses/cs/344/kvlinden/resources/AIMA-3rd-edition.pdf#page=259).
  
  There are possible other uses of the word *model* (both in the context of AI, e.g. in the context of **planning**, there's often the idea of a **conceptual model**, which is similar to an MDP in RL, and in other areas), but the definitions given above should be more or less widely applicable in their contexts.
  
  ### What is the difference between an agent and a model?
  
  Given that there are different possible definitions of a **model** depending on the context, it's not easy to *briefly* state what the difference between the two is.
  
  So, here's the difference in the context of RL (and you can now find out the differences in other contexts by using the different definitions): an agent can have a model of the world, which allows it to predict e.g. the reward it will receive given its current state and some action that it decides to take. The model can allow the agent to plan. In this same context, a model could *also* refer to the specific system (e.g. a neural network) used to compute/represent the policy of the agent, but note that people usually refer to $p(s', r \mid s, a)$ when they use the word *model* in RL. See [this post](https://ai.stackexchange.com/q/4456/2444) for more details.
  
  > **Comments:**
  > **username_6**: Worth mentioning model-free vs model-based in context of RL? There is a question about that on the site that you could link - https://ai.stackexchange.com/questions/4456/whats-the-difference-between-model-free-and-model-based-reinforcement-learning . Answers to that question would tend to contradict your last sentence (the term "model" is avoided for neural networks that output policy or value etsimates in RL context, although it is reasonable in general because "model" can be any system that makes predictions for, or simulates some other system)  
  > **username_5**: @username_6 I will link to that post. I say "a model could _also_ refer to...", but you're right that people could still get confused.  
  
  ---
  
  ### Answer by username_1 on 2021-02-09. Score: 7
  
  In game AI context:
  
  * An **Agent** is a player that plays the game. Basically, its a function that gets the current state of the game and returns the next action.
  * A **Model** is a representation of the game.
  
  For example, I have made a Gin-Rummy game + AI-agents. One aspect in the model was the representation of the deck as a $4\*13$ matrix, where each entry in the matrix is the card status (location, whether the card has been seen by opponent).
  
  One can model the same game in different ways, most times there is a tradeoff between representability and simplicity.
  
  > **Comments:**
  > **username_2**: Note that in game AI contexts, people also often refer to a trained neural network (or other kind of trained machine learning thing) as the "model", and the full thing that makes decisions (often a combination of a tree search algorithm + such a neural network) as the "agent"  
  
  ---
  
  ### Answer by username_3 on 2021-02-09. Score: 2
  
  ## Agents act
  
  The key property of agents is that they act. Quoting one possible definition (Russel&Norvig, AI: A modern approach), "An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators." The environment can be the physical world around us, or some computer system, or a simulation, however, the key part of an agent that distinguishes it from non-agents is that it acts to affect that environment - as opposed to merely observing it and/or making some calculations.
  
  Within the field of artificial intelligence there are many contexts where various models are used to decide upon a course of action. For example, reinforcement learning, or world models that are used in planning systems. In this case the whole system would be an agent, but the model would be just a part of that system.
  
  However, that does not apply for all contexts - there are systems that are used for making decisions not related to any action (e.g. an OCR system recognizing particular letters), and there are systems that make a decision about some action, but are not intended to actually act on that decision (e.g. they show the proposed decision to a human which might act on that information). Such systems may contain models but in this case also the whole system should not be called an agent, because the actual act of acting is out of scope for that system.
  
  
  ---
  
  ### Answer by username_4 on 2024-12-20. Score: -1
  
  Andrew Ng differentiates agents from non-agents as follows:
  
  [![enter image description here](https://i.sstatic.net/TMyKhN8J.png)](https://i.sstatic.net/TMyKhN8J.png)
  
  Example:
  
  [![enter image description here](https://i.sstatic.net/82gqr5cT.png)](https://i.sstatic.net/82gqr5cT.png)
  
  Typical agentic design patterns:
  
  [![enter image description here](https://i.sstatic.net/Wx3iWS2w.png)](https://i.sstatic.net/Wx3iWS2w.png)
  
  And here are a bit more details on each of these agentic design patterns:
  
  [![enter image description here](https://i.sstatic.net/3eo01KlD.png)](https://i.sstatic.net/3eo01KlD.png)
  
  [![enter image description here](https://i.sstatic.net/MECir4pB.png)](https://i.sstatic.net/MECir4pB.png)
  
  [![enter image description here](https://i.sstatic.net/51ivWyeH.png)](https://i.sstatic.net/51ivWyeH.png)
  
  [![enter image description here](https://i.sstatic.net/oT4IQkbA.png)](https://i.sstatic.net/oT4IQkbA.png)
  
  [![enter image description here](https://i.sstatic.net/4hHef4zL.png)](https://i.sstatic.net/4hHef4zL.png)
  
  Source: <https://youtu.be/KrRD7r7y7NY>
  
  > **Comments:**
  > **username_5**: Rather than providing screenshots, it would be more useful to provide a summary, in words, of their definition of agent and model and how they are different (and still leave the link to the original source). Not just because this shows a bit of laziness but also because it's difficult to read some text in the screenshots. I have not fully read this but this seems to be more specific to LLM. The concept of agent has been around for a lot longer and it's not LLM that will redefine the concept just because a famous guy decided to redefine it. Also, the question is not about agents vs non-agents.  
  > **username_4**: @username_5 I thought AI people knew about OCR. My answer explains the current typical use of the term in the context of LLMs, which are rather popular these days  
  
  ---
  
  