Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
I ran a quick experiment investigating how DeepSeek-R1 carries out on agentic tasks, in spite of not supporting tool usage natively, and I was quite satisfied by initial results. This experiment runs DeepSeek-R1 in a single-agent setup, where the model not only prepares the actions but also develops the actions as executable Python code. On a subset1 of the GAIA recognition split, timeoftheworld.date DeepSeek-R1 exceeds Claude 3.5 Sonnet by 12.5% outright, from 53.1% to 65.6% right, and other designs by an even larger margin:
The experiment followed design use standards from the DeepSeek-R1 paper and the model card: Don't utilize few-shot examples, avoid adding a system timely, and set the temperature to 0.5 - 0.7 (0.6 was utilized). You can discover further examination details here.
Approach
DeepSeek-R1's strong coding capabilities allow it to act as a representative without being clearly trained for tool use. By enabling the design 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 prompt. This can be a simple function definition or a module of a bigger bundle - any valid Python code. The design then creates code actions that call these tools.
Arise 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 an easy iterative coding loop that moderates the conversation between the model and its environment.
Conversations
DeepSeek-R1 is utilized as chat model in my experiment, where the design autonomously pulls additional context from its environment by utilizing tools e.g. by utilizing a 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 designs are known to carry out improperly when utilized as chat designs i.e. they do not attempt to pull context during a conversation. According to the linked article, o1 designs carry out best when they have the complete context available, forum.batman.gainedge.org with clear directions on what to do with it.
Initially, I also tried a complete context in a single timely technique at each step (with arise from previous steps included), but this led to significantly lower ratings on the GAIA subset. Switching to the conversational technique explained above, I had the ability 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 pertinent to older o1 designs that did not have tool usage capabilities? After all, isn't tool use support a crucial mechanism for making it possible for designs to context from their environment? This conversational approach certainly seems reliable for larsaluarna.se DeepSeek-R1, though I still require to conduct similar explores o1 models.
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 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 use wasn't investigated in that work.
Despite its ability to generalize to tool usage, DeepSeek-R1 often produces long reasoning traces at each action, compared to other models in my experiments, restricting the usefulness of this design in a single-agent setup. Even simpler jobs often take a long time to complete. Further RL on agentic tool use, be it by means of code actions or larsaluarna.se not, might be one choice to improve efficiency.
Underthinking
I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a thinking model regularly switches between different reasoning thoughts without adequately checking out appealing paths to reach a right solution. This was a significant factor galgbtqhistoryproject.org for extremely long reasoning traces produced by DeepSeek-R1. This can be seen in the recorded traces that are available for download.
Future experiments
Another typical application of thinking models is to utilize them for preparing only, while using other models for creating code actions. This might be a potential new function of freeact, if this separation of roles shows useful for disgaeawiki.info more complex tasks.
I'm likewise curious about how thinking designs that already support tool use (like o1, o3, ...) carry out in a single-agent setup, with and without creating code actions. Recent developments like OpenAI's Deep Research or Hugging Face's open-source Deep Research, humanlove.stream which also uses code actions, look intriguing.