Template Catalog

Source: template_catalog.json

BALANCE

TemplateRequired argsDefaultsMetrics
fair_assignment tasks, workers, cost, task_load safe + fast {"fields": {"U": {"description": "Imbalance proxy variable if exposed by template.", "type": "number|null"}, "loads": {"description": "Per-worker load totals.", "type": "object"}, "max_load": {"type": "number|null"}, "min_load": {"type": "number|null"}, "spread": {"description": "max_load - min_load", "type": "number|null"}, "variance": {"type": "number|null"}}, "kind": "fair_assignment", "primary_fields": ["spread", "variance", "max_load"]}
load_balance items, bins, load, bin_capacity safe + fast {"fields": {"u": {"description": "Max utilization proxy if exposed by template.", "type": "number|null"}, "util": {"description": "Optional per-bin utilization variables (if exposed).", "type": "object|null"}}, "kind": "load_balance", "primary_fields": ["u"]}
quota_distribution items, groups, targets safe + fast {"fields": {"deviation": {"description": "Per-group deviation from targets.", "type": "object"}, "max_deviation": {"type": "number|null"}, "total_deviation": {"type": "number|null"}}, "kind": "quota_distribution", "primary_fields": ["total_deviation", "max_deviation"]}

CLUSTER

TemplateRequired argsDefaultsMetrics
k_medoids items, distance, k safe + fast {"fields": {"assignments": {"type": "object"}, "cluster_sizes": {"type": "object"}, "k": {"type": "integer|null"}, "medoids": {"type": "array[string]"}}, "kind": "k_medoids", "primary_fields": ["k", "cluster_sizes"]}
representatives items, distance, k safe + fast {"fields": {"assignments": {"type": "object"}, "cluster_sizes": {"type": "object"}, "k": {"type": "integer|null"}, "medoids": {"type": "array[string]"}}, "kind": "k_medoids", "primary_fields": ["k", "cluster_sizes"]}
size_bounded items, distance, k, min_size, max_size safe + fast {"fields": {"assignments": {"type": "object"}, "cluster_sizes": {"type": "object"}, "k": {"type": "integer|null"}, "medoids": {"type": "array[string]"}}, "kind": "k_medoids", "primary_fields": ["k", "cluster_sizes"]}

DECIDE

TemplateRequired argsDefaultsMetrics
choose_best candidates, scores safe + fast {"fields": {"chosen": {"type": "string|null"}, "selected": {"type": "array[string]"}, "selected_count": {"type": "integer"}}, "kind": "decide_selection", "primary_fields": ["chosen"]}
choose_under_budget candidates, scores, costs, budget safe + fast {"fields": {"chosen": {"type": "string|null"}, "selected": {"type": "array[string]"}, "selected_count": {"type": "integer"}}, "kind": "decide_selection", "primary_fields": ["chosen"]}
commit_only candidates safe + fast {"fields": {}, "kind": "commit_only", "primary_fields": []}

DETECT

TemplateRequired argsDefaultsMetrics
budgeted items, scores, costs, budget safe + fast {"fields": {"budget": {"type": "number|null"}, "selected": {"type": "array[string]"}, "selected_count": {"type": "integer"}, "spend": {"type": "number"}, "total_score": {"type": "number"}}, "kind": "budgeted", "primary_fields": ["selected_count", "spend"]}
coverage items, scores, covers, min_cover safe + fast {"fields": {"covered": {"type": "object"}, "covered_count": {"type": "integer"}, "selected": {"type": "array[string]"}, "selected_count": {"type": "integer"}, "total_score": {"type": "number"}, "unmet_count": {"type": "integer"}, "unmet_cover": {"type": "object"}}, "kind": "coverage", "primary_fields": ["unmet_count", "covered_count"]}
top_k items, scores, choose_k safe + fast {"fields": {"selected": {"type": "array[string]"}, "selected_count": {"type": "integer"}, "total_score": {"type": "number"}}, "kind": "detect", "primary_fields": ["selected_count", "total_score"]}

DISCOVER

TemplateRequired argsDefaultsMetrics
feature_selection features, scores, choose_k safe + fast {"fields": {"choose_k": {"type": "integer|null"}, "selected": {"type": "array[string]"}, "selected_count": {"type": "integer"}, "total_score": {"type": "number"}}, "kind": "feature_selection", "primary_fields": ["selected_count", "total_score"]}
rule_subset rules, scores, max_rules safe + fast {"fields": {"max_rules": {"type": "integer|null"}, "selected": {"type": "array[string]"}, "selected_count": {"type": "integer"}, "total_score": {"type": "number"}}, "kind": "rule_subset", "primary_fields": ["selected_count", "total_score"]}
sparse_subgraph edges, weights, choose_k safe + fast {"fields": {"choose_k": {"type": "integer|null"}, "selected_edge_count": {"type": "integer"}, "selected_edges": {"description": "Selected edges (as provided in args).", "type": "array"}, "total_weight": {"type": "number"}}, "kind": "sparse_subgraph", "primary_fields": ["selected_edge_count", "total_weight"]}

GENERATE

TemplateRequired argsDefaultsMetrics
diverse_solutions feasibility_program safe + fast {"fields": {"generation": {"type": "object"}, "selected_var_count": {"type": "integer|null"}, "selected_vars": {"type": "array[string]"}}, "kind": "generate", "primary_fields": ["selected_var_count"]}
feasible feasibility_program safe + fast {"fields": {"generation": {"type": "object"}, "selected_var_count": {"type": "integer|null"}, "selected_vars": {"type": "array[string]"}}, "kind": "generate", "primary_fields": ["selected_var_count"]}
seed_and_mutate feasibility_program, seed safe + fast {"fields": {"generation": {"type": "object"}, "selected_var_count": {"type": "integer|null"}, "selected_vars": {"type": "array[string]"}}, "kind": "generate", "primary_fields": ["selected_var_count"]}

MATCH

TemplateRequired argsDefaultsMetrics
best_of_many left, right, cost safe + fast {"fields": {"match_count": {"type": "integer"}, "matches": {"type": "array[tuple[string,string]]"}, "total_cost": {"type": "number"}}, "kind": "match_dqm", "primary_fields": ["match_count", "total_cost"]}
capacity_assignment left, right, cost, capacities safe + fast {"fields": {"pair_count": {"type": "integer"}, "pairs": {"type": "array[tuple[string,string]]"}, "total_cost": {"type": "number"}}, "kind": "match_capacity", "primary_fields": ["pair_count", "total_cost"]}
one_to_one left, right, cost safe + fast {"fields": {"match_count": {"type": "integer"}, "matches": {"type": "array[tuple[string,string]]"}, "total_cost": {"type": "number"}}, "kind": "match_dqm", "primary_fields": ["match_count", "total_cost"]}

OPTIMIZE

TemplateRequired argsDefaultsMetrics
assignment left, right, cost safe + fast {"fields": {"pair_count": {"type": "integer"}, "pairs": {"type": "array[tuple[string,string]]"}, "total_cost": {"type": "number"}}, "kind": "assignment", "primary_fields": ["pair_count", "total_cost"]}
binary_selection candidates, scores, choose_k safe + fast {"fields": {"choose_k": {"type": "integer|null"}, "selected": {"description": "Chosen items.", "type": "array[string]"}, "selected_count": {"type": "integer"}, "total_score": {"description": "Sum of selected item scores if provided.", "type": "number"}}, "kind": "binary_selection", "primary_fields": ["selected_count", "total_score"]}
knapsack items, values, weights, capacity safe + fast {"fields": {"capacity": {"type": "number|null"}, "selected": {"type": "array[string]"}, "selected_count": {"type": "integer"}, "total_value": {"type": "number"}, "total_weight": {"type": "number"}}, "kind": "knapsack", "primary_fields": ["total_value", "total_weight"]}
routing nodes, distance safe + fast {"fields": {"edge_count": {"type": "integer"}, "edges": {"type": "array[tuple[string,string]]"}, "route_cost": {"type": "number"}}, "kind": "routing", "primary_fields": ["edge_count", "route_cost"]}

PREDICT

TemplateRequired argsDefaultsMetrics
denoise_binary nodes, unary_cost, edges, smoothness safe + fast {"fields": {"assigned_count": {"type": "integer"}, "assignment": {"description": "node -\u003e {\u00270\u0027,\u00271\u0027}", "type": "object"}, "ones_count": {"type": "integer"}, "zeros_count": {"type": "integer"}}, "kind": "denoise_binary", "primary_fields": ["ones_count", "zeros_count"]}
graph_labeling nodes, labels, unary_cost safe + fast {"fields": {"assigned_count": {"type": "integer"}, "assignment": {"description": "node -\u003e label", "type": "object"}}, "kind": "graph_labeling", "primary_fields": ["assigned_count"]}
sequence_tagging tokens, labels, unary_cost, transition_cost safe + fast {"fields": {"assigned_count": {"type": "integer"}, "assignment": {"description": "token -\u003e label", "type": "object"}, "sequence": {"type": "array[string]"}, "switch_count": {"description": "Number of adjacent label changes.", "type": "integer"}}, "kind": "sequence_tagging", "primary_fields": ["assigned_count", "switch_count"]}

RANDOMIZE

TemplateRequired argsDefaultsMetrics
diverse_feasible base_program safe + fast {"fields": {"diversity": {"type": "object"}, "selected_var_count": {"type": "integer|null"}, "selected_vars": {"type": "array[string]"}}, "kind": "diverse_feasible", "primary_fields": ["selected_var_count"]}
feasible_assignment left, right safe + fast {"fields": {"pair_count": {"type": "integer"}, "pairs": {"type": "array[tuple[string,string]]"}}, "kind": "feasible_assignment", "primary_fields": ["pair_count"]}
quota_shuffle items, groups, targets safe + fast {"fields": {"assigned_count": {"type": "integer"}, "assignments": {"description": "item -\u003e group", "type": "object"}}, "kind": "quota_shuffle", "primary_fields": ["assigned_count"]}

SIMULATE

TemplateRequired argsDefaultsMetrics
robust_worst_case base_program, scenarios safe + fast {"fields": {"scenario_count": {"type": "integer"}, "selected_var_count": {"type": "integer|null"}, "selected_vars": {"type": "array[string]"}}, "kind": "simulate", "primary_fields": ["scenario_count"]}
scenario_sweep base_program, scenarios safe + fast {"fields": {"scenario_count": {"type": "integer"}, "selected_var_count": {"type": "integer|null"}, "selected_vars": {"description": "Heuristic: selected binary vars if present.", "type": "array[string]"}}, "kind": "simulate", "primary_fields": ["scenario_count"]}
what_if_grid base_program, scenarios safe + fast {"fields": {"scenario_count": {"type": "integer"}, "selected_var_count": {"type": "integer|null"}, "selected_vars": {"type": "array[string]"}}, "kind": "simulate", "primary_fields": ["scenario_count"]}

TREND

TemplateRequired argsDefaultsMetrics
changepoints timesteps, series, regime_values, change_penalty safe + fast {"fields": {"changepoint_count": {"type": "integer"}, "changepoints": {"type": "array[string]"}, "sequence": {"type": "array[string]"}}, "kind": "trend", "primary_fields": ["changepoint_count"]}
min_segment_length timesteps, regimes, emission_cost, transition_cost, switch_penalty safe + fast {"fields": {"changepoint_count": {"type": "integer"}, "changepoints": {"type": "array[string]"}, "sequence": {"type": "array[string]"}}, "kind": "trend", "primary_fields": ["changepoint_count"]}
regime_labeling timesteps, regimes, emission_cost, transition_cost safe + fast {"fields": {"changepoint_count": {"type": "integer"}, "changepoints": {"type": "array[string]"}, "sequence": {"type": "array[string]"}}, "kind": "trend", "primary_fields": ["changepoint_count"]}