I ran a quick experiment investigating how DeepSeek-R1 performs on agentic tasks, despite not supporting tool use natively, and I was rather pleased by initial results. This experiment runs DeepSeek-R1 in a single-agent setup, where the model not just plans the actions but also formulates the actions as executable Python code. On a subset1 of the GAIA recognition split, DeepSeek-R1 surpasses Claude 3.5 Sonnet by 12.5% outright, from 53.1% to 65.6% appropriate, and other designs by an even bigger margin:
The experiment followed design usage standards from the DeepSeek-R1 paper and the design card: Don't utilize few-shot examples, avoid including a system timely, and set the temperature to 0.5 - 0.7 (0.6 was used). You can find more evaluation details here.
Approach
DeepSeek-R1's strong coding abilities enable it to serve as an agent without being clearly trained for wiki.dulovic.tech tool use. By enabling the model to generate actions as Python code, it can flexibly communicate with environments through .
Tools are executed as Python code that is included straight in the timely. This can be an easy function meaning or a module of a larger plan - any valid Python code. The model then generates code actions that call these tools.
Results from carrying out these actions feed back to the design as follow-up messages, driving the next actions up until a last response is reached. The agent structure is an easy iterative coding loop that mediates the discussion in between the design and its environment.
Conversations
DeepSeek-R1 is utilized as chat model in my experiment, where the design autonomously pulls additional context from its environment by using tools e.g. by using an online search engine or fetching data from web pages. This drives the conversation with the environment that continues till a last response is reached.
In contrast, o1 models are understood to perform improperly when utilized as chat designs i.e. they don't attempt to pull context during a discussion. According to the linked short article, o1 designs perform best when they have the full context available, with clear guidelines on what to do with it.
Initially, I likewise tried a complete context in a single timely technique at each action (with arise from previous steps included), but this resulted in substantially lower ratings on the GAIA subset. Switching to the conversational method explained above, I was able to reach the reported 65.6% performance.
This raises a fascinating question about the claim that o1 isn't a chat design - maybe this observation was more relevant to older o1 designs that lacked tool use abilities? After all, isn't tool usage support an essential system for making it possible for designs to pull additional context from their environment? This conversational approach certainly seems efficient for DeepSeek-R1, though I still need to carry out comparable explores o1 models.
Generalization
Although DeepSeek-R1 was mainly trained with RL on mathematics and wiki.whenparked.com coding tasks, it is amazing that generalization to agentic tasks with tool usage by means of code actions works so well. This capability to generalize to agentic tasks advises of recent research study by DeepMind that reveals that RL generalizes whereas SFT remembers, although generalization to tool use wasn't investigated in that work.
Despite its ability to generalize to tool use, DeepSeek-R1 frequently produces extremely long reasoning traces at each step, compared to other models in my experiments, restricting the effectiveness of this design in a single-agent setup. Even easier jobs in some cases take a long period of time to finish. Further RL on agentic tool use, be it via code actions or not, might be one choice to enhance efficiency.
Underthinking
I also observed the underthinking phenomon with DeepSeek-R1. This is when a thinking design often changes in between various reasoning ideas without sufficiently exploring appealing paths to reach an appropriate solution. This was a significant reason for extremely long reasoning traces produced by DeepSeek-R1. This can be seen in the tape-recorded traces that are available for download.
Future experiments
Another typical application of thinking designs is to utilize them for preparing only, while utilizing other models for producing code actions. This could be a prospective new feature of freeact, if this separation of roles proves beneficial for more complex tasks.
I'm likewise curious about how thinking models that currently support tool use (like o1, o3, ...) carry out in a single-agent setup, with and without creating code actions. Recent developments like OpenAI's Deep Research or Hugging Face's open-source Deep Research, which likewise utilizes code actions, look interesting.
1
Exploring DeepSeek R1's Agentic Capabilities Through Code Actions
Adell Crawley edited this page 3 months ago