1 Exploring DeepSeek R1's Agentic Capabilities Through Code Actions
Abbey Imlay edited this page 2 months ago


I ran a fast experiment examining how DeepSeek-R1 carries out on agentic jobs, in spite of not supporting tool use natively, and I was rather amazed by initial outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not only prepares the actions but likewise develops the actions as executable Python code. On a subset1 of the GAIA validation split, DeepSeek-R1 outshines Claude 3.5 Sonnet by 12.5% absolute, from 53.1% to 65.6% proper, and other models by an even bigger margin:

The experiment followed design usage standards from the DeepSeek-R1 paper and the model card: wiki.fablabbcn.org Don't utilize few-shot examples, prevent adding a system prompt, and opentx.cz 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 act as a representative without being explicitly trained for tool usage. By allowing the model to create actions as Python code, it can flexibly connect with environments through code execution.

Tools are executed as Python code that is consisted of straight in the timely. This can be an easy function meaning or a module of a bigger package - any valid Python code. The model then produces code actions that call these tools.

Results from performing these actions feed back to the design as follow-up messages, driving the next actions until a last answer is reached. The agent framework is a basic iterative coding loop that moderates the conversation in between the model and its environment.

Conversations

DeepSeek-R1 is utilized as chat design in my experiment, where the design autonomously pulls additional 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 up until a last answer is reached.

On the other hand, o1 designs are known to perform inadequately when used as chat designs i.e. they don't try to pull context during a discussion. According to the connected article, o1 models carry out best when they have the complete context available, with clear instructions on what to do with it.

Initially, I also tried a full context in a single timely method at each action (with outcomes from previous actions consisted of), but this caused considerably lower scores on the . Switching to the conversational method explained above, I had the ability 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 essential system for making it possible for models to pull extra context from their environment? This conversational method certainly appears reliable for DeepSeek-R1, though I still need to conduct similar experiments with o1 models.

Generalization

Although DeepSeek-R1 was mainly trained with RL on math and coding tasks, lovewiki.faith it is amazing that generalization to agentic jobs with tool use by means of code actions works so well. This ability to generalize to agentic jobs advises of current research by DeepMind that reveals 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 often produces extremely long thinking traces at each action, compared to other designs in my experiments, restricting the usefulness of this model in a single-agent setup. Even easier jobs in some cases take a very long time to finish. Further RL on agentic tool use, akropolistravel.com be it via code actions or not, could be one choice to enhance effectiveness.

Underthinking

I also observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning model regularly changes between different thinking ideas without adequately exploring appealing courses to reach an appropriate service. This was a major factor for overly long thinking traces produced by DeepSeek-R1. This can be seen in the recorded traces that are available for download.

Future experiments

Another common application of reasoning designs is to utilize them for planning just, while using other designs for generating code actions. This might be a prospective brand-new function of freeact, if this separation of roles proves beneficial for akropolistravel.com more complex tasks.

I'm likewise curious about how thinking models that already support tool usage (like o1, o3, ...) carry out 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 utilizes code actions, look fascinating.