AI / Apache Burr Interview questions
What is the difference between binding a value to an action and passing it as a runtime input?
Both fill in a parameter an action needs beyond state, but at different times and for different reasons:
| Approach | When set | Good for |
action.bind(param=value) | At application build time | Stable dependencies: API clients, DB connections, fixed model names |
inputs={"param": value} | At call time, per run/step call | Values that change per invocation: user prompts, human answers |
# bound once at build time app = ApplicationBuilder().with_actions( my_action=my_action.bind(client=client) )... # passed fresh on every call app.run(inputs={"prompt": "this changes every time"})
Mixing them up leads to two common bugs: binding a value that should vary (so every call reuses stale data), or forgetting to bind a value that never changes (forcing every caller to pass it manually).
More Related questions...