Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions
I ran a fast experiment examining how DeepSeek-R1 carries out on agentic jobs, despite not supporting tool use natively, and I was quite pleased by preliminary outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not just prepares the actions however likewise creates the actions as executable Python code. On a subset1 of the GAIA recognition split, DeepSeek-R1 surpasses Claude 3.5 Sonnet by 12.5% outright, from 53.1% to 65.6% correct, and other designs by an even larger margin:
The experiment followed model use standards from the DeepSeek-R1 paper and the model card: smfsimple.com 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 more assessment details here.
Approach
DeepSeek-R1's strong coding capabilities allow it to serve as an agent without being clearly trained for tool usage. By permitting the model to produce actions as Python code, it can flexibly engage with environments through code execution.
Tools are executed as Python code that is included straight in the timely. This can be an easy function definition or a module of a larger package - any legitimate Python code. The model then generates code actions that call these tools.
Results from executing these actions feed back to the model as follow-up messages, driving the next actions until a last answer is reached. The representative framework is an easy iterative coding loop that moderates the conversation in between the model and its environment.
Conversations
DeepSeek-R1 is used as chat design in my experiment, where the design autonomously pulls extra context from its environment by utilizing tools e.g. by utilizing a search engine or fetching data from web pages. This drives the discussion with the environment that continues until a last response is reached.
In contrast, o1 designs are known to perform inadequately when utilized as chat designs i.e. they don't attempt to pull context throughout a discussion. According to the connected short article, 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 full context in a single prompt approach at each step (with outcomes from previous steps consisted of), however this led to substantially lower scores on the GAIA subset. Switching to the conversational technique explained above, suvenir51.ru 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 - possibly this observation was more relevant to older o1 designs that did not have tool use abilities? After all, isn't tool usage support a crucial system for enabling designs to pull extra context from their environment? This conversational technique certainly seems effective for DeepSeek-R1, though I still require to perform similar explores o1 designs.
Generalization
Although DeepSeek-R1 was mainly trained with RL on math and coding tasks, it is exceptional that generalization to agentic tasks with tool use by means of code actions works so well. This ability to generalize to agentic tasks advises of recent research study by DeepMind that shows that RL generalizes whereas SFT remembers, wiki.whenparked.com although generalization to tool usage wasn't examined because work.
Despite its ability to generalize to tool use, DeepSeek-R1 typically produces really long reasoning traces at each step, compared to other designs in my experiments, limiting the usefulness 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 via code actions or not, might be one alternative to enhance performance.
Underthinking
I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning model frequently changes between various reasoning thoughts without sufficiently exploring promising paths to reach a right option. This was a significant reason for excessively long reasoning traces produced by DeepSeek-R1. This can be seen in the recorded traces that are available for .
Future experiments
Another typical application of thinking designs is to use them for planning only, while using other designs for creating code actions. This could be a possible new function of freeact, if this separation of functions 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 producing code actions. Recent advancements like OpenAI's Deep Research or Hugging Face's open-source Deep Research, which also utilizes code actions, look intriguing.