Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions

Comments · 57 Views

I ran a fast experiment examining how DeepSeek-R1 carries out on agentic tasks, despite not supporting tool usage natively, and I was rather amazed by initial outcomes.

I ran a quick experiment investigating how DeepSeek-R1 performs on agentic tasks, regardless of not supporting tool use natively, and I was quite pleased by preliminary outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not just plans the actions however likewise creates the actions as executable Python code. On a subset1 of the GAIA recognition split, DeepSeek-R1 outperforms Claude 3.5 Sonnet by 12.5% outright, from 53.1% to 65.6% correct, and other models by an even larger margin:


The experiment followed design use guidelines from the DeepSeek-R1 paper and the design card: Don't utilize few-shot examples, avoid including a system timely, and wakewiki.de set the temperature level to 0.5 - 0.7 (0.6 was utilized). You can discover additional examination details here.


Approach


DeepSeek-R1's strong coding abilities enable it to act as a representative without being clearly trained for tool use. By permitting the model to generate actions as Python code, it can flexibly engage with environments through code execution.


Tools are carried out as Python code that is included straight in the prompt. This can be an easy function definition or a module of a larger bundle - any legitimate Python code. The design then produces code actions that call these tools.


Results from performing these actions feed back to the model as follow-up messages, driving the next steps up until a last answer is reached. The representative structure is a simple 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, opensourcebridge.science where the design autonomously pulls additional context from its environment by utilizing tools e.g. by utilizing a search engine or fetching data from websites. This drives the discussion with the environment that continues till a final answer is reached.


On the other hand, o1 models are understood to perform badly when utilized as chat models i.e. they don't try to pull context throughout a discussion. According to the linked post, o1 models perform best when they have the complete context available, with clear directions on what to do with it.


Initially, I likewise attempted a complete context in a single prompt approach at each step (with arise from previous steps consisted of), however this resulted in substantially lower ratings on the GAIA subset. Switching to the conversational approach explained above, asteroidsathome.net I had the ability to reach the reported 65.6% efficiency.


This raises an interesting question about the claim that o1 isn't a chat design - perhaps this observation was more pertinent to older o1 designs that did not have tool usage abilities? After all, isn't tool usage support an important system for allowing models to pull extra context from their environment? This conversational method certainly seems reliable for DeepSeek-R1, though I still need to perform comparable experiments with o1 models.


Generalization


Although DeepSeek-R1 was mainly trained with RL on mathematics and coding jobs, it is exceptional that generalization to agentic tasks with tool use by means of code actions works so well. This capability to generalize to agentic tasks reminds of current research by DeepMind that reveals that RL generalizes whereas SFT memorizes, although generalization to tool use wasn't investigated because work.


Despite its capability to generalize to tool usage, DeepSeek-R1 typically produces very long reasoning traces at each action, compared to other models in my experiments, limiting the effectiveness of this design in a single-agent setup. Even easier jobs sometimes take a very long time to finish. Further RL on agentic tool use, be it via code actions or not, might be one alternative to enhance performance.


Underthinking


I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning model often changes in between different thinking thoughts without adequately checking out promising courses to reach a proper service. This was a significant reason for excessively long thinking traces produced by DeepSeek-R1. This can be seen in the taped traces that are available for download.


Future experiments


Another common application of reasoning designs is to utilize them for planning only, while utilizing other designs for creating code actions. This might be a possible new function of freeact, if this separation of functions shows useful for more complex tasks.


I'm also curious about how thinking models that already support tool usage (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 uses code actions, look fascinating.

Comments