How We Learn
Introduction to the Focused and Diffuse Modes
Diffuse (as opposed to the focused) mode of thinking:
The type of thinking you need to do when you are trying to understand something new.
Hugging Face AI Agents Course
Note that Actions are not the same as Tools. An Action, for instance, can involve the use of multiple Tools to complete.
Agent is a system that uses an AI Model (typically a LLM) as its core reasoning engine, to:
Understand natural language: Interpret and respond to human instructions in a meaningful way.
Reason and plan: Analyze information, make decisions, and devise strategies to solve problems.
Interact with its environment: Gather information, take actions, and observe the results of those actions.
Chat-Templates
As mentioned, chat templates are essential for structuring conversations between language models and users. They guide how message exchanges are formatted into a single prompt.
Base Models vs. Instruct Models
Another point we need to understand is the difference between a Base Model vs. an Instruct Model:
A Base Model is trained on raw text data to predict the next token.
An Instruct Model is fine-tuned specifically to follow instructions and engage in conversations. For example,
SmolLM2-135M
is a base model, whileSmolLM2-135M-Instruct
is its instruction-tuned variant.
The Core Components
Agents work in a continuous cycle of: thinking (Thought) → acting (Act) and observing (Observe).
Let’s break down these actions together:
- Thought: The LLM part of the Agent decides what the next step should be.
- Action: The agent takes an action, by calling the tools with the associated arguments.
- Observation: The model reflects on the response from the tool.
The Core Components
Agents work in a continuous cycle of: thinking (Thought) → acting (Act) and observing (Observe).
Let’s break down these actions together:
- Thought: The LLM part of the Agent decides what the next step should be.
- Action: The agent takes an action, by calling the tools with the associated arguments.
- Observation: The model reflects on the response from the tool.
Actions are the concrete steps an AI agent takes to interact with its environment.
Actions bridge an agent’s internal reasoning and its real-world interactions by executing clear, structured tasks—whether through JSON, code, or function calls.
Observations are how an Agent perceives the consequences of its actions.
In the observation phase, the agent:
- Collects Feedback: Receives data or confirmation that its action was successful (or not).
- Appends Results: Integrates the new information into its existing context, effectively updating its memory.
- Adapts its Strategy: Uses this updated context to refine subsequent thoughts and actions.
Links: