Skip to main content

pick_description

Function pick_description 

Source
fn pick_description(
    obj: &Map<String, Value>,
    path: &str,
    root_description: &str,
    synthesized: String,
) -> String
Expand description

Pick a node’s description, in priority order:

  1. the LLM’s own per-node description field when present and non-empty;
  2. the LLM’s tree label (rtdl_description) for an otherwise-unlabelled root;
  3. a synthesized fallback (e.g. call camera_snapshot).

The model is asked to author a node-level description for every node (see rtdl_protocol.md); the fallbacks keep a sloppy or older reply from failing the turn, since executor’s validate_plan requires a non-empty description.