Clone
1
Exploring DeepSeek R1's Agentic Capabilities Through Code Actions
Alba Anthony edited this page 2025-02-10 04:45:05 +01:00


I ran a fast experiment investigating how DeepSeek-R1 performs on agentic tasks, regardless of not supporting tool use natively, and I was quite amazed by preliminary results. This experiment runs DeepSeek-R1 in a single-agent setup, where the model not just plans the actions however 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% outright, from 53.1% to 65.6% appropriate, and other models by an even bigger margin:

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

Approach

DeepSeek-R1's strong coding capabilities enable it to function as a representative without being explicitly trained for tool use. By enabling the model to create 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 prompt. This can be an easy function meaning or a module of a larger bundle - any valid Python code. The model then produces code actions that call these tools.

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

Conversations

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

On the other hand, securityholes.science o1 designs are understood to carry out inadequately when utilized as chat designs i.e. they don't attempt to pull context during a conversation. According to the linked post, o1 models carry out best when they have the full context available, with clear guidelines on what to do with it.

Initially, I also tried a full context in a single timely approach at each action (with arise from previous steps consisted of), however this resulted in substantially lower scores on the GAIA subset. Switching to the conversational technique explained above, I had the ability to reach the reported 65.6% performance.

This raises an intriguing question about the claim that o1 isn't a chat model - maybe this observation was more relevant to older o1 models that did not have tool usage capabilities? After all, isn't tool use support an essential system for making it possible for models to pull additional context from their environment? This conversational approach certainly seems efficient for DeepSeek-R1, though I still require to carry out comparable explores o1 designs.

Generalization

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

Despite its capability to generalize to tool use, engel-und-waisen.de DeepSeek-R1 often produces really long reasoning traces at each step, compared to other models in my experiments, restricting the usefulness of this model in a single-agent setup. Even easier jobs often take a very long time to finish. Further RL on agentic tool usage, be it by means of code actions or hb9lc.org not, tandme.co.uk might be one choice to improve efficiency.

Underthinking

I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a thinking design frequently changes in between various thinking ideas without sufficiently checking out promising paths to reach a proper service. This was a major factor for gratisafhalen.be excessively long reasoning traces produced by DeepSeek-R1. This can be seen in the taped traces that are available for download.

Future experiments

Another typical application of reasoning models is to use them for preparing just, while utilizing other designs for creating code actions. This might be a prospective brand-new feature of freeact, if this separation of roles shows beneficial for more complex jobs.

I'm likewise curious about how reasoning models that currently support tool use (like o1, o3, ...) perform in a single-agent setup, with and yogicentral.science without actions. Recent advancements like OpenAI's Deep Research or Hugging Face's open-source Deep Research, which also uses code actions, look interesting.