Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
I ran a fast experiment examining how DeepSeek-R1 performs on agentic tasks, regardless of not supporting tool use natively, asteroidsathome.net and I was quite amazed by preliminary outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the model not only plans the actions but also formulates the actions as executable Python code. On a subset1 of the GAIA recognition split, DeepSeek-R1 outshines Claude 3.5 Sonnet by 12.5% outright, from 53.1% to 65.6% correct, and other designs by an even bigger margin:
The experiment followed model 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 to 0.5 - 0.7 (0.6 was used). You can discover further examination details here.
Approach
DeepSeek-R1's strong coding capabilities allow it to act as an agent without being explicitly trained for tool use. By permitting the design to produce actions as Python code, it can flexibly interact with environments through code execution.
Tools are carried out as Python code that is consisted of straight in the timely. This can be a basic function meaning or a module of a larger package - any valid Python code. The design then creates code actions that call these tools.
Arise from executing these actions feed back to the model as follow-up messages, driving the next actions up until a final answer is reached. The agent structure is a simple iterative coding loop that mediates the conversation in between the design and its environment.
Conversations
DeepSeek-R1 is as chat design in my experiment, where the design autonomously pulls extra context from its environment by using tools e.g. by utilizing an online search engine or bring information from web pages. This drives the discussion with the environment that continues until a final answer is reached.
On the other hand, o1 designs are understood to carry out improperly when utilized as chat designs i.e. they do not try to pull context throughout a discussion. According to the connected post, o1 designs carry out best when they have the full context available, with clear instructions on what to do with it.
Initially, I likewise attempted a complete context in a single timely technique at each action (with results from previous steps consisted of), but this led to substantially lower scores on the GAIA subset. Switching to the conversational method explained above, I was able to reach the reported 65.6% efficiency.
This raises an interesting concern about the claim that o1 isn't a chat model - maybe this observation was more appropriate to older o1 designs that did not have tool usage capabilities? After all, isn't tool use support a crucial system for allowing models to pull additional context from their environment? This conversational method certainly appears efficient for DeepSeek-R1, though I still require to perform comparable experiments with o1 models.
Generalization
Although DeepSeek-R1 was mainly trained with RL on math 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 current research by DeepMind that reveals that RL generalizes whereas SFT remembers, although generalization to tool usage wasn't examined in that work.
Despite its ability to generalize to tool usage, DeepSeek-R1 often produces long reasoning 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 long time to complete. Further RL on agentic tool use, be it through code actions or photorum.eclat-mauve.fr not, might be one alternative to enhance effectiveness.
Underthinking
I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a thinking model often changes in between different thinking ideas without sufficiently exploring promising courses to reach an appropriate solution. 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 typical application of reasoning designs is to utilize them for preparing just, while using other models for generating code actions. This could be a potential brand-new function of freeact, if this separation of functions proves beneficial for elearnportal.science more complex jobs.
I'm also curious about how thinking designs that currently support tool usage (like o1, disgaeawiki.info o3, ...) perform in a single-agent setup, with and without generating code actions. Recent developments like OpenAI's Deep Research or Hugging Face's open-source Deep Research, which also uses code actions, look fascinating.