Explore 1.5M+ audiobooks & ebooks free for days

Only $12.99 CAD/month after trial. Cancel anytime.

Think Artificial Intelligence: A Student’s Guide to AI’s Building Blocks
Think Artificial Intelligence: A Student’s Guide to AI’s Building Blocks
Think Artificial Intelligence: A Student’s Guide to AI’s Building Blocks
Ebook419 pages4 hours

Think Artificial Intelligence: A Student’s Guide to AI’s Building Blocks

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Jerry Cuomo's unique story-telling style and accompanying illustrations makes it a breeze to be an A+ student in his virtual AI class. "Think Artificial Intelligence" offers an entertaining and balanced education of AI's building blocks and the personalities putting them into play. The book explores the fundamentals of AI, data curation, machine learning, prompt engineering, AI app development, ethics, and cybersecurity. Real stories and technical examples demonstrate AI's impact on jobs, society, and technology while emphasizing trust, creativity, and ethical use. Jerry incorporated GenAI into his writing toolkit for creating the book's images and code samples and openly shared his 100+ GenAI prompts and techniques, making his approach a teaching tool for readers.
The central theme of the book is the indispensable role of trust in fostering collaboration between human emotional intelligence, creativity, and AI's pattern detection—analytical power—enabling the achievement of extraordinary outcomes. Jerry introduces a unique narrative approach in the book, weaving together insights from real-world experts and imaginative characters, such as Pato.AI, a fine-tuned chatbot, and Datos, a complex data pile. This blend of authentic interviews and creative personas enriches the subject matter with both depth and a touch of whimsy, offering readers fresh perspectives in an engaging way. Readers will discover invaluable resources in the provided Python scripts and datasets, enhancing the learning experience. Business or technical, the topics covered in this book will prove valuable to just about anyone curious and ready to become a scholar of AI.
Royalties from this book are being donated to the St. Jude Children's Research Hospital.
LanguageEnglish
PublisherBookBaby
Release dateAug 1, 2024
ISBN9798350963663
Think Artificial Intelligence: A Student’s Guide to AI’s Building Blocks
Author

Jerry Cuomo

Gennaro (Jerry) Cuomo holds the prestigious title of IBM Fellow and has been instrumental in shaping IBM's technology landscape since 1987. Among his significant achievements, Cuomo played a critical role in developing IBM's WebSphere Software. His innovative work helped establish WebSphere as a top-tier application server, serving over 80,000 customers in various industries. As an inventor, Cuomo has more than 80 US patents to his name, including the familiar "Someone is typing…" indicator used billions of times a day across all major instant messaging applications. His expertise in this area also led him to testify to the US government about the potential of digital currency and blockchain for enhancing identity protection and national security. He enjoys playing golf and drinking craft beer—not at the same time—with his friends, best friend, and wife Steph. He also enjoys walking his dogs and playing bass guitar in the band Mind the Gap.

Related to Think Artificial Intelligence

Related ebooks

Technology & Engineering For You

View More

Related categories

Reviews for Think Artificial Intelligence

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Think Artificial Intelligence - Jerry Cuomo

    Cover of Think Artificial Intelligence by Jerry Cuomo

    COPYRIGHT

    Think Artificial Intelligence copyright.

    You may reproduce these publications for your personal, non-commercial use provided that all proprietary notices are preserved. However, you may neither distribute or display these publications publicly nor make derivative works of them, or any portion thereof, without the express consent of Gennaro (Jerry) Cuomo.

    If you have any questions regarding this copyright material, and for information about buying this title in bulk quantities, or for special sales opportunities (which may include customized versions of this title), send an e-mail to us at [email protected]

    ISBN: 979-8-35096-007-5

    DEDICATIONS

    To: All those inspiring figures at IBM who have shared their wisdom and spirit over 37+ remarkable years. Your trust, encouragement, and humor have profoundly shaped my path, truly embodying the THINK philosophy. My heartfelt thanks for guiding this wild duck’s flight.

    To: Those dedicated to transforming lives through education, inspiration, and opportunity: profits from this book are being donated to the St. Jude Children’s Research Hospital.

    Table of Contents

    Preface

    Chapter 1 – CAN MACHINES THINK… WITH US?

    Chapter 2 – AI Evolution

    Chapter 3 – True AI Stories: Act One

    Chapter 4 – AI Lingo

    Chapter 5 – Prompting AI

    Chapter 6 – Data Curating

    Chapter 7 – Machine Learning

    Chapter 8 – Developing AI Apps

    Chapter 9 – Governing Ethics and Security

    Chapter 10 – True AI Stories: Act Two

    Chapter 11 – CIAO

    Acknowledgements

    References

    Preface

    Business or technical, the topics covered in this book will prove valuable to anyone curious about and ready to become a scholar of artificial intelligence.

    Who is this book for?

    When provided with a digital copy of this book and asked about its target audience, AI offers a well-founded response.

    You might have heard I’m a lecturer at North Carolina State University, teaching CSC 297 - Cybersecurity Topics: Blockchain. Last semester, one of my students, Levi, gave me a thank you card that blew me away. He wrote:

    Professor Cuomo, thank you so much for being such a great teacher. I really appreciate your enthusiasm and teaching style, and I have learned so much from this class. Thank you once again. God Bless, Levi.

    Receiving this card made my day. I mean, how can you not want to do more of this? It just spurred me on to do it again.

    After a brief chat with my wife and the department head at NC State, I chose to replicate the approach I used for my class’s textbook, Think Blockchain, but now with a focus on AI, which is my 24/7 focus these days. And that’s how Think Artificial Intelligence came about.

    Also, THINK has been IBM’s slogan for multiple generations, so what’s not to like about thinking and being thoughtful about AI? (PS. I’m also fond of North Carolina State’s spin on THINK with its Think and Do slogan. At the same time, it’s a bit clunky for a book title. Smile!)

    Like Think Blockchain, Think Artificial Intelligence is a practical guide to AI for all who are curious about the building blocks of AI and the personalities that put them into play.

    If you’re considering a career in AI, these fundamentals are crucial, whether you’re aiming for a degree or your next job. With AI skills increasingly sought after and salaries for AI roles surging recently, this trend is well illustrated by a Yahoo! Finance article, "AI tech jobs are popping up and the salaries are huge," which highlights:

    The AI boom is trickling into the job market, and the pay is good if you can get it.

    Netflix recently posted a position paying as much as $900,000 for someone with extensive experience working with machine learning platforms… "AI is the new Wall Street, NYU Professor Vasant Dhar says. Now it is Big Tech that is making big money; these are the new cash machines. The future is all about intelligence. There isn’t enough supply of really good people."¹

    The primary intent of Think Artificial Intelligence is to provide an entertaining and balanced education on the basic building blocks of AI, including data curation fundamentals, machine learning and training, AI application development, prompt engineering, ethical governance, and cybersecurity.

    The book is filled with over one hundred AI-generated images and figures – a fitting choice for a book on AI. Each image is not just for show; they serve as educational tools, accompanied by specific instructions, called prompts, to guide the AI model in creating them. (In this case of image creation, I use OpenAI’s DALL-E2). I’ve adopted a more narrative style of writing, weaving stories from the viewpoints of AI practitioners, both real and imagined. Through these tales, you’ll get a taste of their jargon and see how AI technology fits into their daily lives. Adding a twist, you’ll also encounter anthropomorphized AI building blocks (e.g., Pato, the fine-tuned AI model), offering insights from their perspective on how they function and the best ways to utilize them.

    The book combines both an aspirational and pragmatic overview of AI technology, its core capabilities, and the value it generates from a technical and business perspective. It describes real-world examples, implementations, and approaches with industry-specific and cross-industry use cases.

    Developers will benefit from this book as many of the chapters are technical in nature. Several even explore simple coding examples to crystallize topics like crafting effective prompts, interacting with AI models, and orchestrating workflows with autonomous agents. The chapters are arranged to progressively get more technical, usually starting with basic education and then moving on to examples, so hang tight, developers—we’ll get to those samples soon.

    Business leaders will equally benefit and are provided with a basis for understanding and evaluating how AI technology can transform their organization and business processes. I encourage business leaders to explore the coding examples. They won’t bite and might better illustrate what makes AI tick.

    To strike a happy medium, I present code as pseudocode, organized in a way that balances business and development audiences well. So, business or technical, the topics covered in this book will prove valuable to just about anyone curious and ready to become a scholar of AI.

    What is Covered in This Book?

    My goal is to cover all the essential topics necessary to thoroughly comprehend AI’s building blocks, as viewed through the experiences of everyday people who design, create, use, and oversee AI.

    If you’re already familiar with the basics, the early chapters will help solidify your grasp of key concepts and show you how they’re used in everyday situations. As you read on, you will be systematically introduced to specific topics with details and hands-on exercises that will enable you to implement solutions that leverage AI successfully.

    Feel free to jump directly to the chapter that impacts your current role and answers your most immediate questions. Depending on your experience level or organizational role, you will also find references for further study throughout the chapters to fill in gaps or provide more detail.

    What follows is a sneak peek of each chapter in the book.

    Chapter One – Can Machines Think… With Us?

    Do Androids Dream of Electric Sheep? From a young age, this book-inspired question has driven my curiosity about AI ethics and the exploration of human-robot relationships and consciousness. In Chapter One, I recount the beginning of my fascination with AI, sparked by a 1982 IBM PC, where coding in BASIC became my way of speaking in a unique language made of pixels and logic. My evolution from simple game algorithms to advanced augmented intelligence in business highlights that trust, transparency, and ethics are vital to our relationship with technology. These experiences shape the book’s thesis: AI isn’t about replacing humans but enhancing and extending our capabilities, akin to an auto-assist for everyday life. However, the adoption of such assistance hinges on trust. Building trust in AI is what we strive for because when humans and AI collaborate with trust, the sky’s the limit.

    Chapter Two – AI Evolution

    It’s Like Having Einstein as Your Brainy Sidekick. In Chapter Two, we explore the fascinating evolution of artificial intelligence, beginning by looking back at ancient Greek mythology, where early ideas of intelligent machines were imagined, highlighting a long-standing human aspiration to create technology as partners. We present a converged definition of AI as a multidisciplinary field focused on creating intelligent machines capable of human-like, rational, and ethically guided decision-making in collaboration with human creativity. The narrative then shifts to categorize AI into weak and strong forms, with an in-depth look at machine learning and deep learning. This section highlights their distinct roles, applications, and the importance of enabling AI to emulate human learning and adaptability. We explore AI’s Netscape moment, marked by ChatGPT’s introduction, which democratizes AI accessibility, mirroring Netscape’s impact on internet adoption. It concludes by thoughtfully addressing and dispelling popular AI myths, thus clarifying misunderstandings and accentuating AI’s capabilities and limitations.

    Chapter Three – True AI Stories: Act One

    Ordering Up AI Precision While Sipping on Carrot-Coded Smoothies. These stories are genuine, just like the people in them, showing how AI turns everyday experiences into extraordinary ones. In Chapter Three, I conduct my first set of interviews with two world-class AI experts. Brian Langner emphasizes AI’s crucial role in automating order-taking processes at drive-thrus, even amidst noisy environments. Utilizing advanced natural language processing, AI skillfully handles various languages, dialects, and a range of menu options. Following this, Ruchir Puri discusses AI’s significant impact on software development. He emphasizes AI’s strengths in understanding programming languages, modernizing outdated code, and managing data governance, illustrating its influence in the technical realm. A central theme of these interviews is the growing trust in AI, evident in both social and technological contexts. These conversations highlight how AI is reshaping our world, streamlining everyday tasks, and redefining everything from customer interactions to software development.

    Chapter Four – AI Lingo

    On the job with Jane, Miguel, and Ernestine. Miguel: Hey, did you hear Llama2 70B ran rings around Flan UL2, crushing its SQuAD score? Ernestine: Wow, I bet it performs well at zero-shot. Curious about this conversation? Chapter Four shifts from real-life stories to a contrived tale designed to explore AI terminology. Here, you’re introduced to three professionals: Jane, a Data Engineer; Miguel, a Data Scientist; and Ernestine, a Prompt Engineer. Their experiences in a day-in-the-life narrative help demystify AI terms, making them accessible and memorable. This chapter acts as a unique glossary, introducing AI jargon through a team’s collaboration on a sustainability chatbot. It aims to familiarize you with the terms and their context in the AI lifecycle. Enjoy their story, and don’t worry about the abundance of new terms – they’ll reappear throughout the book.

    Chapter Five – Prompting AI

    Prompt engineering can feel like wrestling a robotic alligator, begins Chapter Five, introducing us to Pato.AI, a chatbot fine-tuned for environmental sustainability, developed on the Falcon-40b-instruct LLM. Pato, brought to life by AI experts from the previous chapter, offers an insider’s insight into the intricacies and rewards of prompt engineering. This chatbot sheds light on what happens inside its system when generating responses, emphasizing the need for well-crafted prompts to promote the best AI interaction. The chapter covers various prompting techniques such as zero-shot, one-shot, few-shot, and iterative prompting, each aimed at refining the accuracy of AI responses. Additionally, it introduces specialized methods like chain-of-thought, personality-centric and green-red prompting for more tailored AI responses. Focusing on the important role of token budgets in AI, the chapter wraps up by projecting the future of prompt engineering, emphasizing the potential of automated techniques and adaptive learning in advancing AI interaction.

    Chapter Six – Data Curating

    The ‘garbage in, garbage out’ principle is a hard truth. First, there was Pato (‘P’ for Prompting). Next, you’ll meet Datos (‘D’ for Data), a diverse and complex data pile. Chapter Six sheds light on the essentials of data curation, emphasizing the challenges in handling large, unstructured data sets. It presents a straightforward, step-by-step approach to data curation, underscoring the significance of organizing, processing, and extracting valuable insights from data. Practical code examples are provided, demonstrating effective methods for data curation across various scenarios. We also spotlight the transformative role of GenAI in data engineering. GenAI is illustrated as a tool that enhances the data curation process, automating routine tasks and enabling engineers to focus on more intricate aspects. This advancement significantly boosts the efficiency and efficacy of data management.

    Chapter Seven – Machine Learning

    An Autobot’s Attention is All You Need. Now, it’s Tess’s turn, not your typical robot-in-disguise transformer, to steer the discussion in Chapter Seven, focusing on the key elements of machine learning. This example-heavy chapter illustrates concepts like supervised learning with climate sentiment analysis using BERT, showcasing its predictive power. Unsupervised learning is exemplified by clustering electric vehicles to uncover trends in technology. We also touch on reinforcement learning through interactive environments like the Lunar Lander simulation, illustrating learning via trial and error, and self-supervised learning by predicting missing words and demonstrating learning from incomplete data. It emphasizes practical applications of machine learning techniques in real-world scenarios, providing concrete examples of how each method contributes to understanding and leveraging data for insightful outcomes.

    Chapter Eight – Developing AI Apps

    Unleashing Autonomous Agents That Not Only Think but Also Do. In Chapter Eight, Archie, an abstraction, introduces you to AI app development, highlighting essential abstractions from prompts to autonomous agents. These concepts enable developers to build robust AI solutions without needing to fret over the inner workings of AI. Through the exploration of Langchain, an open-source project, you’re shown how to apply these ideas in real-world scenarios. The discussion covers crafting effective prompts, wise dataset utilization, and employing RAG techniques for simplifying complex documents, including legal texts. It also explores chains for streamlining workflows and agents for task automation with autonomy. Archie stresses the importance of ethical practices and security measures in AI development, aiming for applications that are not just effective but also safe and reliable. While agents’ capabilities may seem almost magical, indispensable human oversight is crucial for verifying accuracy and ensuring the trustworthiness and quality of AI-generated responses.

    Chapter Nine – Governing Ethics & Security

    When in doubt, start by treating AI with the same common sense as any online service. The focus shifts in Chapter Nine to the critical aspects of AI’s ethical use and cybersecurity. With insights from Xander, the lead AI exploiter, you’re guided through the essentials of AI security, from understanding vulnerabilities to implementing robust defenses. Topics such as prompt injection, data access controls, and the mitigation of AI hallucinations are explored in depth. We also investigate global AI governance, showcasing how different world regions approach the regulation of AI to promote its safe and ethical deployment. The importance of human oversight, the role of compact AI models in reducing environmental impact, and strategies for minimizing AI’s carbon footprint are highlighted. Join Xander and her once-malicious team as they switch to the side of good, sharing their dos and don’ts for AI ethics and security.

    Chapter Ten – True AI Stories: Act Two

    Sailing the Seas and Chatting with Carebots in Hungarian. In Act Two, we resume our real-world interviews of AI’s impact through the insights of Don Scott and Eniko Rozsa. Don begins Chapter Ten by discussing the Mayflower Autonomous Ship, highlighting its automated operations that utilize a hybrid AI model for precise navigation and hazard identification. He underscores the importance of regulatory compliance and trust in AI, detailing how expert maritime knowledge is translated into executable AI rules. Meanwhile, Eniko discusses the role of generative AI in customer care. Implementing this AI in customer support bots has led to more personalized and contextually aware interactions, achieving significant efficiencies and cost savings. Key to its success is the adaptability of language models, proficiency in complex languages like Hungarian, and a commitment to responsible AI development, ensuring data privacy, security, and transparency.

    Chapter Eleven – Ciao (and Key Takeaways)

    The final chapter of Think Artificial Intelligence (Should I be concerned that the final chapter is Chapter Eleven? Smile.) acts as a parting note, offering insights on preparing for AI job interviews, summarizing key takeaways from our discussions, and inviting you to stay connected. We stage mock interviews for roles like prompt engineer, data engineer, and data scientist, providing questions and advice to navigate these opportunities confidently. The takeaways underscore the significance of building trust between humans and AI and the transformative impact of Generative AI. Please reach out via LinkedIn or email, explore our GitHub repository, and possibly join me in an upcoming university course based on this book. It’s a soft farewell with an open invitation to continue our exploration of AI together.

    Addendum

    As a prelude to writing this book, I warmed up with the Think AI article series on Medium.com over the last year or so. Some pieces found their way into the book, while others didn’t quite make the cut. However, I thought it only fair to give all the articles a shot in the spotlight, even if it meant slotting them into an addendum. Please take a moment to check them out. Training AI to Forget... is among my favorites – I hope you get a kick out of it too.

    AI Usage In The Creation Of This Book

    As MS Word is a go-to tool in my book writing toolkit, I added various generative AI models, chatbots, and Python scripts to enhance the book’s development process. Among the tools at my disposal were my monthly subscription to ChatGPT and the variable charges associated with using the OpenAI APIs within my Python examples. Additionally, I accessed a broad spectrum of open-source models through the watsonx.ai service facilitated by IBM Consulting Assistants. This tool offered responsible access to various generative AI features, enabling chat-based interactions with multiple models and documents.

    Throughout the writing process, whenever I used AI, I made a concerted effort to maintain transparency by documenting the prompts used for a wide variety of content generation. You’ll see that most figures in the book have a prompt instead of a title caption; such prompts are the directives used to create those figures, acting as a teaching tool. For instance:

    Prompt: ... Jerry, the happy wild duck humanoid, typing this prompt on his MacBook.

    The ‘...’ indicates that additional instructions related to the content type—in this case, images—were included when I issued this prompt. These instructions might cover aspects like style and size related to images or programming instructions to guide better code generation.

    GenAI struggled to emulate my somewhat unique and quirky writing style. I found that even with my best attempts at prompt engineering to persuade the LLM to write like me, they were just too good and morally opposed to emulating my style. Smile!

    AI did not substitute for the creative processes, including chapter topic selection, storytelling choices, or dreaming up imaginative characters; that was all on me. GenAI’s responses sometimes veered towards being overly rigid or excessively dramatic, using language that did not resonate with my approach to storytelling.

    However, AI was a lifesaver during moments of writer’s block, offering a burst of inspiration when faced with a blank MS Word document. I carefully reviewed all generated content for proper attribution, using my human judgment and reasoning. The most frequently used prompts have to be these:

    Prompt: Correct English, grammar, and punctuation for…

    Prompt: Generate a modern endnote reference for…

    Realizing this, I broke down and started a subscription with Grammarly.

    The creation of book images presented its own set of challenges. Despite my efforts at crafting persuasive prompts, aligning the AI’s output with my vision proved challenging—one such frustration involved generating the image for the AI Captain and the Mayflower craft. DALL-E insisted on including a mast on the ship despite my clear instructions and examples that showed it should not have one. This was when I coined the term ‘wrestling the AI alligator,’ though there were many moments when the results pleasantly surprised me.

    GenAI was brilliant in assisting in the creation of code assets, including Python scripts and HTML, and synthesizing datasets. However, AI-generated bugs were like navigating a black hole—a daunting task that sometimes made me wonder if I’d ever find an escape. These bugs were often profoundly embedded and obscure, compounded by many modern frameworks, like Langchain; we’re not known to LLMs because they were introduced to the world after the LLM’s last training cutoff. This necessitated a back-and-forth process, incorporating working code snippets to ‘teach’ the LLM to produce code in the desired direction.

    In the Ciao Chapter, I explain my choice of using a combination of GenAI and VSCode for producing the coding examples, rather than opting for Jupyter Notebooks. Yeah, I know, first Pluto and now Jupyter. Smile.

    GenAI is here, and it’s a wonderful tool, especially once you get to know it a bit. While MS Word and Grammarly sit at the top of my productivity tool list, GenAI has now joined the ranks. It has notably improved my book-writing process, making me wonder how I ever managed to write previous books without it. I suspect GenAI might similarly transform your work after you’ve explored it in the pages of this book.

    Meet the Actors (And Why the Ducks Again?)

    Partial Hallucination

    Point taken. It’s understood that you may find it somewhat unconventional that, in addition to the voices of actual colleagues, I have created several artificial voices to narrate sections of this book. If you describe this method as somewhat juvenile, I wouldn’t be upset—guilty as charged. There is a bit of scientific reasoning supporting this technique. Storytelling has long been recognized as an effective teaching method. It grabs interest, boosts recall, breaks down challenging ideas, sparks emotions, and builds empathy, making lessons stick and more enjoyable.²

    I’ve come to understand that, especially when reading a lengthy book with more than ten chapters, hearing the same voice repeatedly can lead to a mental tuning out. Have you ever noticed how advice you give can be repeated to a group without much acknowledgment, only for the same suggestion from a new voice to be met with enthusiasm as though it’s a brilliant insight? This is a classic example of what might be termed voice discounting.

    I’ve diversified this book’s narration by including real and creatively imagined characters to address this. The real actors are colleagues who are luminaries in the industry. You’re going to love their stories. For the fictional characters, I’ve carefully chosen personalities that not only fit the subject matter but also add an element of fun and provide a fresh perspective through their distinct voices. Whether this approach truly enhances the experience is something you can decide, but rest assured, there’s a bit

    Enjoying the preview?
    Page 1 of 1