## Diagram: Route Planning with LLM and Different Layers
### Overview
The image presents a diagram illustrating how a Large Language Model (LLM) can be used to plan a route from London to Manchester by car, avoiding toll roads. It shows three different approaches or layers: Symbolic Layer, Formal Methods Layer, and Action Schema Layer. Each approach takes the same input and processes it through the LLM, but then uses a different method to represent and reason about the route.
### Components/Axes
* **Input:** The input is the same for all three approaches: "Plan a route from London to Manchester by car, avoiding toll roads."
* **LLM:** A light blue icon representing a brain, labeled "LLM," processes the input.
* **Output Representations:** Each approach has a different output representation:
* **Symbolic Layer:** Uses a symbolic representation with predicates like `route`, `Vsegment`, and `ThasTol`.
* **Formal Methods Layer:** Uses a specification language with variables, invariants, and set membership.
* **Action Schema Layer:** Uses action schemas with preconditions and effects.
* **Layers:** The bottom row labels the three approaches: "Symbolic Layer," "Formal Methods Layer," and "Action Schema Layer."
### Detailed Analysis
**Left Column: Symbolic Layer**
* **Input:** "Plan a route from London to Manchester by car, avoiding toll roads"
* **LLM:** Processes the input.
* **Symbolic Representation:**
* `∃route(start="London", end="Manchester", mode="car") ^`
* `Vsegment(route)`
* `ThasTol(segment)`
* **Layer:** Symbolic Layer
**Middle Column: Formal Methods Layer**
* **Input:** "Plan a route from London to Manchester by car, avoiding toll roads"
* **LLM:** Processes the input.
* **Formal Specification:**
* `spec Route {`
* `var start, end: City var mode: TransportMode invariant`
* `Vs ∈ segments: StYRe*`
* `JolRead }`
* **Layer:** Formal Methods Layer
**Right Column: Action Schema Layer**
* **Input:** "Plan a route from London to Manchester by car, avoiding toll roads"
* **LLM:** Processes the input.
* **Action Schema:**
* `faction drive parameters (?from ?to-city)`
* `precondition (and (at ?from) (road ?from ?to) (not (toll-road ?from ?to)))`
* `effect (and (not (at ?from)) (at`
* **Layer:** Action Schema Layer
### Key Observations
* All three approaches start with the same natural language input and use an LLM to process it.
* The key difference lies in how the output is represented and reasoned about.
* The Symbolic Layer uses predicates, the Formal Methods Layer uses a specification language, and the Action Schema Layer uses action schemas.
### Interpretation
The diagram illustrates different ways to integrate an LLM with formal reasoning techniques for route planning. Each layer represents a different level of abstraction and formalism. The Symbolic Layer provides a high-level symbolic representation, while the Formal Methods Layer offers a more rigorous specification. The Action Schema Layer focuses on the actions and their effects.
The choice of layer depends on the specific requirements of the application. If high-level reasoning is sufficient, the Symbolic Layer may be appropriate. If formal verification is required, the Formal Methods Layer would be more suitable. If the focus is on planning and execution, the Action Schema Layer would be the best choice. The diagram highlights the flexibility of using LLMs in conjunction with different formal methods to solve complex problems.