This could be at the document level, so that whenever you use 'mention a task' by default it filters to the documents relevant lists/folders/spaces. This would be great for meeting minutes where multiple projects are discussed, as they could be 'linked' or specified beforehand to improve the 'mention a task' experience. The relevant folder/space could default to the parent folder/space that contains the document. I believe you would need to allow multiple relevant lists/folders/spaces to accommodate documents that may span multiple projects.
Alternatively, this could be achieved with a drop-down to select a list/folder/space within the 'mention a task' menu. By selecting an option in the drop-down, it could filter the shown tasks. If this is also persisted between 'mention a task' menu opens then it could drastically reduce the overhead of looking through tasks to ensure they are from the correct list/folder/space.