Skip to main content
BVDNET
Arnhem · websites & automationBVDNET
Agentic AI

Dynamic cognitive scaffolding

Dynamic cognitive scaffolding means an AI agent works out for each task how to split it into steps, instead of always following the same fixed recipe.

Also known as: DOLORES, Deep Reasoning (DOLORES), structured meta-cognition, just-in-time scaffolds, inference-time scaffolding

Dynamic cognitive scaffolding describes AI agents that decide for each task how to break it into steps, instead of always following one fixed recipe. Take the question "which supplier delivered late most often last year?": it needs some interpretation, a few lookups and a count. Such an agent plans that mix per question. A fixed recipe works until a question does not fit it.

Where does the term come from?

In AI, a scaffold is the program around a language model that coordinates its calls to models and tools. Scaffolds such as ReAct, CodeAct, Deep Research agents and recursive language models (RLMs) fix in advance how a task is broken down, the authors of Deep Reasoning in General Purpose Agents via Structured Meta-Cognition argue. Their paper, from the University of Washington, appeared on arXiv on 12 May 2026 and builds the scaffold per task instead, "just in time". The authors call the approach Deep Reasoning and their agent DOLORES; "dynamic cognitive scaffolding" is a descriptive name for the same idea, not their term. In education, scaffolding means something else: the support a teacher gives a learner (instructional scaffolding).

How does DOLORES work?

DOLORES (Deep Layered Reasoning Scaffold) splits a task into three kinds of steps:

  • Associative steps: a call to a language model for judgement, such as reading "the City by the Bay" as San Francisco.
  • Formal steps: Python code for anything rule-based, such as counting and taking a maximum.
  • Recursive steps: DOLORES calls itself on a subtask, in its own environment.

A language model chooses the decomposition, guided by in-context examples: decompositions of example tasks that people reasoned through and the authors translated into the paper's formal language. The agent works in a Python REPL, like a notebook, and every recursive call gets a separate one.

What did the tests show?

The authors compared DOLORES with ReAct, CodeAct, a Deep Research agent and an RLM on four benchmarks: SynthWorlds and PhantomWiki (questions that need several hops), DeepSearchQA (research-style searching) and Oolong-real (aggregating information over very long documents). They used Qwen3-8B, Qwen3-32B and Llama-3.3-70B. DOLORES scored best in 11 of 12 combinations of benchmark and model, on average 24.8% higher than the strongest baseline per task; the exception was CodeAct on SynthWorlds with Llama-3.3-70B. With the 8B model, it beat every 32B baseline on SynthWorlds (0.305 against at most 0.281).

In an analysis of Qwen3-32B runs, the main failure modes were giving up too early and hallucination. The authors attribute both to fixed scaffolds loading too much onto a single thread of the model's context.

What does it cost?

  • Tokens. DOLORES spawns many threads and used 12.9 times as many tokens on average, even though each thread used 71% fewer reasoning tokens.
  • Human examples. Without the in-context decompositions, scores fell by 70% on average, and plain-language instructions in their place did even worse. The authors conclude that current models do not yet work out good decompositions on their own.
  • Expertise. Writing good decompositions requires knowing the method, and complex fields may need many of them, the authors note.

Example

The paper's running example, adapted from DeepSearchQA, asks which volleyball court in "the City by the Bay" had the most games that went to a tie-break. DOLORES reads the phrase as San Francisco (associative), calls itself to list the volleyball courts there (recursive), and counts the tie-breaks per court and picks the maximum in code (formal). The code is on GitHub.