Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
I ran a quick experiment investigating how DeepSeek-R1 performs on agentic jobs, regardless of not supporting tool usage natively, and I was quite satisfied by preliminary outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not just plans the actions however likewise develops the actions as executable Python code. On a subset1 of the GAIA validation split, 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 lespoetesbizarres.free.fr the design card: Don't utilize few-shot examples, avoid adding a system prompt, and set the temperature to 0.5 - 0.7 (0.6 was used). You can discover more assessment details here.
Approach
DeepSeek-R1's strong coding capabilities enable it to function as an agent without being explicitly trained for tool use. By permitting the design to generate 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 prompt. This can be an easy function definition or a module of a bigger plan - any legitimate Python code. The model then produces code actions that call these tools.
Results from performing these actions feed back to the design as follow-up messages, driving the next steps up until a final response is reached. The agent framework is a simple iterative coding loop that moderates the conversation between the design and its environment.
Conversations
DeepSeek-R1 is used as chat design in my experiment, where the design autonomously pulls extra context from its environment by utilizing tools e.g. by using a or bring information from web pages. This drives the discussion with the environment that continues up until a last answer is reached.
On the other hand, o1 designs are understood to perform poorly when used as chat designs i.e. they don't try to pull context during a conversation. According to the connected article, o1 models perform best when they have the complete context available, with clear directions on what to do with it.
Initially, I likewise tried a complete context in a single timely approach at each step (with arise from previous steps included), but this resulted in substantially lower scores on the GAIA subset. Switching to the conversational technique explained above, I had the ability to reach the reported 65.6% performance.
This raises an interesting question about the claim that o1 isn't a chat model - maybe this observation was more relevant to older o1 designs that did not have tool usage capabilities? After all, isn't tool use support an essential system for enabling designs to pull extra context from their environment? This conversational method certainly appears efficient for DeepSeek-R1, though I still need to carry out comparable try outs o1 models.
Generalization
Although DeepSeek-R1 was mainly trained with RL on mathematics and coding tasks, it is remarkable that generalization to agentic tasks with tool use by means of code actions works so well. This capability to generalize to agentic jobs advises of recent research study by DeepMind that reveals that RL generalizes whereas SFT remembers, videochatforum.ro although generalization to tool use wasn't examined because work.
Despite its capability to generalize to tool usage, DeepSeek-R1 typically produces extremely long thinking traces at each action, compared to other models in my experiments, limiting the effectiveness of this model in a single-agent setup. Even simpler tasks often take a long period of time to finish. Further RL on agentic tool use, be it via code actions or not, might be one alternative to enhance efficiency.
Underthinking
I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning model regularly switches between different thinking ideas without sufficiently exploring promising paths to reach an appropriate service. This was a major factor for excessively long reasoning traces produced by DeepSeek-R1. This can be seen in the taped traces that are available for download.
Future experiments
Another common application of thinking designs is to utilize them for preparing only, while utilizing other designs for producing code actions. This could be a possible brand-new feature of freeact, if this separation of roles shows beneficial for more complex jobs.
I'm also curious about how thinking models that already support tool usage (like o1, o3, ...) perform in a single-agent setup, with and without producing code actions. Recent advancements like OpenAI's Deep Research or Hugging Face's open-source Deep Research, which also uses code actions, look fascinating.