Exploring DeepSeek R1's Agentic Capabilities Through Code Actions
Alica Scarborough ha modificato questa pagina 6 mesi fa


I ran a fast experiment examining how DeepSeek-R1 carries out on agentic tasks, despite not supporting tool usage natively, and I was rather pleased by preliminary outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the design not only prepares the actions however 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% outright, from 53.1% to 65.6% right, and other designs by an even bigger margin:

The experiment followed design use guidelines from the DeepSeek-R1 paper and the model card: Don’t use few-shot examples, avoid including 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 explicitly trained for tool use. By allowing the design to create 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 timely. This can be a basic function definition or a module of a larger package - any legitimate Python code. The design 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 steps until a last answer is reached. The representative framework is an easy iterative coding loop that mediates the discussion in between the design 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 using tools e.g. by using a search engine or fetching information from websites. This drives the discussion with the environment that continues till a final response is reached.

On the other hand, o1 models are known to carry out inadequately when utilized as chat designs i.e. they do not attempt to pull context during a discussion. According to the linked article, o1 models carry out best when they have the complete context available, with clear instructions on what to do with it.

Initially, wiki.insidertoday.org I also attempted a complete context in a single prompt technique at each step (with arise from previous steps included), but this led to considerably lower ratings on the GAIA subset. Switching to the conversational technique explained above, I was able to reach the reported 65.6% efficiency.

This raises an interesting concern about the claim that o1 isn’t a chat model - perhaps this observation was more appropriate to older o1 designs that lacked tool usage capabilities? After all, isn’t tool use support a crucial system for making it possible for designs to pull additional context from their environment? This conversational method certainly seems efficient for DeepSeek-R1, though I still need to carry out comparable explores o1 models.

Generalization

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

Despite its capability to generalize to tool use, DeepSeek-R1 frequently produces really long thinking traces at each action, compared to other models in my experiments, restricting the usefulness of this design in a single-agent setup. Even easier tasks often take a very long time to finish. Further RL on agentic tool use, be it by means of code actions or not, could be one option to enhance effectiveness.

Underthinking

I also observed the underthinking phenomon with DeepSeek-R1. This is when a reasoning model often changes between different thinking thoughts without adequately exploring appealing courses to reach an appropriate service. This was a significant factor for extremely 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 preparing only, while using other designs for generating code actions. This could be a potential brand-new feature of freeact, if this of functions proves useful for more complex jobs.

I’m also curious about how reasoning models that already support tool usage (like o1, o3, …) perform in a single-agent setup, with and without creating code actions. Recent advancements like OpenAI’s Deep Research or Hugging Face’s open-source Deep Research, which likewise utilizes code actions, look intriguing.