You're supposed to cite prior art in the patent application and describe how your patent is novel compared to that prior art. Now, as I understand, there will be a process after the patent is granted for the public to invalidate a patent.
However, knowing how the PTO works, I believe they will simply shift more responsibility onto the public review phase in order to avoid work. They are 700,000 filings behind, after all.
If you know of relevant prior art, you're supposed to disclose it. There's no requirement to go do a search, and there's also no requirement to compare your work to the prior art. People do it sometimes, because it might help the examiner understand the novel points, and because it's considered good style. But there's no requirement to do anything more than simply disclose the prior art references you happen to be aware of.
Wait, how does it do this? And what onus was there under the previous law for a patent filer to locate prior art? (Hint: none.)