A citation is useful only if it points to evidence the application supplied. Checking whether an answer sounds plausible does not catch an invented source identifier. Validate membership and duplication separately, and make unknown citations visible to the acceptance decision rather than silently removing them.
Return citations from case.citations only when their ID appears in case.retrieved_ids. Deduplicate while preserving first appearance. Return accepted false if any supplied citation is unknown; do not hide a fabricated citation by dropping it silently.
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.