Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
I ran a fast experiment investigating how DeepSeek-R1 performs on agentic tasks, bybio.co despite not supporting tool usage natively, and rocksoff.org I was rather pleased by initial results. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not just prepares the actions however also creates 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% appropriate, and other designs by an even larger margin:
The experiment followed design usage standards from the DeepSeek-R1 paper and the model card: Don't use few-shot examples, avoid including a system timely, and set the temperature level to 0.5 - 0.7 (0.6 was used). You can find additional examination details here.
Approach
DeepSeek-R1's strong coding capabilities allow it to function as a representative without being clearly trained for tool use. By enabling the design to generate actions as Python code, it can flexibly connect with environments through code execution.
Tools are executed as Python code that is included straight in the timely. This can be a simple function definition or a module of a bigger bundle - any legitimate Python code. The model then generates code that call these tools.
Arise from executing these actions feed back to the model as follow-up messages, driving the next actions till a last answer is reached. The agent framework is a basic iterative coding loop that mediates the conversation between the design and 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 a search engine or bring information from websites. This drives the conversation with the environment that continues up until a last answer is reached.
In contrast, o1 models are known to carry out badly when used as chat designs i.e. they don't attempt to pull context during a discussion. According to the linked short article, asteroidsathome.net o1 designs carry out best when they have the full context available, with clear instructions on what to do with it.
Initially, I also attempted a full context in a single prompt technique at each step (with outcomes from previous actions consisted of), king-wifi.win however this caused significantly lower scores on the GAIA subset. Switching to the conversational approach explained above, I had the ability to reach the reported 65.6% efficiency.
This raises a fascinating question about the claim that o1 isn't a chat model - perhaps this observation was more relevant to older o1 designs that lacked tool use abilities? After all, isn't tool use support a crucial system for allowing models to pull additional context from their environment? This conversational method certainly appears reliable for DeepSeek-R1, though I still require to conduct similar explores o1 designs.
Generalization
Although DeepSeek-R1 was mainly trained with RL on math and coding jobs, it is amazing that generalization to agentic jobs with tool usage through code actions works so well. This capability to generalize to agentic tasks reminds of current research study by DeepMind that reveals that RL generalizes whereas SFT memorizes, although generalization to tool use wasn't examined in that work.
Despite its ability to generalize to tool use, DeepSeek-R1 frequently produces long thinking traces at each action, compared to other models in my experiments, limiting the effectiveness of this model in a single-agent setup. Even simpler tasks often take a very long time to finish. Further RL on agentic tool usage, sitiosecuador.com be it via code actions or not, could be one option to enhance performance.
Underthinking
I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a thinking model often switches in between different reasoning thoughts without adequately exploring promising paths to reach a right service. This was a major reason for excessively long thinking traces produced by DeepSeek-R1. This can be seen in the taped traces that are available for download.
Future experiments
Another common application of reasoning models is to use them for preparing only, while using other models for producing code actions. This might be a potential brand-new feature of freeact, if this separation of functions shows useful for more complex tasks.
I'm also curious about how reasoning models that currently support tool use (like o1, o3, ...) perform in a single-agent setup, with and without generating code actions. Recent advancements like OpenAI's Deep Research or Hugging Face's open-source Deep Research, which also uses code actions, look fascinating.