What problem does it solve? Length-based chunking in RAG pipelines discards the hierarchy that a document's table of contents already encodes, causing retrieval to lose structural context and enabling hallucinated citations. This Skill applies the IBM STAIR approach of grounding the retrieval address space in ToC paths so claims cite real heading locations. ## Core Features & Use Cases - ToC-based retrieval: Retrieve content by heading path (path#slug) rather than flat 512-token chunks, preserving document hierarchy. - Grounding evaluation: Run evaluate_grounding against heading paths and evaluate_chunking in toc mode to verify retrieval quality before claiming a result is grounded. - Fail-closed validation: The stair_toc.py script returns JSON with ok flags and exits 0 only when every check passes, blocking ungrounded claims. - Use Case: When a user asks whether "the docs say" something about live evidence or WQTU, run the script with --mode toc and a --cite path#slug argument to confirm the citation resolves to a real heading before answering. ## Quick Start Ask the assistant to verify a retrieval claim against a markdown document's table of contents by running the stair_toc script in toc mode with a query and a heading citation.