Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • U unicoc
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 126
    • Issues 126
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Adell Collier
  • unicoc
  • Issues
  • #61

Closed
Open
Created Feb 11, 2025 by Adell Collier@adell628893828Maintainer

Exploring DeepSeek-R1's Agentic Capabilities Through Code Actions


I ran a fast experiment examining how DeepSeek-R1 performs on agentic jobs, despite not supporting tool use natively, and I was rather amazed by initial outcomes. This experiment runs DeepSeek-R1 in a single-agent setup, where the model not just prepares the actions but also formulates 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% appropriate, and other designs by an even bigger margin:

The experiment followed design usage guidelines from the DeepSeek-R1 paper and the model card: Don't use few-shot examples, avoid adding a system timely, and set the temperature to 0.5 - 0.7 (0.6 was utilized). You can discover additional evaluation details here.

Approach

DeepSeek-R1's strong coding abilities allow it to function as an agent without being explicitly trained for tool use. By permitting the design to generate actions as Python code, it can flexibly engage with environments through code execution.

Tools are implemented as Python code that is consisted of straight in the prompt. This can be a basic function meaning or a module of a bigger package - any valid Python code. The model then creates 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 agent framework is an easy iterative coding loop that mediates the discussion 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 utilizing a search engine or bring data from websites. This drives the discussion with the environment that continues up until a last answer is reached.

In contrast, o1 models are understood to carry out inadequately when utilized as chat designs i.e. they do not attempt to pull context throughout a discussion. According to the linked short article, o1 models perform best when they have the complete context available, with clear instructions on what to do with it.

Initially, I likewise attempted a complete context in a single timely approach at each action (with results from previous actions consisted of), 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 intriguing concern about the claim that o1 isn't a chat design - possibly this observation was more pertinent to older o1 models that usage capabilities? After all, isn't tool usage support an important mechanism for allowing designs to pull extra context from their environment? This conversational technique certainly appears reliable for DeepSeek-R1, though I still need to carry out comparable try outs o1 models.

Generalization

Although DeepSeek-R1 was mainly trained with RL on math and coding tasks, it is exceptional that generalization to agentic jobs with tool use through code actions works so well. This capability to generalize to agentic tasks reminds of recent research by DeepMind that shows that RL generalizes whereas SFT memorizes, 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 step, compared to other designs in my experiments, limiting the effectiveness of this design in a single-agent setup. Even simpler tasks often take a very long time to finish. Further RL on agentic tool usage, be it by means of code actions or not, might be one alternative to enhance performance.

Underthinking

I also observed the underthinking phenomon with DeepSeek-R1. This is when a thinking design regularly switches between different reasoning thoughts without adequately checking out promising paths to reach a correct solution. This was a major factor for excessively long reasoning traces produced by DeepSeek-R1. This can be seen in the recorded traces that are available for download.

Future experiments

Another typical application of thinking designs is to use them for planning just, while utilizing other models for generating code actions. This could be a potential brand-new feature of freeact, if this separation of functions proves helpful for more complex tasks.

I'm likewise curious about how reasoning designs that already support tool usage (like o1, o3, ...) perform in a single-agent setup, with and disgaeawiki.info without generating code actions. Recent developments like OpenAI's Deep Research or Hugging Face's open-source Deep Research, which also utilizes code actions, look interesting.

Assignee
Assign to
Time tracking