Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions

Comments · 5 Views

I ran a fast experiment investigating how DeepSeek-R1 carries out on agentic tasks, regardless of not supporting tool use natively, and I was quite pleased by preliminary outcomes.

I ran a quick experiment examining how DeepSeek-R1 performs on agentic tasks, despite not supporting tool usage natively, and I was quite satisfied by initial outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the model not just plans the actions but also develops the actions as executable Python code. On a subset1 of the GAIA validation split, DeepSeek-R1 surpasses Claude 3.5 Sonnet by 12.5% absolute, from 53.1% to 65.6% proper, and other designs by an even bigger margin:


The experiment followed model usage guidelines from the DeepSeek-R1 paper and the design card: Don't use few-shot examples, avoid adding a system prompt, and set the temperature to 0.5 - 0.7 (0.6 was utilized). You can discover more examination details here.


Approach


DeepSeek-R1's strong coding abilities allow it to act as an agent without being explicitly trained for tool use. By allowing the design to produce actions as Python code, it can flexibly connect with environments through code execution.


Tools are executed as Python code that is consisted of straight in the prompt. This can be a basic function meaning or a module of a bigger plan - any legitimate Python code. The model then produces code actions that call these tools.


Results from executing these actions feed back to the design as follow-up messages, driving the next steps till a last answer is reached. The agent structure is a simple iterative coding loop that mediates the discussion between the model and its environment.


Conversations


DeepSeek-R1 is utilized as chat design in my experiment, forum.kepri.bawaslu.go.id where the design autonomously pulls extra context from its environment by utilizing tools e.g. by using an online search engine or fetching data from websites. This drives the conversation with the environment that continues until a last answer is reached.


On the other hand, o1 models are understood to perform poorly when utilized as chat designs i.e. they do not attempt to pull context throughout a conversation. According to the connected short article, o1 models carry out best when they have the full context available, grandtribunal.org with clear directions on what to do with it.


Initially, I also attempted a full context in a single prompt method at each step (with arise from previous steps included), however this caused significantly lower ratings on the GAIA subset. Switching to the conversational technique explained above, I was able to reach the reported 65.6% efficiency.


This raises an interesting question about the claim that o1 isn't a chat design - possibly this observation was more relevant to older o1 models that did not have tool usage capabilities? After all, isn't tool usage support an important mechanism for allowing models to pull additional context from their environment? This conversational technique certainly seems 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 raovatonline.org coding tasks, it is impressive that generalization to agentic jobs with tool use through 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 remembers, although generalization to tool use wasn't examined because work.


Despite its capability to generalize to tool use, DeepSeek-R1 frequently produces extremely long reasoning traces at each action, compared to other designs in my experiments, restricting the effectiveness of this model in a single-agent setup. Even simpler tasks in some cases take a long period of time to finish. Further RL on agentic tool use, opensourcebridge.science be it through code actions or not, might be one option to enhance efficiency.


Underthinking


I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning model regularly switches between various reasoning thoughts without adequately exploring promising paths to reach a proper service. This was a significant factor higgledy-piggledy.xyz for overly long reasoning traces produced by DeepSeek-R1. This can be seen in the tape-recorded traces that are available for download.


Future experiments


Another common application of reasoning models is to use them for preparing only, akropolistravel.com while utilizing other models for producing code actions. This could be a possible new function of freeact, if this separation of functions shows useful for more complex jobs.


I'm likewise curious about how thinking designs that currently support tool use (like o1, o3, ...) perform in a single-agent setup, with and without generating code actions. Recent advancements like OpenAI's Deep Research or Hugging Face's open-source Deep Research, which also utilizes code actions, timeoftheworld.date look fascinating.

Comments