stanford-oval/storm · error · ValueError

Child node with name {node_name} not found.

Error message

Child node with name {node_name} not found.

What it means

During layer-by-layer navigation, an action 'step: <node_name>' instructs the module to descend into a child node, but no child of the current node has that name, so it raises ValueError.

Source

Thrown at knowledge_storm/collaborative_storm/modules/information_insertion_module.py:135

        while True:
            action_type, node_name = self._get_navigation_choice(
                knowledge_node=current_node, question=question, query=query
            )
            if action_type == "insert":
                return dspy.Prediction(
                    information_placement=" -> ".join(
                        current_node.get_path_from_root(root)
                    ),
                    note="None",
                )
            elif action_type == "step":
                for child in current_node.children:
                    if child.name == node_name:
                        current_node = child
                        break
                else:
                    raise ValueError(f"Child node with name {node_name} not found.")
            elif action_type == "create":
                placement_path = current_node.get_path_from_root(root)
                if allow_create_new_node:
                    placement_path.append(node_name)
                    note = f"create new node: {{{node_name}}} under {{{current_node.name}}}"
                else:
                    note = f"attempt to create new node: {{{node_name}}} under {{{current_node.name}}}"
                return dspy.Prediction(
                    information_placement=" -> ".join(placement_path), note=note
                )
            else:
                raise ValueError(f"Unknown action type: {action_type}")

    def _get_sorted_embed_sim_section(
        self,
        encoded_outline: np.ndarray,
        outlines: List[str],
        question: str,

View on GitHub (pinned to fb951af774)

Solutions

  1. Normalize names (strip/casefold) when comparing before calling, or sanitize the LLM's node_name against current_node.children names
  2. Retry the navigation decision so the LLM sees the error and corrects itself
  3. Catch this ValueError and treat it as 'create' (or root placement) as a fallback

Example fix

# before
result = module.layer_by_layer_navigation_placement(kb, q, info)

# after
try:
    result = module.layer_by_layer_navigation_placement(kb, q, info)
except ValueError:
    result = module.layer_by_layer_navigation_placement(kb, q, info)  # retry with error context
Defensive patterns

Strategy: try-catch

Validate before calling

names = {c.name.strip().lower() for c in current_node.children}
assert node_name.strip().lower() in names, f'unknown child {node_name}'

Type guard

def child_exists(node, name) -> bool:
    return any(c.name == name for c in node.children)

Try / catch

try:
    result = module.layer_by_layer_navigation_placement(kb, q, info)
except ValueError as e:
    if 'not found' in str(e):
        result = retry_or_default_placement()
    else:
        raise

Prevention

When it happens

Trigger: Calling layer_by_layer_navigation_placement (via process_intent) when the LM emits a step to a node name that doesn't exist under the current node — often due to case/whitespace differences or hallucinated node names.

Common situations: LLM hallucinates or slightly misspells a node name from the outline, or the knowledge base changed between prompt construction and action execution.

Related errors


AI-assisted analysis of stanford-oval/storm@fb951af774 (2026-08-28). Data as JSON: /api/errors/a5789f4eb2053057. Report an issue: GitHub.