1 Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
rory84q3078626 edited this page 2025-02-12 16:16:25 +08:00


I ran a quick experiment investigating how DeepSeek-R1 performs on agentic jobs, despite 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 design not just plans the actions however likewise develops the actions as executable Python code. On a subset1 of the GAIA recognition split, DeepSeek-R1 surpasses Claude 3.5 Sonnet by 12.5% absolute, from 53.1% to 65.6% appropriate, and other models by an even larger margin:

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

Approach

DeepSeek-R1's strong coding capabilities allow it to serve as a representative without being clearly trained for tool usage. By allowing the model to generate actions as Python code, it can flexibly engage with environments through code execution.

Tools are executed as Python code that is consisted of straight in the prompt. This can be an easy function meaning or a module of a larger plan - any valid Python code. The design then creates code actions that call these tools.

Results from executing these actions feed back to the model as follow-up messages, driving the next actions up until a final response is reached. The agent structure is an easy iterative coding loop that mediates the discussion between the design and its environment.

Conversations

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

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

Initially, I also tried a complete context in a single prompt method at each action (with arise from previous actions included), but this resulted in significantly lower ratings on the GAIA subset. Switching to the conversational technique explained above, I was able to reach the reported 65.6% performance.

This raises an interesting question about the claim that o1 isn't a chat design - perhaps this observation was more appropriate to older o1 models that did not have tool use capabilities? After all, isn't tool usage support an important mechanism for enabling designs to pull extra context from their environment? This conversational method certainly seems reliable for DeepSeek-R1, though I still need to carry out similar explores o1 designs.

Generalization

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

Despite its capability to generalize to tool use, DeepSeek-R1 frequently produces extremely long thinking traces at each action, compared to other designs in my experiments, limiting the effectiveness of this model in a single-agent setup. Even easier tasks often take a long time to complete. Further RL on agentic tool usage, be it by means of code actions or not, could 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 sufficiently exploring promising courses to reach a correct service. This was a significant factor for excessively long thinking traces produced by DeepSeek-R1. This can be seen in the tape-recorded traces that are available for download.

Future experiments

Another typical application of thinking designs is to utilize them for preparing just, galgbtqhistoryproject.org while using other models for generating code actions. This might be a potential brand-new feature of freeact, if this separation of functions proves useful for more complex tasks.

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