"Captain, sensors show nothing out there. Absolutely nothing."
"Sure is a damned ugly nothing."
Nagilum was a formless immortal being that lived outside the universe and could not be detected by Federation sensors. Its intelligence was described as "vast", such as that at first Deanna Troi could not discern it.
In 2365, Nagilum encountered the USS Enterprise-D in the Morgana Quadrant. It trapped the Enterprise within a "hole in space" and proceeded to test the Enterprise crew's reactions to various stimuli. Once Dr. Katherine Pulaski surmised that they were being experimented upon, Nagilum manifested a humanoid face to communicate with the crew.
Nagilum professed interest about the concept of a "limited existence", i.e. death, and killed the Enterprise conn officer Ensign Haskell to observe it. Further intrigued, it decided to thoroughly study this phenomenon, which would have cost the lives of one-third to one-half of the Enterprise crew. Rather than submit to the experiment, Captain Jean-Luc Picard activated the Enterprise auto-destruct, causing Nagilum to release the ship.
In a final conversation with Picard, Nagilum revealed that he had learned everything he needed. He judged Humanity as being aggressive and militant, obsessed with defying the inevitable and concluded that "as species, we have no common ground". He did agree with Picard that they perhaps shared the trait of curiosity. (TNG: "Where Silence Has Lease")