Abstract
Standard Operating Procedures (SOPs) are critical for organizational consistency but often exist as dense, unstructured text, making them difficult to automate or verify. Researchers at JP Morgan AI Research have introduced SOPStruct, a framework that utilizes Large Language Models (LLMs) to transform these documents into machine-readable Directed Acyclic Graphs (DAGs). By combining recursive segmentation with a hybrid evaluation framework—including a PDDL-based symbolic planner—SOPStruct ensures logical soundness and high completeness, significantly outperforming traditional zero-shot or code-style prompting methods across varying levels of complexity.
Introduction
SOPs serve as the "golden source" of truth in industries ranging from finance to manufacturing. However, their natural language format presents two major challenges: high human cognitive load and significant barriers to automation. While LLMs are proficient at following instructions, they frequently "hallucinate" steps or lose track of long-term dependencies when processing lengthy, complex documents. SOPStruct addresses these issues by systematically extracting a structured, verifiable "blueprint" of a process from raw text.
The SOPStruct Pipeline
The authors propose a three-phase pipeline designed to maintain granularity and logical consistency:
- SOP Segmentation: To prevent the loss of detail common in long-context processing, an LLM (GPT-4) identifies logical boundaries and context shifts, breaking the SOP into manageable chunks.
- SOP Structure Generation: For each segment, the LLM generates subtasks in a strict JSON format, defining names, descriptions, categories, and critical dependencies (inputs/outputs).
- Hybrid Evaluation Framework: To ensure the generated graph is logically sound, the system translates the DAG into Planning Domain Definition Language (PDDL). A classical automated planner then verifies if a path exists from the start to the goal. Additionally, an LLM-based non-deterministic evaluation checks for "completeness" against the original text.
Datasets and Evaluation
SOPStruct was evaluated across three datasets of increasing complexity: the Nestful API Dataset (low complexity), the RecipeNLG Dataset (medium complexity), and a Business Process Dataset (high complexity) involving intricate descriptions of real-world operations.
A key insight from the study is that segmentation is vital. Even advanced LLMs struggle with intricate dependencies in long documents; recursive segmentation ensures subtle details are captured rather than "smoothed over." Furthermore, using PDDL as a "compiler" for plans provides a mathematical guarantee of traversability, bridging the gap between probabilistic AI and rigorous engineering.
Key Results
SOPStruct consistently outperformed baselines, including Zero-shot, Code-style prompting, and BPMN-style generation, across all metrics.
- Connectivity: SOPStruct achieved a 100% Structured Plan Score across all datasets, meaning every generated graph was logically sound and traversable. Baselines typically fell into the 60-80% range, especially on complex business tasks.
- Completeness: On the complex Business Process dataset, SOPStruct maintained a 94% completeness score, whereas traditional baselines frequently omitted granular but critical steps.
- Dependency Accuracy: The system achieved 100% on the "Dependency Score," ensuring that no task expected data from a parent node that did not exist.
Conclusion and Future Work
SOPStruct demonstrates that structured prompting and symbolic validation can ground LLMs in reality, preventing the hallucinations common in zero-shot planning. Future work will explore the use of smaller, open-source models within this pipeline and move toward "closed-loop" execution, where the system monitors real-time task performance against the generated DAG. Additionally, iterative "critique" loops—feeding PDDL failure reasons back to the LLM—could further enhance robustness for edge cases.
Summary updated