---
title: "Introduction to Generative AI: Introduction To Generative Ai"
id: "14556"
type: "page"
slug: "01-introduction-to-generative-ai"
published_at: "2026-07-19T21:07:41+00:00"
modified_at: "2026-07-20T00:41:40+00:00"
url: "https://preppers-paradise.com/library/introductiontogenerativeai/01-introduction-to-generative-ai/"
markdown_url: "https://preppers-paradise.com/library/introductiontogenerativeai/01-introduction-to-generative-ai.md"
excerpt: "This book offers an accessible introduction to generative artificial intelligence, particularly focusing on large language models. It explains how these systems are trained and operate, while explorin"
taxonomy_category:
  - "AI &amp; Machine Learning"
  - "Books"
  - "Free Teaser"
taxonomy_post_tag:
  - "ai ethics"
  - "artificial intelligence"
  - "content creation"
  - "cybersecurity"
  - "data privacy"
  - "generative ai"
  - "intellectual property"
  - "large language models"
  - "misinformation"
  - "synthetic media"
---

# Introduction to Generative AI: Introduction To Generative Ai

[← Introduction to Generative AI](/library/introductiontogenerativeai/)

Chapter 1 of 52 · Free teaser

# Introduction to Generative AI

NUMA DHAMANI MAGGIE ENGLER

![](https://preppers-paradise.com/wp-content/uploads/x402-books/introductiontogenerativeai/_page_2_Picture_2.jpeg "Introduction to Generative AI book cover")

*Numa dedicates this book to her parents, Nazarali and Nadia, and her brother, Nihal.*

*Maggie dedicates this book to her husband, Joe.*

## Contents

## Foreword

## Preface

## Acknowledgments

## About this book

## About the authors

## About the cover illustration

## 1 Large language models: The power of AI

### Evolution of natural language processing

### The birth of LLMs: Attention is all you need

### Explosion of LLMs

### What are LLMs used for?

*   Language modeling
*   Question answering
*   Coding
*   Content generation
*   Logical reasoning
*   Other natural language tasks

### Where do LLMs fall short?

*   Training data and bias
*   Limitations in controlling machine outputs
*   Sustainability of LLMs

### Revolutionizing dialogue: Conversational LLMs

*   OpenAI's ChatGPT
*   Google's Bard/LaMDA
*   Microsoft's Bing AI
*   Meta's LLaMa/Stanford's Alpaca

## 2 Training large language models

### How are LLMs trained?

*   Exploring open web data collection
*   Demystifying autoregression and bidirectional token prediction
*   Fine-tuning LLMs

### The unexpected: Emergent properties of LLMs

*   Quick study: Learning with few examples
*   Is emergence an illusion?

### What's in the training data?

*   Encoding bias
*   Sensitive information

## 3 Data privacy and safety with LLMs

### Safety-focused improvements for LLM generations

*   Post-processing detection algorithms
*   Content filtering or conditional pre-training
*   Reinforcement learning from human feedback
*   Reinforcement learning from AI feedback

### Navigating user privacy and commercial risks

*   Inadvertent data leakage
*   Best practices when interacting with chatbots

### Understanding the rules of the road: Data policies and regulations

*   International standards and data protection laws
*   Are chatbots compliant with GDPR?
*   Privacy regulations in academia
*   Corporate policies

## 4 The evolution of created content

### The rise of synthetic media

*   Popular techniques for creating synthetic media
*   The good and the bad of synthetic media
*   AI or genuine: Detecting synthetic media

### Generative AI: Transforming creative workflows

*   Marketing applications
*   Artwork creation

### Intellectual property in the LLM era

Have you noticed that everyone has been talking about how good AI is now? People have been using a lot of buzzwords, such as generative AI, LLMs, dialogue agents, and more. Why is this happening? Where is this all coming from? Why so many different terms? Don't they mean the same thing? What has everyone been talking about? Well, I've got just the book for you.

Numa and Maggie both come from backgrounds in integrity work. They are members of the Integrity Institute, a professional organization and think tank for people who have dedicated their careers to understanding how and why bad things happen on the internet and developing mitigations and solutions for a healthier online environment. Throughout their careers, it has been Numa and Maggie's job to understand interactions on the web—first between people (and now between people and robots)—and the fundamental physics of what is going on in these incredibly complex systems full of people trying to break them. Turns out, this way of thinking is really useful for thinking through how people will use and abuse this generative AI technology as well. Through the Integrity Institute, Numa and Maggie have helped us educate people at large and people in positions of power on how the internet works. They are part of a growing movement of technologists who help society understand what is actually going on in a world where all the conversation is happening online. As people spend more of their lives online, this job becomes more important.

I'm excited for this book. I believe that it's going to be part of a new wave of books and scholarship, tentatively called *integrity studies*, that we're going to see from people who have worked on social media platforms to understand the information ecosystems of how people behave and communicate online. We can apply that method of thinking not just to social media, dating apps, gaming apps, and marketplaces, but also to understanding people and information in a whole host of ways. In this book, you will neither need to be, pretend to be, nor turn yourself into a stats nerd, nor will you treat AI as a magic robot box that can't be understood. Numa and Maggie give us a tour of how generative AI systems work in order to be able to reason and make informed decisions about them. With that as a base, they take us along on a journey, using both that understanding of new fancy AI and the hard-earned expertise they've gotten in the years of the integrity trenches, to think through generative AI implications on society from changing the economy, through changing how we talk to each other, to changing the incentives for bad behavior and disinformation.

*Introduction to Generative AI* could not be more timely. We need a primer like this, addressing complex ideas at an accessible level. While I'm sure that not every prediction in this book will materialize exactly as described, you are sure to be exposed to both really useful information about how generative AI works right now and patterns of thinking honed through years of dedicated integrity work. Read this book.

—Sahar Massachi Cofounder and Executive Director of Integrity Institute

# Preface

In a twist of fate, wild internet conspiracy theories brought the two of us together—we met developing natural language processing systems to measure and understand extremist content online. When large language models (LLMs) and other types of generative models came into global public consciousness, we realized that our field would be permanently changed. Content had never been cheaper to create and disseminate; at the same time, the need for our ability to classify content at scale had never been greater.

While writing this book, we received a memorable piece of reviewer feedback to the effect that, "The authors ought to clarify their position on generative AI. Are they for or against it?" Reader, we are regrettably unable to distill our positions on generative AI in a word, but instead, we've tried to express the nuanced implications of its development and usage throughout this book. To do this, we first build an understanding of how LLMs are trained, the data they are trained on, and the algorithms that contribute to their final output: text that is virtually indistinguishable from that written by a human.

These outputs, and those of other types of generative models, have many beneficial and malicious uses alike. Their capabilities are unlike any systems we've seen before, but flashy performances on benchmarks such as standardized tests can obscure their severe limitations, including bias, hallucinations, and unsafe generations. Their production also raises important questions about legal rights to content, the ethics of human-AI interaction, the economics of AI-assisted work, and so much more.

While we've attempted to stake out our own positions in this volume, citing research papers and real-world applications, we aren't under any illusions that these problems are solved. Many questions remain, and answering them will be an iterative process that requires a whole-of-society response. It's therefore our hope that this guide will encourage beginners, hobbyists, and experienced professionals alike to participate in the public conversation about generative AI. The field is still dominated by too few voices, leading to narrow conversations that neglect the perspectives of marginalized groups, wage workers, artists and creators, and myriad other cohorts affected by AI. An informed public is our greatest asset toward creating the future that we want with generative AI. We hope that you'll join us in the effort to shape a world where AI helps rather than supplants people and the central focus remains on the human experience.

# Acknowledgments

## 6. Accelerating productivity: Machine-augmented work

### Using LLMs in the professional space

#### LLMs assisting doctors with administrative tasks
#### LLMs for legal research, discovery, and documentation
#### LLMs augmenting financial investing and bank customer service
#### LLMs as collaborators in creativity

### LLMs as a programming sidekick

### LLMs in daily life

### Generative AI's footprint on education

### Detecting AI-generated text

### How LLMs affect jobs and the economy

## 7. Making social connections with chatbots

### Chatbots for social interaction

### Why humans are turning to chatbots for relationship

#### The loneliness epidemic
#### Emotional attachment theory and chatbots

### The good and bad of human-chatbot relationships

### Charting a path for beneficial chatbot interaction

## 8. What's next for AI and LLMs

### Where are LLM developments headed?

#### Language: The universal interface
#### LLM agents unlock new possibilities
#### The personalization wave

## Social and technical risks of LLMs

### Data inputs and outputs

### Data privacy

### Adversarial attacks

### Misuse

### How society is affected

### Using LLMs responsibly: Best practices

#### Curating datasets and standardizing documentation
#### Protecting data privacy
#### Explainability, transparency, and bias
#### Model training strategies for safety
#### Enhanced detection
#### Boundaries for user engagement and metrics
#### Humans in the loop

### AI regulations: An ethics perspective

#### North America overview
#### EU overview
#### China overview
#### Corporate self-governance

### Toward an AI governance framework

## Broadening the horizon: Exploratory topics in AI

### The quest for artificial general intelligence

### AI sentience and consciousness?

### How LLMs affect the environment

### The game changer: Open source community

## References

## Index

We would like to express our heartfelt appreciation to Sahar Massachi, whose insightful and thought-provoking foreword sets the tone for this book. Your passion and commitment to integrity work inspires us, and your contribution to this project has made it all the more meaningful.

In addition, this book would not have been possible without the kind help and support of many of our friends and colleagues. In no particular order, we would like to thank David Sullivan, Erin McAuliffe, Natalija Bitiukova, Dr. Daniel Rogers, Edgar Markevicius, Sam Plank, Derek Slater, Dr. Steve Kramer, Ryan Williams, Bryan Jones, Dr. Faiz Jiwani, Reed Coke, Whitney Nelson, Rahim Makani, Alice Hunsberger, Karan Lala, Rebecca Ruppel, Michael Wharton, Dr. Atish Agarwala, Ron Green, Dr. Kenneth R. Fleischmann, and Stephen Straus. All of these people provided valuable feedback and diverse perspectives that helped shape the ideas presented in these pages.

Finally, we'd like to thank *you*, our reader. Thank you for picking this book off the bookshelf or purchasing it online. Thank you for reading about the nuanced implications of generative AI technology and contemplating how to balance innovation with responsibility. Thank you for participating in public dialogue about generative AI and encouraging others to do the same. Thank you for taking the ideas or lessons you may learn here and elsewhere to your colleagues and friends. Thank you for helping us get to a society that is informed and considerate about generative AI.

# About this book

ChatGPT's release on November 30, 2022, both captivated the imagination of millions of users and prompted caution from longtime tech observers about the dialogue agent's shortcomings. In this book, we cover generative artificial intelligence at a high level with an emphasis on large language models (LLMs). We discuss the breakthrough of generative models, how generative models work, and both the promise and the risks that the technology poses. We also dive into the broader ethical, societal, and legal implications of this transformative technology. Finally, we recommend best practices for responsibly training and using LLMs based on our combined experience in building responsible technology, data security, and privacy. The book navigates the delicate and nuanced balance between the immense potential of generative AI technology and the need for responsible AI systems.

## Who should read this book

We are hopeful that this book will not only be a resource for machine learning professionals but also for the general public. We can all play a role in mitigating risks from generative models while benefiting from and enjoying technological progress.

## How this book is organized: A road map

In the chapters of this book, we frequently use the terms *dialogue agent*, *chatbot*, *conversational agent*, or *conversational system* interchangeably to refer to an AI system that is powered by a large language model (unless otherwise specified) and trained to engage in conversation with users. Here's a brief description of what you'll see in each chapter:

- Chapter 1 provides an introduction to large language models (LLMs). The chapter outlines how LLMs came to such preeminence in the field of NLP, their applications, and their limitations. It also briefly discusses notable conversational LLM models that were released in late 2022 and early 2023.
- Chapter 2 takes a deep dive into how LLMs are trained. This chapter discusses how characteristics inherent to the training of LLMs create both unique capabilities and potential vulnerabilities.
- Chapter 3 addresses mitigations for vulnerabilities that arise from training data. This chapter includes strategies for controlling unsafe generations and discusses data privacy considerations and regulations.
- Chapter 5 describes several types of misuse of LLMs, both purposeful malicious use and unintentional misuse. This chapter also provides recommendations to mitigate both intentional and accidental misuse through a combination of technical systems and user education.
- Chapter 6 illustrates the use of LLMs in personal, professional, and educational settings. The chapter also explores the detection of machine-generated content and considers the possible shifts that this technology will cause in education and the economy.
- Chapter 7 gives examples of LLMs used as social chatbots where the primary purpose is to build social connections with users. The chapter discusses the potential risks for human connection and provides recommendations for human-chatbot interaction.
- Chapter 8 highlights the risks and promises of LLMs introduced throughout the book and connects these ideas together. The chapter also identifies forthcoming areas of LLM development, covers the AI legal landscape, and suggests paths forward for a better, equitable future.
- Chapter 9 is an appendix of sorts, which serves as a valuable extension of the book with complementary topics. This chapter discusses artificial general intelligence (AGI) and AI sentience, the environmental impacts of LLMs, and the open source community.

This book should be read in the order it's written as it builds on the ideas introduced in the previous chapters. In this book, chapter 8 serves as the conclusory chapter while chapter 9 discusses ideas that are supplemental to the concepts introduced in the first eight chapters.

## liveBook discussion forums

If you're interested in learning more about any particular ideas or concepts introduced in this book, we reference several research studies, books, and articles throughout—we hope that these will serve as valuable supplementary material.

# About the authors

![](https://preppers-paradise.com/wp-content/uploads/x402-books/introductiontogenerativeai/_page_20_Picture_1.jpeg "Photo of Numa Dhamani")

**Numa Dhamani** is an engineer and researcher working at the intersection of technology and society. She is a natural language processing expert with domain expertise in influence operations, security, and privacy. Numa has developed machine learning systems for Fortune 500 companies and social media platforms, as well as for startups and nonprofits. She has advised companies and organizations, served as the principal investigator on the US Department of Defense's research programs, and contributed to multiple international peer-reviewed journals. She is also engaged in the technology policy space, supporting think tanks and nonprofits with data and AI governance efforts. Her work on combating online disinformation has been featured in several news media outlets, including the *New York Times* and the *Washington Post*. Numa is passionate about working toward a healthier online ecosystem, building responsible AI, and advocating for transparency and accountability in technology. She holds degrees in physics and chemistry from the University of Texas at Austin.

![](https://preppers-paradise.com/wp-content/uploads/x402-books/introductiontogenerativeai/_page_21_Picture_2.jpeg "Photo of Maggie Engler")

**Maggie Engler** is an engineer and researcher currently working on safety for LLMs. She focuses on applying data science and machine learning to abuses in the online ecosystem and is a domain expert in cybersecurity and trust and safety. Maggie has built machine learning systems for malware and fraud detection, content moderation, and risk assessment. She has advised startups and nonprofits on data infrastructure and privacy, as well as conducted technical due diligence for venture capital firms. She is also a committed educator and communicator, teaching as an adjunct instructor at the University of Texas at Austin School of Information. Maggie is deeply invested in technology policy, and she works with civil society groups to advocate for responsible AI and data governance. She holds bachelor's and master's degrees in electrical engineering from Stanford University.
