1 Exploring DeepSeek R1's Agentic Capabilities Through Code Actions
Barry Steadman edited this page 1 year ago


I ran a fast experiment examining how DeepSeek-R1 performs on agentic tasks, despite not supporting tool usage natively, and I was rather pleased by initial outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not only plans the actions however also creates the actions as executable Python code. On a subset1 of the GAIA recognition split, DeepSeek-R1 outperforms Claude 3.5 Sonnet by 12.5% absolute, from 53.1% to 65.6% appropriate, and other models by an even bigger margin:

The experiment followed design use guidelines from the DeepSeek-R1 paper and fraternityofshadows.com the model card: Don't use few-shot examples, avoid adding a system timely, bytes-the-dust.com and set the temperature to 0.5 - 0.7 (0.6 was used). You can discover additional examination details here.

Approach

DeepSeek-R1's strong coding capabilities allow it to function as a representative without being explicitly trained for tool use. By permitting the design to create actions as Python code, it can flexibly interact with environments through code execution.

Tools are carried out as Python code that is included straight in the timely. This can be an easy function meaning or a module of a larger package - any legitimate Python code. The design 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 until 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 model in my experiment, wiki.whenparked.com where the design autonomously pulls extra context from its environment by using tools e.g. by utilizing a search engine or fetching information from web pages. This drives the conversation with the environment that continues until a last answer is reached.

On the other hand, o1 models are understood to perform inadequately when used as chat models i.e. they don't try to pull context throughout a conversation. According to the linked post, o1 models carry out best when they have the complete context available, with clear guidelines on what to do with it.

Initially, I likewise attempted a full context in a single timely approach at each action (with results from previous steps consisted of), however this led to considerably lower ratings on the GAIA subset. Switching to the conversational method explained above, I was able to reach the reported 65.6% efficiency.

This raises an intriguing concern about the claim that o1 isn't a chat model - perhaps this observation was more appropriate to older o1 models that did not have tool usage capabilities? After all, isn't tool usage support a crucial mechanism for enabling models to pull additional context from their environment? This conversational method certainly seems efficient for DeepSeek-R1, though I still require to carry out similar experiments with o1 models.

Generalization

Although DeepSeek-R1 was mainly trained with RL on mathematics and forum.altaycoins.com coding tasks, it is impressive that generalization to agentic jobs with tool use via code actions works so well. This ability to generalize to agentic jobs advises of recent research study by DeepMind that reveals that RL generalizes whereas SFT memorizes, although generalization to tool usage wasn't investigated in that work.

Despite its capability to generalize to tool usage, DeepSeek-R1 typically produces long thinking traces at each step, compared to other designs in my experiments, limiting the effectiveness of this design in a single-agent setup. Even simpler jobs sometimes take a long period of time to finish. Further RL on agentic tool usage, be it via code actions or not, could be one option to improve effectiveness.

Underthinking

I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning design frequently changes in between different reasoning thoughts without adequately checking out promising paths to reach a right solution. This was a significant reason 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 reasoning designs is to utilize them for planning just, while using other designs for generating code actions. This could be a prospective new function of freeact, if this separation of functions proves beneficial for more complex jobs.

I'm also curious about how reasoning models that currently support tool use (like o1, o3, ...) carry out in a single-agent setup, with and parentingliteracy.com without creating code actions. Recent developments like OpenAI's Deep Research or Hugging Deep Research, which also uses code actions, look intriguing.