Think with skills improves language model task success by planning ahead

Think with Skills: Pseudocode Planning Before Execution for Advanced Reasoners

Artificial Intelligence

Summary

Language models often struggle with complex tasks even when given expert skills because those skills don't always explain how to use them step-by-step. The authors propose teaching models to write out detailed step-by-step plans in pseudocode before acting. This planning makes it easier for the models to coordinate multiple skills and handle conditions and dependencies explicitly. Their approach nearly doubles task success on a benchmark, showing that planning with pseudocode helps models use skills more effectively.

What this means in practice

  • For software developers: Improve AI assistants by enabling them to plan step-by-step pseudocode before executing multi-skill tasks.
  • For automation engineers: Increase automation system reliability by integrating structured pseudocode planning to coordinate complex skill usage.

Authors

Boshen Zhou, Boxuan Yue, Xiang Li, Shanchao Yang

Abstract

Language model agents often struggle with complex tasks even when equipped with expert-written skills. Such skills encode declarative knowledge, whereas successful execution requires procedural knowledge tailored to the task at hand. Natural language skills may leave conditions and dependencies implicit, and tasks involving multiple skills further require agents to coordinate intermediate results and execution order. We introduce Think with Skills, a method that trains reasoning models to turn relevant skill descriptions into task-specific pseudocode plans before execution. The pseudocode explicitly represents operations, conditions, intermediate results, and dependencies, providing a structured bridge from skill descriptions to agent actions. We construct training data that pairs tasks and skills with pseudocode plans and execution trajectories, use supervised fine tuning to initialize this behavior, and further optimize end-to-end task performance with Group Relative Policy Optimization. On SkillsBench, Think with Skills raises task success from 35.0% to 62.0%. These results show that proceduralizing expert knowledge before execution substantially improves skill use.