Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
I ran a quick experiment examining how DeepSeek-R1 carries out on agentic jobs, in spite of not supporting tool usage natively, and I was quite satisfied by preliminary results. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not just plans the actions however likewise develops the actions as executable Python code. On a subset1 of the GAIA validation split, DeepSeek-R1 surpasses Claude 3.5 Sonnet by 12.5% absolute, from 53.1% to 65.6% right, and other models by an even bigger margin:
The experiment followed model use standards from the DeepSeek-R1 paper and imoodle.win the design card: Don't use few-shot examples, avoid adding a system prompt, and set the temperature level to 0.5 - 0.7 (0.6 was utilized). You can discover additional assessment details here.
Approach
DeepSeek-R1's strong coding capabilities enable it to serve as a representative without being clearly trained for setiathome.berkeley.edu tool use. By allowing the design to create actions as Python code, it can flexibly connect with environments through code execution.
Tools are carried out as Python code that is included straight in the timely. This can be an easy function meaning or a module of a - any legitimate Python code. The design then generates code actions that call these tools.
Arise from performing these actions feed back to the model as follow-up messages, driving the next actions up until a final response is reached. The representative structure is a basic iterative coding loop that mediates the conversation in between the model 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 using tools e.g. by utilizing a search engine or bring information from websites. This drives the discussion with the environment that continues until a final response is reached.
On the other hand, o1 models are understood to perform poorly when utilized as chat designs i.e. they don't try to pull context during a discussion. According to the linked post, o1 models carry out best when they have the full context available, with clear guidelines on what to do with it.
Initially, I also tried a complete context in a single timely approach at each step (with arise from previous actions included), however this resulted in substantially lower ratings on the GAIA subset. Switching to the conversational technique explained above, I was able to reach the reported 65.6% performance.
This raises a fascinating concern about the claim that o1 isn't a chat design - possibly this observation was more appropriate to older o1 designs that did not have tool use abilities? After all, isn't tool use support a crucial system for allowing models to pull extra context from their environment? This conversational method certainly seems effective for DeepSeek-R1, though I still require to conduct similar explores o1 models.
Generalization
Although DeepSeek-R1 was mainly trained with RL on math and coding jobs, it is impressive that generalization to agentic jobs with tool usage by means of code actions works so well. This capability to generalize to agentic tasks advises of recent research by DeepMind that reveals that RL generalizes whereas SFT memorizes, although generalization to tool usage wasn't investigated in that work.
Despite its ability to generalize to tool usage, DeepSeek-R1 frequently produces really long reasoning traces at each action, annunciogratis.net compared to other designs in my experiments, restricting the usefulness of this design in a single-agent setup. Even simpler jobs sometimes take a long period of time to finish. Further RL on agentic tool usage, be it through code actions or not, systemcheck-wiki.de might be one choice to enhance efficiency.
Underthinking
I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning design regularly changes between various thinking thoughts without adequately exploring promising paths to reach a proper service. This was a significant factor 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 common application of thinking designs is to use them for planning only, while using other models for producing code actions. This might be a potential new function of freeact, if this separation of functions proves helpful for more complex tasks.
I'm likewise curious about how thinking models that already support tool use (like o1, o3, ...) carry out 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.