Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
I ran a quick experiment examining how DeepSeek-R1 carries out on agentic tasks, despite not supporting tool use natively, and I was quite impressed by preliminary outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the model not just plans the actions however also formulates 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% right, and other designs by an even larger margin:
The experiment followed model use standards from the DeepSeek-R1 paper and the model card: lovewiki.faith Don't utilize few-shot examples, prevent including a system timely, and set the temperature level to 0.5 - 0.7 (0.6 was used). You can discover more assessment details here.
Approach
DeepSeek-R1's strong coding capabilities enable it to act as an agent without being explicitly trained for tool usage. By allowing the design to generate actions as Python code, it can flexibly communicate with environments through code execution.
Tools are carried out as Python code that is consisted of straight in the prompt. This can be a basic function meaning or a module of a bigger bundle - any valid Python code. The design then produces code actions that call these tools.
Arise from executing these actions feed back to the design as follow-up messages, driving the next actions until a last answer is reached. The representative structure is a basic iterative coding loop that mediates the discussion in between the model and online-learning-initiative.org its environment.
Conversations
DeepSeek-R1 is utilized as chat design in my experiment, where the model autonomously pulls additional context from its environment by utilizing tools e.g. by utilizing an online search engine or bring data from web pages. This drives the discussion with the environment that continues until a final response is reached.
In contrast, o1 models are known to carry out poorly when used as chat designs i.e. they don't try to pull context during a discussion. According to the connected post, disgaeawiki.info o1 models perform best when they have the complete context available, with clear directions 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 actions included), however this led to substantially lower scores on the GAIA subset. Switching to the conversational technique explained above, I was able to reach the reported 65.6% efficiency.
This raises a fascinating concern about the claim that o1 isn't a chat design - maybe this observation was more appropriate to older o1 models that did not have tool usage capabilities? After all, isn't tool usage support an essential mechanism for allowing models to pull additional context from their environment? This conversational technique certainly appears reliable for passfun.awardspace.us DeepSeek-R1, though I still need to conduct comparable explores o1 designs.
Generalization
Although DeepSeek-R1 was mainly trained with RL on mathematics and coding jobs, it is exceptional that generalization to agentic tasks with tool use by means of code actions works so well. This capability to generalize to agentic tasks advises of current research study by DeepMind that reveals that RL generalizes whereas SFT remembers, although generalization to tool use wasn't examined because work.
Despite its capability to generalize to tool use, DeepSeek-R1 frequently produces long reasoning traces at each step, compared to other models in my experiments, limiting the usefulness of this model in a single-agent setup. Even simpler tasks often take a long period of time to finish. Further RL on usage, be it by means of code actions or not, might be one option to improve performance.
Underthinking
I also observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning model often switches in between different thinking ideas without adequately checking out promising paths to reach a proper option. This was a major reason for overly long thinking 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 designs is to utilize them for preparing only, while utilizing other models for creating code actions. This might be a prospective brand-new function of freeact, if this separation of functions shows beneficial for more complex tasks.
I'm likewise curious about how reasoning designs that currently support tool usage (like o1, o3, ...) perform in a single-agent setup, with and without producing code actions. Recent advancements like OpenAI's Deep Research or Hugging Face's open-source Deep Research, which likewise utilizes code actions, look intriguing.