Retrieval adds a dependency on source quality. A direct calculation may need no document, while a policy answer without an authorized current source needs abstention. Choose the simplest evidence path that fits the task instead of making every feature query a vector index.
Return calculate for a calculation task, retrieve for a policy task with an authorized current source, and abstain otherwise. A missing source must not become a guessed policy answer.
The notebook executes your Python against an original local mock. Use the supplied case rather than copying visible values. The hidden checks change identities, revisions and boundary inputs; no provider endpoint or external tool is contacted.
An example implementation of the function contract.