Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
I ran a quick experiment examining how DeepSeek-R1 carries out on agentic tasks, despite not supporting tool use natively, and I was quite impressed by initial outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the model not only 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% outright, from 53.1% to 65.6% correct, and other models by an even larger margin:
The experiment followed model usage standards from the DeepSeek-R1 paper and the design card: Don't use few-shot examples, geohashing.site avoid including a system timely, and set the temperature level to 0.5 - 0.7 (0.6 was used). You can find additional evaluation details here.
Approach
DeepSeek-R1's strong coding capabilities enable it to act as a representative without being clearly trained for tool use. By permitting the model to generate actions as Python code, it can flexibly engage with environments through code execution.
Tools are as Python code that is consisted of straight in the prompt. This can be a simple function meaning or gratisafhalen.be a module of a larger plan - any valid Python code. The design then generates 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 final response is reached. The representative structure is a basic iterative coding loop that moderates the discussion between the model and its environment.
Conversations
DeepSeek-R1 is used as chat model in my experiment, funsilo.date where the design autonomously pulls additional context from its environment by utilizing tools e.g. by utilizing a search engine or bring information from web pages. This drives the discussion with the environment that continues till a final answer is reached.
On the other hand, macphersonwiki.mywikis.wiki o1 models are understood to perform badly when utilized as chat models i.e. they don't try to pull context during a conversation. According to the connected article, o1 designs carry out best when they have the complete context available, with clear instructions on what to do with it.
Initially, I also tried a complete context in a single timely method at each action (with arise from previous steps included), however this caused significantly lower ratings on the GAIA subset. Switching to the conversational approach explained above, I was able to reach the reported 65.6% efficiency.
This raises a fascinating concern about the claim that o1 isn't a chat model - maybe this observation was more pertinent to older o1 designs that did not have tool use capabilities? After all, isn't tool use support an important system for enabling designs to pull extra context from their environment? This conversational method certainly seems efficient for DeepSeek-R1, though I still need to perform comparable try outs o1 models.
Generalization
Although DeepSeek-R1 was mainly trained with RL on math and coding jobs, it is remarkable that generalization to agentic jobs with tool use by means of code actions works so well. This capability to generalize to agentic tasks advises of recent research study by DeepMind that shows that RL generalizes whereas SFT memorizes, although generalization to tool usage wasn't examined in that work.
Despite its capability to generalize to tool use, DeepSeek-R1 often produces really long thinking traces at each step, compared to other models in my experiments, restricting the usefulness of this design in a single-agent setup. Even easier tasks sometimes take a long period of time to finish. Further RL on agentic tool usage, be it via code actions or elearnportal.science not, could be one choice to enhance efficiency.
Underthinking
I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning model often switches between different reasoning thoughts without sufficiently checking out promising paths to reach a correct option. This was a major reason for ratemywifey.com excessively long thinking traces produced by DeepSeek-R1. This can be seen in the tape-recorded traces that are available for download.
Future experiments
Another typical application of reasoning models is to use them for preparing just, while using other designs for creating code actions. This could be a prospective new function of freeact, if this separation of roles shows helpful for more complex jobs.
I'm likewise curious about how reasoning designs 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 likewise uses code actions, look fascinating.