1 Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
Adam Roussel edited this page 2025-02-12 16:40:24 +00:00


I ran a quick experiment investigating how DeepSeek-R1 performs on agentic jobs, regardless of not supporting tool use natively, and I was rather pleased by preliminary outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not just plans the actions but also creates the actions as executable Python code. On a subset1 of the GAIA validation split, systemcheck-wiki.de DeepSeek-R1 exceeds Claude 3.5 Sonnet by 12.5% outright, from 53.1% to 65.6% right, and other models by an even bigger margin:

The experiment followed model usage guidelines from the DeepSeek-R1 paper and systemcheck-wiki.de the design card: lespoetesbizarres.free.fr Don't use few-shot examples, prevent adding a system prompt, and 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 capabilities allow it to serve as an agent without being clearly trained for iuridictum.pecina.cz tool use. By allowing the design to create actions as Python code, it can flexibly engage with environments through code execution.

Tools are carried out as Python code that is consisted of straight in the timely. This can be an easy function definition or a module of a larger plan - any valid Python code. The design then generates code actions that call these tools.

Arise from performing these actions feed back to the model as follow-up messages, driving the next steps till a last answer is reached. The representative framework is a basic iterative coding loop that moderates the conversation in between the design and its environment.

Conversations

DeepSeek-R1 is used as chat model in my experiment, where the design autonomously pulls extra context from its environment by utilizing tools e.g. by utilizing an online search engine or fetching data from web pages. This drives the discussion with the environment that continues till a final answer is reached.

In contrast, o1 models are understood to carry out improperly when utilized as chat models i.e. they do not try to pull context during a discussion. According to the connected short article, o1 models carry out best when they have the complete context available, with clear instructions on what to do with it.

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

This raises a fascinating question about the claim that o1 isn't a chat design - possibly this observation was more relevant to older o1 designs that lacked tool use abilities? After all, isn't tool usage support a crucial mechanism for making it possible for models to pull additional context from their environment? This conversational technique certainly seems effective for DeepSeek-R1, though I still need to carry out comparable try outs o1 designs.

Generalization

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

Despite its ability to generalize to tool usage, DeepSeek-R1 typically produces long thinking traces at each step, compared to other designs in my experiments, restricting the usefulness 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 use, be it through code actions or not, could be one alternative to enhance performance.

Underthinking

I also observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning design frequently switches between different thinking thoughts without adequately exploring promising courses to reach a right option. This was a major reason for extremely long thinking 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 designs is to use them for planning just, while using other models for creating code actions. This might be a prospective new feature of freeact, if this separation of roles shows useful for more complex tasks.

I'm likewise curious about how reasoning designs that currently support tool usage (like o1, o3, ...) carry out in a single-agent setup, wiki.armello.com 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 intriguing.