Learning Hub/Agentic AI Patterns/Skeleton of Thought
17 / 22IntermediateGeneration

Skeleton of Thought

Parallel structured content generation

Generate a structured outline first, then fill each section IN PARALLEL. Dramatically faster than sequential writing for long structured outputs like reports or documentation.

Skeleton of Thought (SoT) addresses a key inefficiency in long-form generation: if you write a 10-section report section by section, the LLM is idle while waiting for the previous section to finish. SoT breaks this by first generating a lightweight outline (the "skeleton"), then writing all sections simultaneously.

In LangGraph, the `outline` node produces a list of `{title, description, order}` objects. The `fan_out_sections` node emits one `Send` per section, dispatching all section writers in parallel. Each writer receives the section specification and relevant database context and writes independently.

The `assemble` node runs only after all parallel writers have completed. It sorts sections by their `order` field and stitches them into a final report. On a 10-section report, this can be 5–7× faster than sequential generation — making SoT one of the highest-ROI patterns in this collection.