Skip to main content

least-to-most

For a complex problem, first decompose it into an ordered list of simpler subproblems, then solve them in sequence, feeding each answer into the next, instead of one-shotting the whole thing. Use on multi-step tasks, hard algorithmic problems, or anything that fails when attempted whole. Trigger with /least-to-most or "break this down", "decompose first", "solve step by step in order".

跳到安装

来源信息

仓库
Zavelinski/least-to-most
最近来源活动
2026年6月30日 03:09
检测到的 SKILL.md 语言
英语
星标
0
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
least-to-most
description
For a complex problem, first decompose it into an ordered list of simpler subproblems, then solve them in sequence, feeding each answer into the next, instead of one-shotting the whole thing. Use on multi-step tasks, hard algorithmic problems, or anything that fails when attempted whole. Trigger with /least-to-most or "break this down", "decompose first", "solve step by step in order".
version
0.1.0
user-invocable
true
metadata
{"emoji":"🪜"}
# least-to-most Hard problems fail when attempted in one leap. Decompose into ordered subproblems (easiest/foundational first), solve each using the answers from the earlier ones, then assemble. Explicit decomposition, sequential solving. ## Why this exists (evidence) - Least-to-most prompting (Zhou et al., arXiv:2205.10625): decompose-then-solve-in-sequence generalizes to harder problems than chain-of-thought, with large gains on compositional generalization (e.g. SCAN) and multi-step reasoning, precisely because later steps build on solved earlier ones. - It targets the failure where a model can do each step but botches the leap when forced to do them all at once. ## When to use - Multi-step tasks where step N depends on step N-1 (migrations, multi-file refactors, algorithmic problems, data pipelines). - A task that keeps failing when attempted whole. - NOT for simple or already-atomic tasks (decomposition is overhead there). ## The method 1. **Decompose:** list the subproblems in dependency order, simplest/foundational first. Make the ordering explicit (each item names what it needs from prior items). 2. **Solve in sequence:** solve subproblem 1; carry its concrete answer into subproblem 2; and so on. Do not skip ahead. 3. **Assemble:** combine the sub-answers into the full solution. 4. **Check the seams:** verify the points where one sub-answer feeds the next (that is where composition errors hide). ## How to run it - Inline: write the ordered subproblem list, then solve down the list. - For code: decompose into the ordered edits/functions; implement+verify each before the next (composes with TDD/testsmith per step). - Distinct from orchestrate (which is the plan->spec->build->verify dev cycle with a gate); least-to-most is the reasoning-decomposition technique you can use INSIDE any step. ## Composes with - `orchestrate`: least-to-most is how you fill the PLAN step. - `reflexion`: if a subproblem fails, reflect before retrying that one (not the whole chain). - `self-consistency`: sample the decomposition itself when the right breakdown is unclear. ## Honest limits - A wrong decomposition propagates: if the ordering/breakdown is off, every step inherits it. Sanity-check the decomposition before solving. - Overhead on simple tasks; scope to genuinely compositional problems. - Gains are on the paper's benchmarks; measure your own.
在 GitHub 查看