Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
I ran a fast experiment investigating how DeepSeek-R1 carries out on agentic jobs, despite not supporting tool usage natively, and I was rather pleased by initial results. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not only prepares the actions but also formulates the actions as executable Python code. On a subset1 of the GAIA validation split, DeepSeek-R1 exceeds Claude 3.5 Sonnet by 12.5% outright, from 53.1% to 65.6% right, and other models by an even larger margin:
The experiment followed model use guidelines from the DeepSeek-R1 paper and the model card: Don't utilize few-shot examples, prevent including a system prompt, and set the temperature level to 0.5 - 0.7 (0.6 was used). You can discover further evaluation details here.
Approach
DeepSeek-R1's strong coding capabilities enable it to serve as a representative without being explicitly trained for tool usage. By permitting the model to produce 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 timely. This can be an easy function meaning or a module of a larger bundle - any legitimate Python code. The model then generates code actions that call these tools.
Arise from executing these actions feed back to the model as follow-up messages, driving the next actions till a final answer is reached. The agent framework is a basic iterative coding loop that mediates the conversation in between the model and users.atw.hu its environment.
Conversations
DeepSeek-R1 is utilized as chat design 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 up until a last answer is reached.
In contrast, o1 models are known to perform inadequately when utilized as chat models i.e. they do not try to pull context throughout a discussion. According to the linked article, o1 designs carry out 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 action (with arise from previous actions included), but this caused considerably lower ratings on the GAIA subset. Switching to the conversational approach explained above, I had the ability to reach the reported 65.6% efficiency.
This raises an interesting question about the claim that o1 isn't a chat design - possibly this observation was more relevant to older o1 models that lacked tool use capabilities? After all, isn't tool usage support a crucial mechanism for making it possible for models to pull additional context from their environment? This conversational technique certainly appears efficient for DeepSeek-R1, though I still need to conduct similar try outs o1 models.
Generalization
Although DeepSeek-R1 was mainly trained with RL on math and coding jobs, it is amazing that generalization to agentic tasks with tool use via code actions works so well. This ability to generalize to agentic jobs reminds of current research study by DeepMind that reveals that RL generalizes whereas SFT remembers, although generalization to tool use wasn't investigated in that work.
Despite its capability to generalize to tool usage, DeepSeek-R1 typically produces extremely long reasoning traces at each action, compared to other models in my experiments, restricting the effectiveness of this design in a single-agent setup. Even easier jobs in some cases take a long period of time to complete. Further RL on agentic tool usage, be it through code actions or not, could be one choice to enhance effectiveness.
Underthinking
I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning design regularly switches in between different reasoning thoughts without sufficiently checking out promising paths to reach an appropriate solution. This was a major reason for overly long thinking traces produced by DeepSeek-R1. This can be seen in the recorded traces that are available for download.
Future experiments
Another common application of thinking models is to utilize them for planning just, while utilizing other models for generating code actions. This might be a potential brand-new function of freeact, if this separation of roles proves helpful for more complex jobs.
I'm likewise curious about how thinking models that currently support tool usage (like o1, o3, ...) perform in a single-agent setup, with and without creating code . Recent developments like OpenAI's Deep Research or utahsyardsale.com Hugging Face's open-source Deep Research, which likewise uses code actions, look interesting.