AI Blueprints
上QQ阅读APP看书,第一时间看更新

AI isn't everything

"The passion caused by the great and sublime in nature, when those causes operate most powerfully, is astonishment; and astonishment is that state of the soul, in which all its motions are suspended, with some degree of horror. [...] When danger or pain press too nearly, they are incapable of giving any delight and are simply terrible; but at certain distances, and with certain modifications, they may be, and they are delightful, as we every day experience."

– Edmund Burke(Philosophical Enquiry into the Origin of our Ideas of the Sublime and the Beautiful, 1757)

Edmund Burke's careful study of the distinctions between what is aesthetically pleasing or beautiful versus what is compelling, astonishing, frightening, and sublime is an appropriate metaphor for the promises and the fears engendered by AI. At certain distances, that is, with the right design and careful deployment, AI has that quality that makes one marvel at the machine. If borne from a fear of being left behind or deployed haphazardly, if developed to solve a problem that does not exist, AI is a fool's game that can severely damage a company or brand.

Curiously, some of our top thinkers and entrepreneurs appear to be anxious about the careful balance between delight and horror. They have cautioned the world:

"Success in creating AI would be the biggest event in human history […] Unfortunately; it might also be the last."

– Stephen Hawking (https://futurism.com/hawking-creating-ai-could-be-the-biggest-event-in-the-history-of-our-civilization/)

"I think we should be very careful about artificial intelligence. If I were to guess at what our biggest existential threat is, it's probably that."

– Elon Musk (https://www.theguardian.com/technology/2014/oct/27/elon-musk-artificial-intelligence-ai-biggest-existential-threat)

"First the machines will do a lot of jobs for us and not be super intelligent. That should be positive if we manage it well. A few decades after that though the intelligence is strong enough to be a concern. I agree with Elon Musk and some others on this and don't understand why some people are not concerned."

– Bill Gates (https://www.reddit.com/r/IAmA/comments/2tzjp7/hi_reddit_im_bill_gates_and_im_back_for_my_third/co3r3g8/)

The fear of AI seems to be rooted in a fear of loss of control. Once the AI is "smart enough," it is thought that the AI will no longer obey our commands. Or it will make its own disastrous decisions and not inform us. Or it will hide critical information from us and make us subjects to its all-powerful will.

But these concerns may be flipped around to benefits: a smart AI can inform us of when we are making a bad decision and prevent embarrassments or catastrophes; it can automate tedious tasks such as making cold calls to open a sales channel; it can aggregate, summarize, and highlight just the right information from a deluge of data to help us make more informed and appropriate decisions. In short, good AI may be distinguished from bad AI by looking at its design, whether there are bugs or faults, its context of use in terms of correct inputs and sanity checks on its outputs, and the company's continuous evaluation methodology to keep track of the performance of the AI after it is deployed. This book aims to show readers how to build good AI by following these practices.

Although this book includes detailed discussion and code for a variety of AI techniques and use cases, the AI component of a larger system is usually very small. This book introduces planning and constraint solving, natural language processing (NLP), sentiment analysis, recommendation engines, anomaly detection, and neural networks. Each of these techniques is sufficiently exciting and complex to warrant textbooks, PhDs, and conferences dedicated to their elucidation and study. But they are a very small part of any deployed software system.

Consider the following diagram, showing some everyday concerns of a modern software developer:

Although probably the most interesting part of a project, the AI component is often the least troublesome part of software development. As we will see throughout this book, AI techniques are often contained in a single project module or class or function. The performance of the AI component depends almost entirely on the appropriateness of the inputs and correct handling and cleanup of the outputs.

For example, an AI component that determines the sentiment, positive or negative, of a tweet or product review is relatively straightforward to implement, particularly with today's AI software libraries (though the code in the library is quite complex). On the other hand, acquiring the tweets or reviews (likely involving authentication and rate limiting), formatting and cleaning the text (especially handling odd Unicode characters and emojis), and saving the output of sentiment analysis into a database for summarization and real-time visualization takes far more work than the "intelligent" part of the whole process.

But the AI is the most interesting part. Without it, there is no insight and no automation. And particularly in today's hyped environment with myriad tools and techniques and best practices, it is easy to get this part wrong. This book develops an AI workflow to help ensure success in building and deploying AI.