Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
I ran a fast experiment examining how DeepSeek-R1 performs on agentic tasks, in spite of not supporting tool usage natively, and I was rather pleased by initial results. This experiment runs DeepSeek-R1 in a single-agent setup, classihub.in where the design not only plans the actions but also creates the actions as executable Python code. On a subset1 of the GAIA recognition split, online-learning-initiative.org DeepSeek-R1 exceeds Claude 3.5 Sonnet by 12.5% absolute, from 53.1% to 65.6% correct, 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 use few-shot examples, avoid adding a system timely, and set the temperature to 0.5 - 0.7 (0.6 was used). You can find additional assessment details here.
Approach
DeepSeek-R1's strong coding capabilities enable it to function as an agent without being clearly trained for tool usage. By allowing the design to produce 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 timely. This can be a simple function meaning or a module of a bigger plan - any legitimate Python code. The model then generates code actions that call these tools.
Results from carrying out these actions feed back to the model as follow-up messages, driving the next actions till a final answer is reached. The representative framework 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 extra context from its environment by utilizing tools e.g. by utilizing a search engine or fetching data from web pages. This drives the conversation with the environment that continues till a final response is reached.
In contrast, o1 models are understood to carry out poorly when utilized as chat designs i.e. they do not try to pull context during a discussion. According to the linked post, o1 designs perform best when they have the complete context available, with clear instructions on what to do with it.
Initially, I likewise attempted a full context in a single timely technique at each step (with results from previous steps consisted of), however this led to significantly lower scores on the GAIA subset. 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 model - maybe this observation was more appropriate to older o1 models that did not have tool usage abilities? After all, isn't tool use support an essential system for enabling models to pull additional context from their environment? This conversational method certainly appears reliable for DeepSeek-R1, though I still need to conduct similar explores o1 designs.
Generalization
Although DeepSeek-R1 was mainly trained with RL on mathematics and coding jobs, it is impressive that generalization to agentic jobs with tool use through code actions works so well. This ability to generalize to agentic tasks reminds of current research by DeepMind that reveals that RL generalizes whereas SFT memorizes, although generalization to tool usage wasn't examined because work.
Despite its capability to generalize to tool usage, DeepSeek-R1 frequently produces very long thinking traces at each step, compared to other models in my experiments, limiting the of this model in a single-agent setup. Even simpler jobs in some cases take a long period of time to finish. Further RL on agentic tool use, be it via code actions or not, might be one option to enhance effectiveness.
Underthinking
I also observed the underthinking phenomon with DeepSeek-R1. This is when a thinking design frequently changes in between different reasoning ideas without sufficiently checking out promising paths to reach an appropriate solution. This was a major reason for extremely long reasoning traces produced by DeepSeek-R1. This can be seen in the tape-recorded traces that are available for download.
Future experiments
Another common application of thinking designs is to use them for preparing only, while using other designs for generating code actions. This could be a prospective brand-new feature of freeact, if this separation of functions proves beneficial for opentx.cz more complex jobs.
I'm likewise curious about how thinking models that already support tool use (like o1, o3, ...) carry out in a single-agent setup, library.kemu.ac.ke with and without generating code actions. Recent developments like OpenAI's Deep Research or Hugging Face's open-source Deep Research, which also uses code actions, look fascinating.