I ran a fast experiment investigating how DeepSeek-R1 performs on agentic tasks, despite not supporting tool use natively, and I was quite amazed by preliminary outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not just plans the actions but also formulates the actions as executable Python code. On a subset1 of the GAIA recognition split, DeepSeek-R1 surpasses Claude 3.5 Sonnet by 12.5% absolute, from 53.1% to 65.6% correct, and other designs by an even larger margin:
The experiment followed design usage guidelines from the DeepSeek-R1 paper and the model card: Don't use few-shot examples, avoid including a system prompt, 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 abilities allow it to serve as a representative without being explicitly trained for tool use. By enabling the model to create actions as Python code, it can flexibly interact with environments through code execution.
Tools are carried out as Python code that is in the prompt. This can be a basic function meaning or a module of a bigger package - any valid Python code. The model then produces code actions that call these tools.
Arise from performing these actions feed back to the design as follow-up messages, driving the next actions till a last response is reached. The agent framework is a basic iterative coding loop that mediates the conversation 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 utilizing tools e.g. by utilizing an online search engine or fetching information from websites. This drives the discussion with the environment that continues until a last response is reached.
In contrast, o1 models are understood to perform improperly when utilized as chat models i.e. they do not try to pull context during a conversation. According to the connected article, o1 designs perform best when they have the full context available, with clear guidelines on what to do with it.
Initially, I likewise tried a full context in a single prompt method at each action (with arise from previous actions included), but this led to substantially 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 intriguing concern about the claim that o1 isn't a chat design - perhaps this observation was more appropriate to older o1 designs that lacked tool usage capabilities? After all, isn't tool usage support an important system for enabling models to pull extra context from their environment? This conversational technique certainly seems reliable for DeepSeek-R1, though I still require to perform similar experiments with o1 designs.
Generalization
Although DeepSeek-R1 was mainly trained with RL on mathematics 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 investigated because work.
Despite its ability to generalize to tool usage, DeepSeek-R1 often produces long thinking traces at each step, compared to other designs in my experiments, restricting the usefulness of this model in a single-agent setup. Even simpler jobs in some cases take a long time to finish. Further RL on agentic tool use, be it via code actions or not, could be one alternative to enhance performance.
Underthinking
I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning design frequently switches in between various thinking thoughts without sufficiently checking out appealing paths to reach a correct solution. This was a significant factor for excessively long reasoning traces produced by DeepSeek-R1. This can be seen in the taped traces that are available for download.
Future experiments
Another typical application of reasoning models is to utilize 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 beneficial for more complex jobs.
I'm also curious about how reasoning designs that currently support tool use (like o1, o3, ...) carry out in a single-agent setup, with and experienciacortazar.com.ar without producing code actions. Recent advancements like OpenAI's Deep Research or Hugging Face's open-source Deep Research, which likewise utilizes code actions, look fascinating.
1
Exploring DeepSeek R1's Agentic Capabilities Through Code Actions
wayne63l75749 edited this page 2 weeks ago