mlsanityData to 14 Oct 2026

How Should Agents Read Demonstrations? Hierarchical Structure Beats Flat Action Logs

arXiv 2606.20978 ↗First posted 18 Jun 2026cs.AI cs.HCcited by 1

On the map: LLM agents and tool use → Agent skill learning and evolution

Abstract (arXiv)

Programming by Demonstration (PbD) offers a human-centered way to author procedural knowledge for LLM agents: users communicate what they want by showing rather than by writing prompts or code, making agent authoring accessible to non-programmers. The natural output of a PbD recording is a flat action log, but how this log is organized before being passed to the agent is an open design question with significant consequences for plan quality. We propose grouping recorded actions into labeled, hierarchical subgoals and evaluate the effect of this organizational structure in a controlled experiment. Across 85 web automation tasks, we compare a zero-shot baseline against four demonstration formats that share identical action sequences but differ in structure. On 43 natural-language tasks with vague descriptions, hierarchically grouped demonstrations improve pass rates from 76.7% to 90.7% (paired permutation test p=0.034; win-loss 6:0), while flat demonstrations show a smaller, non-significant improvement. On 42 tasks with precise descriptions, no format provides any benefit, confirming that the hierarchical advantage arises specifically when descriptions leave procedural details ambiguous. Ablation shows that subgoal grouping alone drives the effect: preconditions, postconditions, and parameter annotations add no measurable benefit. These results offer a concrete design recommendation for PbD pipelines and, more broadly, for any system that feeds procedural context to an LLM agent: segment action sequences into named subgoal groups rather than presenting flat step lists.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Agent skill learning and evolution, one of 16 directions in LLM agents and tool use. Builds on 15 of its 25 references that are in the map. First posted on arXiv 18 Jun 2026.

Builds on

15 of 25 references.

Closest ancestors · 1

Same direction, newest first

  1. 2026SkillsBench: Benchmarking How Well Agent Skills Work Across Diverse Tasks13 Feb

Other references · 14

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  2. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  3. 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,211
  4. 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,191
  5. 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 2,006
  6. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
  7. 2023Mind2Web: Towards a Generalist Agent for the Webcited by 1,242
  8. 2023Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingcited by 817
  9. 2024Agent Workflow Memorycited by 383
  10. 2024Does Prompt Formatting Have Any Impact on LLM Performance?cited by 141
  11. 2023SheetCopilot: Bringing Software Productivity to the Next Level through Large Language Modelscited by 57
  12. 2023PPTC Benchmark: Evaluating Large Language Models for PowerPoint Task Completioncited by 30
2 more
  1. 2024AdaptAgent: Adapting Multimodal Web Agents with Few-Shot Learning from Human Demonstrationscited by 19
  2. 2025ALLOY: Generating Reusable Agent Workflows from User Demonstrationcited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026SkillJuror: Measuring How Agent Skill Organization Changes Runtime Behavior
  2. 2026HANDBOOK.md: A Benchmark for Long-Context Agentic Instruction Following
  3. 2026Demystifying Agent Skills: Why They Work-Until They Don't
  4. 2025GroundAct: Can LLM Agents Ground Actions in Environmental States?
  5. 2026From Agent Behaviour to Agent-Friendly Documentation: An Empirical Study of How Coding Agents Discover, Read, and Write Technical Documentation
  6. 2026From Anatomy to Smells: An Empirical Study of SKILL.md in Agent Skills
  7. 2024Synatra: Turning Indirect Knowledge into Direct Demonstrations for Digital Agents at Scale
  8. 2026The Hard Part Comes After Search: Benchmarking Web Agents on Synthesizing, Organizing, and Displaying Knowledge