task_graph__metro__shortest_path_length¶
Summary¶
- Domain:
graph - Scene id:
metro - Task id:
task_graph__metro__shortest_path_length - Objective: count route segments in the unique shortest station path between two labeled stations.
- Implementation:
src/trace_tasks/tasks/graph/metro/shortest_path_length.py.
Query IDs¶
- Supported
query_idvalues:single. - Internal prompt key:
metro_shortest_path_length. - Public sampling is at the task-id level.
Taxonomy Contract¶
- Program contract: find the unique shortest station path between the named source and goal, then output its route-segment length.
- Answer schema:
integer. - Annotation schema:
point_sequence. - Path length target, route count, station labels, route colors, style, font, background, and layout jitter are generation/render metadata, not public query branches.
Program Contract¶
Program: length(unique_shortest_station_path(source, goal)); output=integer; annotation=point_sequence(path_station_centers_after_source_in_order); scene=metro; scope=shortest_path_length
Candidate set: the visible graph, tree, network, route, matrix, table, node, edge, label, weight, path, and option elements inside the shortest_path_length objective scope.
Operands: visible scene state and prompt-bound operands named by unique_shortest_station_path, source, goal, path_station_centers_after_source_in_order, metro, shortest_path_length.
Operation: evaluate length over the candidate set using the visible graph structure, labels, weights, directions, reachability, paths, connectivity, or option-selection constraints encoded in the program expression; generation enforces a unique final answer.
Output binding: answer uses the integer schema; generation binds a unique final answer.
Annotation witnesses: annotation uses the point_sequence schema; the prompt/annotation contract defines the minimal visual witnesses.
Query ids: single.
Reasoning Operations¶
Families: counting, ranking, topology
Answer And Annotation¶
- Answer type:
integer. - Annotation type:
point_sequence. - Annotation marks the ordered station-center points along the unique shortest path after the source station, including the goal station.
answer == len(annotation), and both come from the same finalized metro-route graph.
Rendering Contract¶
- The scene shows a labeled metro route map with colored routes and station nodes.
- Visual style, fonts, panel treatment, layout jitter, context text, and post-render noise are non-semantic and recorded in trace metadata.
- Annotation projection is computed after final layout and style placement.
Prompt Contract¶
- Prompt text comes from
src/trace_tasks/resources/prompts/graph/metro/graph_metro_v1.json. scene_key:metro_route_map.task_key:metro_route_query.query_key:metro_shortest_path_length.- Answer mode emits
{"answer": ...}. - Answer-and-annotation mode emits
{"annotation": ..., "answer": ...}withannotationmatching thepoint_sequenceschema.