Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
cecilgwynne12 редактировал эту страницу 5 дней назад


I ran a fast experiment investigating how DeepSeek-R1 performs on agentic jobs, in spite of not supporting tool use natively, and I was quite impressed by initial results. This experiment runs DeepSeek-R1 in a single-agent setup, where the model not only plans the actions however also develops the actions as executable Python code. On a subset1 of the GAIA validation split, DeepSeek-R1 exceeds Claude 3.5 Sonnet by 12.5% absolute, from 53.1% to 65.6% correct, and other models by an even bigger margin:

The experiment followed model use standards from the DeepSeek-R1 paper and the model card: Don't use few-shot examples, avoid including a system prompt, and set the temperature level to 0.5 - 0.7 (0.6 was utilized). You can find further examination details here.

Approach

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

Tools are executed as Python code that is in the prompt. This can be a basic function definition or a module of a bigger bundle - any valid Python code. The model 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 steps till a last response is reached. The representative framework is an easy iterative coding loop that moderates the discussion in between the design and its environment.

Conversations

DeepSeek-R1 is utilized as chat design in my experiment, where the model autonomously pulls extra 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 last response is reached.

On the other hand, o1 designs are understood to carry out badly when utilized as chat models i.e. they do not try to pull context during a discussion. According to the linked short article, o1 models carry out best when they have the complete context available, with clear guidelines on what to do with it.

Initially, I also attempted a complete context in a single prompt technique at each action (with arise from previous actions consisted of), but this led to substantially lower ratings on the GAIA subset. Switching to the conversational method explained above, I had the ability to reach the reported 65.6% performance.

This raises an interesting concern about the claim that o1 isn't a chat model - maybe this observation was more relevant to older o1 designs that lacked tool usage capabilities? After all, isn't tool usage support an essential mechanism for enabling models to pull extra context from their environment? This conversational technique certainly seems reliable for DeepSeek-R1, though I still need to conduct similar explores o1 designs.

Generalization

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

Despite its ability to generalize to tool use, DeepSeek-R1 typically produces very long reasoning traces at each step, compared to other designs in my experiments, restricting the effectiveness of this design 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, wiki.vst.hs-furtwangen.de be it through code actions or not, might be one alternative to improve performance.

Underthinking

I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a thinking model regularly switches in between various reasoning thoughts without sufficiently checking out appealing paths to reach an appropriate solution. This was a significant reason for overly 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 models is to utilize them for planning just, while utilizing other designs for creating code actions. This might be a possible brand-new function of freeact, if this separation of roles proves beneficial for more complex tasks.

I'm also curious about how thinking designs that already support tool use (like o1, 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 interesting.