AI / Apache Burr Interview questions
Why should you tag actions instead of just using their names?
Tags act as an alias that can cover multiple actions at once, which a hardcoded name can’t do. If several different actions all produce something you want to display — say, text_response and image_response — you can tag them both response_to_display and then refer to that group collectively as @tag:response_to_display in halt_after/halt_before.
@action(reads=["..."], writes=["..."], tags=["response_to_display"]) def text_response(state: State, client: Client, prompt: str) -> State: ...
This decouples calling code from the exact set of action names in your graph: you can add a new action with the same tag later without updating every halting condition that references it by name. It is a lightweight way to keep application-level control flow logic from being tightly coupled to the internal shape of your graph.
More Related questions...