Zing Forum

Reading

Cognitive 'Sandwich' Architecture: Collaborating Large Models and Operations Research to Solve Supply Chain Disruption Challenges

The scm-cognitive-sandwich project proposes an innovative Artifact-Centric 'Sandwich' cognitive architecture that combines the semantic reasoning capabilities of large language models (LLMs) with the mathematical rigor of operations research (OR) solvers, specifically designed to autonomously handle route replanning in supply chain disruption management.

供应链运筹学大语言模型LangGraph约束求解自主系统可观测性
Published 2026-04-05 17:37Recent activity 2026-04-05 17:48Estimated read 7 min
Cognitive 'Sandwich' Architecture: Collaborating Large Models and Operations Research to Solve Supply Chain Disruption Challenges
1

Section 01

Introduction: Cognitive 'Sandwich' Architecture—Collaborating Large Models and Operations Research to Solve Supply Chain Disruptions

The scm-cognitive-sandwich project proposes an innovative Artifact-Centric 'Sandwich' cognitive architecture that combines the semantic reasoning capabilities of large language models (LLMs) with the mathematical rigor of operations research (OR) solvers, specifically designed to autonomously handle route replanning in supply chain disruption management. Addressing the complex and frequently disrupted global supply chain, this architecture solves the pain points of traditional rule-based systems (lack of flexibility) and pure AI solutions (difficulty ensuring mathematical optimality).

2

Section 02

Background: Challenges of Supply Chain Disruptions and Limitations of Traditional Solutions

Global supply chains are becoming increasingly complex. Sudden events such as port congestion, weather anomalies, and geopolitical conflicts frequently cause shipping route disruptions. Traditional rule-based systems lack flexibility and cannot handle ambiguous unstructured scenarios; pure AI solutions are prone to 'hallucinations' and struggle to ensure the mathematical optimality of decisions. This core contradiction drove the birth of the 'Sandwich' architecture.

3

Section 03

Core Architecture: Artifact-Centric Design and Three-Layer Collaboration Model

The project adopts an Artifact-Centric design philosophy, centering the decision-making process around a 'routing artifact' (a structured JSON object), which serves as a common language between LLMs and OR solvers. The architecture consists of three layers: the upstream LLM converts natural language disruption scenarios into structured artifacts; the midstream OR solver verifies solution feasibility; the downstream LLM intelligently repairs solutions based on solver feedback, balancing semantic understanding and mathematical rigor.

4

Section 04

Workflow: Closed-Loop Cycle from Semantic Parsing to Constraint Repair

System work cycle: Receive text description of disruptions → Upstream LLM extracts key information (affected ports, cargo priority, etc.) to generate an initial routing artifact → OR solver uses a Pyomo model to convert it into a constraint satisfaction problem and check feasibility → If infeasible, generate an IIS conflict report → Downstream LLM performs structured repair based on the report to achieve intelligent search within the constraint space.

5

Section 05

Technical Implementation: LangGraph Orchestration and Modular Code Design

The project uses LangGraph as the orchestration framework, modeling the process as a state machine with clear responsibilities for each node (semantic parsing, feasibility check, repair, etc.). The code is organized modularly: src/agents/ contains LangGraph nodes and prompt templates; src/solver/ encapsulates the Pyomo solver and conflict analysis; src/clients/ handles external APIs; src/memory/ implements an artifact management interface, facilitating independent testing and upgrading of components.

6

Section 06

Observability: Key Support System for Production Environments

Autonomous decision systems require strong observability. The project integrates OpenTelemetry and Arize Phoenix tracking systems to record input/output, latency, resource consumption, etc., for each node execution, LLM call, and solver run. This system supports problem diagnosis, performance optimization, and audit compliance, and provides CLI tools and curl commands to query tracking data.

7

Section 07

Application Scenarios and Expansion Potential: From Maritime Transport to Multi-Domain Adaptation

The current implementation focuses on maritime route replanning. The architecture can be extended to scenarios such as factory production scheduling exception handling, logistics network dynamic routing adjustment, and energy grid load balancing. The modular design keeps domain migration costs manageable—only domain-specific prompts, constraint models, and API clients need to be replaced, while the core logic can be reused.

8

Section 08

Summary and Reflections: Value of Technical Collaboration and Reference Significance

The scm-cognitive-sandwich project represents the evolutionary direction of AI architectures: exploring collaborative complementarity between different technical paradigms. The 'sandwich' combination of LLMs and OR solvers demonstrates the organic integration of semantic intelligence and mathematical intelligence. For engineers, this architecture provides a practical reference, proving that LLMs can act as intelligent glue connecting unstructured inputs and structured solving, suitable for highly constrained industrial scenarios.