AI / Apache Burr Interview questions
What is the difference between halt_before and halt_after?
Both parameters tell run/iterate/step when to stop, but at opposite points relative to the named action:
| Parameter | Stops | Result returned |
halt_after | After the named action has already run | The action’s actual result |
halt_before | Right before the named action would run | None, since it hasn’t executed yet |
action, result, state = application.run( halt_after=["final_action_1", "final_action_2"] )
halt_before is what enables human-in-the-loop pauses: the application stops just short of an action (like one waiting on user input), hands control back to your code, and can be resumed later with fresh inputs. If both are specified and multiple conditions could apply, Burr stops at whichever is encountered first.
More Related questions...