Exploring DeepSeek R1's Agentic Capabilities Through Code Actions
andrealeary29 a édité cette page il y a 6 mois


I ran a fast experiment examining how DeepSeek-R1 carries out on agentic tasks, in spite of not supporting tool usage natively, and I was rather impressed by initial results. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not just prepares the actions however likewise formulates the actions as executable Python code. On a subset1 of the GAIA validation split, DeepSeek-R1 outperforms Claude 3.5 Sonnet by 12.5% absolute, from 53.1% to 65.6% proper, and other models by an even larger margin:

The followed design use standards from the DeepSeek-R1 paper and the design card: Don’t utilize few-shot examples, prevent adding a system timely, and set the temperature to 0.5 - 0.7 (0.6 was used). You can find further evaluation details here.

Approach

DeepSeek-R1’s strong coding abilities enable it to function as an agent without being explicitly trained for bytes-the-dust.com tool use. By allowing the design to generate actions as Python code, it can flexibly interact with environments through code execution.

Tools are implemented as Python code that is included straight in the timely. This can be a simple function meaning or a module of a bigger package - any valid Python code. The model then creates code actions that call these tools.

Results from executing these actions feed back to the design as follow-up messages, driving the next actions up until a last response is reached. The agent structure is a basic iterative coding loop that moderates the conversation 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 using a search engine or fetching information from websites. This drives the discussion with the environment that continues until a final answer is reached.

On the other hand, o1 designs are known to carry out badly when utilized as chat models i.e. they don’t attempt to pull context throughout a discussion. According to the connected article, o1 models perform best when they have the full context available, with clear guidelines on what to do with it.

Initially, I likewise tried a full context in a single timely approach at each action (with arise from previous steps included), but this resulted in substantially lower scores on the GAIA subset. Switching to the conversational method explained above, I had the ability to reach the reported 65.6% efficiency.

This raises an intriguing question about the claim that o1 isn’t a chat design - possibly this observation was more pertinent to older o1 models that did not have tool usage capabilities? After all, isn’t tool use support an important system for enabling designs to pull additional context from their environment? This conversational method certainly seems efficient for DeepSeek-R1, though I still require to carry out similar explores o1 designs.

Generalization

Although DeepSeek-R1 was mainly trained with RL on math and coding tasks, it is amazing that generalization to agentic jobs with tool use through code actions works so well. This capability to generalize to agentic jobs advises of recent research by DeepMind that shows 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 frequently produces long reasoning traces at each step, compared to other models in my experiments, limiting the effectiveness of this model in a single-agent setup. Even simpler jobs sometimes take a long period of 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 thinking model often changes between different reasoning ideas without sufficiently exploring appealing courses to reach a proper option. This was a significant factor for overly 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 thinking designs is to use them for planning just, asteroidsathome.net while using other designs for creating code actions. This might be a possible brand-new feature of freeact, if this separation of functions proves helpful for more complex tasks.

I’m likewise curious about how thinking models that currently support tool usage (like o1, o3, …) perform in a single-agent setup, with and without producing code actions. Recent developments like OpenAI’s Deep Research or Hugging Face’s open-source Deep Research, which likewise uses code actions, look interesting.