Found in 2 comments on Hacker News
nabla9 · 2017-10-08 · Original thread
Stanislav Lem's Golem XIV published in his book Imaginary Magnitude https://www.amazon.com/Imaginary-Magnitude-Stanislaw-Lem/dp/...

It might be more philosophy of AI than science fiction. It takes form of series of lectures that superintelligent (singularity level AI) gives to humanity before it goes away.

Fresh book recommendations delivered straight to your inbox every Thursday.