Decision models are gaining attention as a new kind of AI: you give the model context and a set of options, and it picks one. Trained specifically for this task, they can do it much faster and cheaper than an LLM. In practice, a hybrid workflow is a good place to start. The decision model handles closed-ended selections where the options are already known, the LLM handles open-ended parts that must be reasoned out or generated from scratch, and Python ties everything together by managing the workflow and executing operations.
This post walks through building a browser automation workflow. After receiving a travel request in natural language, the workflow navigates a hotel-search website, selects a suitable hotel, and prepares an inquiry. Browser automation is one of the most practical uses of LLMs, since an LLM that can operate a browser can reach almost anything a person can. Tasks such as reading pages, clicking buttons, choosing dropdown options, and filling out forms fall into three categories: closed-ended selection, open-ended generation, and orchestration.
The division of labor follows naturally from these categories. The decision model picks from options already on the page, such as a date in a calendar or the next action to take, such as opening the calendar or submitting a form. The LLM writes messages and explanations. Python gathers information from the website, prepares it for the models, takes their responses, and performs the browser operations.
The result is a repeating cycle: read the page, let the decision model choose the next action, and call the LLM only when generated text is needed. The example also measures whether using a decision model makes the workflow faster than relying on an LLM for every step.
Source: Towards Data Science · Summarized by HeadlinesBriefing