eta.core.planning.merge_plan_steps
- merge_plan_steps(plan, ds)[source]
Merge steps in the plan that are equivalent or unifiable.
- Parameters:
plan (PlanNode or None) – The plan to expand (if one exists).
ds (DialogueState) –
- Returns:
The updated plan, if successful.
- Return type:
PlanNode or None
Notes
TODO: the behavior of this function is currently hard-coded to merge directly adjacent reply-to steps in the plan. It should be generalized using a transducer that maps a plan to a new plan with merged steps, possibly making use of retrieved equivalency knowledge (allowing for, e.g., a neural network or LLM to potentially perform this step instead).