2025 m. vasario 13 d., ketvirtadienis

Learning courses and Notes

How We Learn


Introduction to the Focused and Diffuse Modes



Diffuse (as opposed to the focused) mode of thinking:

The diffuse mode could be thought of as a flashlight set so that it casts its light very broadly, but not very strongly in any one area. (As opposed to the focused mode, which would have its light cast very strongly in a single area, but very weakly everywhere else.)
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, while SmolLM2-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:

  1. Thought: The LLM part of the Agent decides what the next step should be.
  2. Action: The agent takes an action, by calling the tools with the associated arguments.
  3. 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:

  1. Thought: The LLM part of the Agent decides what the next step should be.
  2. Action: The agent takes an action, by calling the tools with the associated arguments.
  3. 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:

 
Going deeper: