Exploring DeepSeek-R1 s Agentic Capabilities Through Code Actions

Aus Philo Wiki
Wechseln zu:Navigation, Suche


I ran a quick experiment examining how DeepSeek-R1 carries out on agentic jobs, despite not supporting tool use natively, and I was rather impressed by preliminary outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not just prepares the actions however likewise develops the actions as executable Python code. On a subset1 of the GAIA validation split, DeepSeek-R1 surpasses Claude 3.5 Sonnet by 12.5% absolute, from 53.1% to 65.6% proper, and other designs by an even larger margin:


The experiment followed design use standards from the DeepSeek-R1 paper and the design 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 utilized). You can discover more examination 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 generate actions as Python code, it can flexibly interact with environments through code execution.


Tools are carried out as Python code that is consisted of straight in the prompt. This can be a simple function definition or a module of a bigger package - any legitimate Python code. The design then creates code actions that call these tools.


Arise from carrying out these actions feed back to the model as follow-up messages, driving the next steps till a last response is reached. The representative framework is a basic iterative coding loop that mediates the conversation in between the model and its environment.


Conversations


DeepSeek-R1 is used as chat model in my experiment, where the design autonomously pulls additional context from its environment by utilizing tools e.g. by using a search engine or fetching data from websites. This drives the conversation with the environment that continues up until a last answer is reached.


On the other hand, o1 models are understood to perform improperly when used as chat models i.e. they do not attempt to pull context during a conversation. According to the connected post, o1 designs perform best when they have the full context available, with clear instructions on what to do with it.


Initially, I also attempted a full context in a single timely approach at each action (with arise from previous steps included), however this led to significantly lower ratings on the GAIA subset. Switching to the conversational method explained above, I was able to reach the reported 65.6% performance.


This raises an interesting concern about the claim that o1 isn't a chat model - perhaps this observation was more pertinent to older o1 models that did not have tool usage capabilities? After all, isn't tool use support an essential system for allowing models to pull additional context from their environment? This conversational method certainly appears reliable for DeepSeek-R1, though I still need to carry out similar try outs o1 designs.


Generalization


Although DeepSeek-R1 was mainly trained with RL on mathematics and coding jobs, it is impressive that generalization to agentic jobs with tool use by means of code actions works so well. This ability to generalize to agentic jobs reminds of recent research study by DeepMind that shows that RL generalizes whereas SFT remembers, although generalization to tool usage wasn't in that work.


Despite its ability to generalize to tool usage, users.atw.hu DeepSeek-R1 frequently produces long thinking traces at each action, compared to other designs in my experiments, limiting the usefulness of this design in a single-agent setup. Even simpler jobs often take a long time to complete. Further RL on agentic tool usage, higgledy-piggledy.xyz be it via code actions or not, might be one alternative to improve performance.


Underthinking


I likewise observed the underthinking phenomon with DeepSeek-R1. This is when a thinking model frequently switches between different reasoning thoughts without adequately exploring appealing paths to reach an appropriate option. This was a major reason for overly long reasoning 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 designs is to utilize them for planning only, while using other designs for producing code actions. This could be a potential new function of freeact, if this separation of roles shows helpful for more complex tasks.


I'm likewise curious about how thinking designs that already support tool usage (like o1, oke.zone o3, ...) carry out in a single-agent setup, with and setiathome.berkeley.edu without generating code actions. Recent developments like OpenAI's Deep Research or wavedream.wiki Hugging Face's open-source Deep Research, which also utilizes code actions, look intriguing.