I ran a quick experiment investigating how DeepSeek-R1 carries out on agentic jobs, despite not supporting tool usage natively, and I was rather amazed by preliminary outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not only prepares the actions however also creates the actions as executable Python code. On a subset1 of the GAIA validation split, wiki.dulovic.tech DeepSeek-R1 outshines 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 use guidelines from the DeepSeek-R1 paper and the model card: Don't utilize few-shot examples, prevent including a system timely, and set the temperature level to 0.5 - 0.7 (0.6 was used). You can find further evaluation details here.
Approach
DeepSeek-R1's strong coding abilities enable it to serve as an agent without being explicitly trained for tool usage. By allowing the model to create actions as Python code, it can flexibly interact with environments through code execution.
Tools are executed as Python code that is consisted of straight in the timely. This can be an easy function definition or a module of a larger package - any legitimate Python code. The design then generates code that call these tools.
Arise from performing these actions feed back to the design as follow-up messages, driving the next steps till a final answer is reached. The representative structure is an easy iterative coding loop that moderates the discussion between the model and its environment.
Conversations
DeepSeek-R1 is used as chat design in my experiment, where the model autonomously pulls extra context from its environment by using tools e.g. by utilizing an online search engine or bring information from websites. This drives the conversation with the environment that continues up until a final answer is reached.
In contrast, o1 models are known to carry out poorly when used as chat designs i.e. they do not attempt to pull context during a discussion. According to the connected post, o1 designs carry out best when they have the complete context available, with clear directions on what to do with it.
Initially, I also attempted a full context in a single prompt technique at each step (with outcomes from previous steps included), but this led to substantially lower scores on the GAIA subset. Switching to the conversational technique explained above, I was able to reach the reported 65.6% performance.
This raises an interesting question about the claim that o1 isn't a chat design - maybe this observation was more appropriate to older o1 designs that lacked tool usage capabilities? After all, isn't tool use support an important mechanism for enabling models to pull additional context from their environment? This conversational method certainly appears reliable for DeepSeek-R1, though I still require to perform comparable experiments with o1 models.
Generalization
Although DeepSeek-R1 was mainly trained with RL on mathematics and coding jobs, it is amazing that generalization to agentic tasks with tool usage via code actions works so well. This capability to generalize to agentic jobs advises of recent research study by DeepMind that shows that RL generalizes whereas SFT remembers, although generalization to tool usage wasn't investigated in that work.
Despite its ability to generalize to tool use, DeepSeek-R1 frequently produces long thinking traces at each step, compared to other designs in my experiments, limiting the effectiveness of this model in a single-agent setup. Even simpler jobs sometimes take a very long time to finish. Further RL on agentic tool use, be it through code actions or not, could be one option to enhance effectiveness.
Underthinking
I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a thinking design often switches between different reasoning ideas without sufficiently checking out appealing paths to reach a right solution. This was a major factor for excessively long thinking traces produced by DeepSeek-R1. This can be seen in the recorded traces that are available for download.
Future experiments
Another common application of thinking models is to utilize them for planning only, while utilizing other models for generating code actions. This might be a prospective brand-new feature of freeact, if this separation of functions shows beneficial for more complex jobs.
I'm also curious about how reasoning models that already support tool use (like o1, o3, ...) perform 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 intriguing.
1
Exploring DeepSeek R1's Agentic Capabilities Through Code Actions
Concetta Rayford edited this page 2 months ago