Depending upon whether I think they can take a leading role, I will ask them some hard open-ended NLP or ML puzzles over email. I will also do a skype screen going over a breadth of technical questions.
If I do want to work with someone, I send them a standard contractor agreement. It include a variety of clauses, including an NDA, as well as terms governing ownership of the code and IP developed, the payment schedule, etc. The NDA is extended to cover all NDAs that I sign on behalf of MetaOptimize, i.e. if MetaOptimize is working for client Foo, and you're working for MetaOptimize, then you are also bound by the Foo NDA agreement.
But a contract is only as good as the parties signing it, so to a certain extent I have to rely upon references and my gut to see if I trust the worker.
Does that answer your question?