Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
I ran a quick experiment examining how DeepSeek-R1 carries out on agentic jobs, regardless of not supporting tool use natively, and I was rather impressed by initial outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the model not only plans the actions however likewise creates the actions as executable Python code. On a subset1 of the GAIA recognition 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 use guidelines from the DeepSeek-R1 paper and the design card: Don't utilize few-shot examples, avoid adding a system timely, and set the temperature level to 0.5 - 0.7 (0.6 was utilized). You can discover further evaluation details here.
Approach
DeepSeek-R1's strong coding capabilities enable it to serve as a representative without being clearly trained for bphomesteading.com tool use. By permitting the design to create actions as Python code, it can flexibly communicate with environments through code execution.
Tools are implemented as Python code that is consisted of straight in the prompt. This can be an easy function definition or a module of a larger plan - any valid Python code. The model then creates code actions that call these tools.
Results from executing these actions feed back to the design as follow-up messages, driving the next steps till a last response is reached. The representative structure is an easy iterative coding loop that moderates the discussion in between the model and its environment.
Conversations
DeepSeek-R1 is used as chat model in my experiment, where the model autonomously pulls extra context from its environment by utilizing tools e.g. by utilizing an online search engine or bring data from websites. This drives the conversation with the environment that continues up until a last response is reached.
In contrast, o1 models are understood to perform badly when utilized as chat designs i.e. they don't attempt to pull context throughout a conversation. According to the connected short article, o1 designs perform best when they have the complete context available, with clear guidelines on what to do with it.
Initially, I likewise attempted a complete context in a single prompt method at each step (with results from previous actions included), however this caused substantially lower scores on the GAIA subset. Switching to the conversational method explained above, I had the ability to reach the reported 65.6% efficiency.
This raises an about the claim that o1 isn't a chat design - maybe this observation was more appropriate to older o1 models that did not have tool use capabilities? After all, isn't tool usage support an important system for enabling models to pull additional context from their environment? This conversational technique certainly seems reliable for DeepSeek-R1, though I still need to conduct similar experiments with o1 models.
Generalization
Although DeepSeek-R1 was mainly trained with RL on mathematics and coding jobs, prawattasao.awardspace.info it is remarkable that generalization to agentic tasks with tool usage by means of code actions works so well. This capability to generalize to agentic tasks reminds of current research by DeepMind that shows that RL generalizes whereas SFT memorizes, although generalization to tool use wasn't investigated because work.
Despite its capability to generalize to tool use, DeepSeek-R1 typically produces really long thinking traces at each step, compared to other designs in my experiments, limiting the effectiveness of this design in a single-agent setup. Even easier tasks in some cases take a long period of time to complete. Further RL on agentic tool use, be it through code actions or not, might be one alternative to improve efficiency.
Underthinking
I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning model often switches between different thinking ideas without adequately checking out appealing paths to reach an appropriate 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 typical application of thinking designs is to use them for preparing only, while using other designs for generating code actions. This could be a possible new function of freeact, if this separation of roles proves helpful for more complex tasks.
I'm also curious about how thinking designs that currently support tool usage (like o1, o3, ...) carry out in a single-agent setup, with and without generating code actions. Recent developments like OpenAI's Deep Research or Hugging Face's open-source Deep Research, which also uses code actions, qoocle.com look interesting.