Back to discover
NewsBuild with AI

Roboflow routes images with an AI decision switch

The block combines an image question with a probability threshold to choose a workflow branch.

A landscape card floats in a glowing circular wall opening above two dark openings and a shelf holding a blank card.
CurioFuse · AI-generated illustration
In this article

Images and context

Roboflow's demonstration shows a block that sends each image to at most one workflow branch, using GPT-6 Luna. Authors define a question, possible actions and descriptions. They can also supply named contextual values: in the road-repair example, air temperature changes the selected treatment for the same pothole photograph. This is Roboflow's example, not our own field test.

What happens without a match

The implementation description distinguishes an uncertain answer from a failed request. The chosen option must meet the configured probability threshold; otherwise the default steps run. Refusals, invalid probabilities and the built-in unmatched option also use that fallback; an empty default ends the branch for that image. A failed API request instead fails the run. The switch exposes no outputs for later steps to inspect probabilities or token counts; the developer recommends the separate Decisions block with Switch Case for those outputs.

Answers are not actions

OpenAI's API guide explains that Decisions evaluates text, images or JSON and returns answers in predefined forms; the application executes the selected actions. A choice answer contains option probabilities and a separate confidence field. Clear option labels and descriptions matter because both are shown to the model. OpenAI recommends setting routing or review thresholds using labeled examples from the application and the costs of mistaken matches and missed matches. Those probabilities are model estimates, rather than guarantees that a chosen route is correct.

Sources(3)

Sources & standardsReport a correction