TL;DR
The Scalable COde Planning Engine (SCOPE) framework dramatically improves how Large Language Models (LLMs) handle complex, multi-constraint planning tasks. Instead of relying on error-prone, expensive natural language reasoning chains for every new query, SCOPE uses a multi-agent pipeline to generate reusable, deterministic Python solver functions from a single example. This approach achieves state-of-the-art accuracy while significantly slashing inference costs and latency.
What Problem Does This Paper Address?
While LLMs excel at simple text-based reasoning, they struggle with multi-constraint planning tasks like generating complex travel itineraries or scheduling meetings. Traditional text-based approaches—such as Chain-of-Thought (CoT) or Tree-of-Thought (ToT)—suffer from two major flaws in this domain:
- Lack of Robustness: Because LLM outputs are inherently probabilistic, small variations in reasoning paths can lead to invalid plans or missed constraints. Errors compound rapidly over long reasoning chains.
- Poor Scalability: As problem complexity grows, the number of tokens required for natural language reasoning explodes exponentially, making it prohibitively expensive and slow.
Alternative approaches that use code generation often write problem-specific code from scratch for every single query, which is computationally inefficient and prone to syntax or logic errors. SCOPE addresses these challenges by completely disentangling query-specific reasoning from generic code execution.
Methods
SCOPE operates on a "Programming over Thinking" paradigm, dividing the planning process into two main offline stages to build a reusable solver, followed by an efficient inference stage:
- Stage I: Query-Specific Problem Reasoning: Using a single example query-answer pair, a Planning Agent extracts the core parameters into two categories: combinations (the variables defining the search space) and constraints (the rules to filter valid plans). A Solution Agent defines the target output structure. Optimization Agents then iteratively refine these parameters to eliminate redundancies and ambiguities.
- Stage II: Generic Solver Generation: Armed with the structured problem representation, a multi-agent pipeline synthesizes three distinct Python functions:
- Combination Function: Exhaustively enumerates the candidate plan space.
- Filter Function: Deterministically eliminates candidates that violate constraints.
- Deliver Function: Formats the valid plan back into a natural language response. An automated Solver Refinement loop tests these functions against the initial example, fixing any bugs before deployment.
- Stage III: Inference: When a new query arrives, SCOPE doesn't generate new code. Instead, an Input Agent simply extracts the query-specific parameter values (e.g., cities to visit, specific dates) and passes them directly into the pre-generated Python solver functions.
Datasets
The authors evaluated SCOPE across two highly challenging planning benchmarks:
- TravelPlanner: A real-world travel planning dataset requiring agents to formulate multi-day itineraries while balancing commonsense constraints (e.g., not visiting the same restaurant twice) and hard constraints (e.g., flight connectivity and budgets).
- Natural Plan: A natural-language planning benchmark from which the authors evaluated two distinct subsets: Trip Planning and Meeting Planning.
Key Insights and Ideas
- Shifting the LLM's Role: Instead of forcing the LLM to act as the executor of a plan (which it does poorly due to its probabilistic nature), SCOPE shifts the LLM's role to that of a programmer and parameter estimator.
- The Power of Reusability: By generating a domain-specific solver once, the framework capitalizes on the fact that while individual user queries change, the underlying logic of the problem domain remains identical.
- Robustness to Complexity: Because the core search and filtering are handled by deterministic Python code rather than autoregressive text generation, the system's performance remains stable even as the problem's combinatorial complexity scales up.
Key Results
SCOPE was tested across five state-of-the-art models (including GPT-5, GPT-o3, and Gemini-2.5-Pro) and consistently outperformed both text-based and solver-based baselines.
- Accuracy Gains: Using GPT-4o, SCOPE achieved a 93.1% success rate on TravelPlanner—a massive 61.6% absolute improvement over standard Chain-of-Thought (CoT).
- Efficiency Gains: On TravelPlanner, SCOPE cut inference costs by 1.4x and accelerated execution time by 4.67x compared to CoT.
- Scale and Complexity: As shown in the benchmarking experiments, baseline methods rapidly collapsed as the number of constraints and planning horizons increased, whereas SCOPE maintained a near-flat, highly robust success rate.
Limitations and Future Work
- Dependency on Coding Capabilities: SCOPE relies heavily on the underlying LLM's ability to generate valid code and adhere strictly to JSON formatting, meaning its performance may degrade significantly on weaker, open-source models.
- Domain Specificity: The generated solver functions are tightly coupled to a specific domain. If a user introduces a query from an entirely new domain, the system cannot adapt dynamically without running the entire offline solver-generation pipeline again.
- Domain Drift: The framework does not currently feature automatic detection for domain drift, which occurs when a query contains constraints that fall outside the structural specification of the pre-generated solver. The authors note that adaptive solver regeneration is a promising avenue for future research.
Summary updated