Assistance dogs have a variety of purposes for people with a wide variety of medical conditions.
For example, this dog's name is Luna. Her owner has schizophrenia, and she helps him recognize hallucinations.
Luna is taught to greet people on command. If she does this, then the person is real. And if there is no one, the dog will simply sit still, letting the owner know that these are hallucinations