Generative AI in Action Edition: 1

by Amit Bahree

Artificial Intelligence

Book Details

Book Title

Generative AI in Action Edition: 1

Author

Amit Bahree

Publisher

Manning City: Shelter Island, NY

Publication Date

2024

ISBN

9781633438880

Number of Pages

466

Language

English

Format

PDF

File Size

6.2MB

Subject

Artificial Intelligence

Table of Contents

  • Foreword>
  • Preface>
  • Acknowledgments>
  • About this Book>
  • About the Author>
  • About the Cover Illustration>
  • Part 1: Foundations of Generative AI
  • 1. Introduction to Generative AI
  • 1.1 What is this book about?
  • 1.2 What is generative AI?
  • 1.3 What can we generate?
  • 1.4 Enterprise use cases
  • 1.5 When not to use generative AI
  • 1.6 How is generative AI different from traditional AI?
  • 1.7 What approach should enterprises take?
  • 1.8 Architecture considerations
  • 1.9 So your enterprise wants to use generative AI. Now what?
  • Summary
  • 2. Introduction to Large Language Models
  • 2.1 Overview of foundational models
  • 2.2 Overview of LLMs
  • 2.3 Transformer architecture
  • 2.4 Training cutoff
  • 2.5 Types of LLMs
  • 2.6 Small language models
  • 2.7 Open source vs. commercial LLMs
  • 2.8 Key concepts of LLMs
  • Summary
  • 3. Working Through an API: Generating Text
  • 3.1 Model categories
  • 3.2 Completion API
  • 3.3 Advanced completion API options
  • 3.4 Chat completion API
  • Summary
  • 4. From Pixels to Pictures: Generating Images
  • 4.1 Vision models
  • 4.2 Image generation with Stable Diffusion
  • 4.3 Image generation with other providers
  • 4.4 Editing and enhancing images using Stable Diffusion
  • Summary
  • 5. What Else Can AI Generate?
  • 5.1 Code generation
  • 5.2 Additional code-related tasks
  • 5.3 Other code generation tools
  • 5.4 Video generation
  • 5.5 Audio and music generation
  • Summary
  • Part 2: Advanced Techniques and Applications
  • 6. Guide to Prompt Engineering
  • 6.1 What is prompt engineering?
  • 6.2 The basics of prompt engineering
  • 6.3 In-context learning and prompting
  • 6.4 Prompt engineering techniques
  • 6.5 Image prompting
  • 6.6 Prompt injection
  • 6.7 Prompt engineering challenges
  • 6.8 Best practices
  • Summary
  • 7. Retrieval-Augmented Generation: The Secret Weapon
  • 7.1 What is RAG?
  • 7.2 RAG benefits
  • 7.3 RAG architecture
  • 7.4 Retriever system
  • 7.5 Understanding vector databases
  • 7.6 RAG challenges
  • 7.7 Overcoming challenges for chunking
  • 7.8 Chunking PDFs
  • Summary
  • 8. Chatting with Your Data
  • 8.1 Advantages to enterprises using their data
  • 8.2 Using a vector database
  • 8.3 Planning for retrieving the information
  • 8.4 Retrieving the data
  • 8.5 Search using Redis
  • 8.6 An end-to-end chat implementation powered by RAG
  • 8.7 Using Azure OpenAI on your data
  • 8.8 Benefits of bringing your data using RAG
  • Summary
  • 9. Tailoring Models with Model Adaptation and Fine-Tuning
  • 9.1 What is model adaptation?
  • 9.2 When to fine-tune an LLM
  • 9.3 Fine-tuning OpenAI models
  • 9.4 Deployment of a fine-tuned model
  • 9.5 Training an LLM
  • 9.6 Model adaptation techniques
  • 9.7 RLHF overview
  • Summary
  • Part 3: Deployment and Ethical Considerations
  • 10. Application Architecture for Generative AI Apps
  • 10.1 Generative AI: Application architecture
  • 10.2 Generative AI: Application stack
  • 10.3 Orchestration layer
  • 10.4 Grounding layer
  • 10.5 Model layer
  • 10.6 Response filtering
  • Summary
  • 11. Scaling Up: Best Practices for Production Deployment
  • 11.1 Challenges for production deployments
  • 11.2 Deployment options
  • 11.3 Managed LLMs via API
  • 11.4 Best practices for production deployment
  • 11.5 GenAI operational considerations
  • 11.6 LLMOps and MLOps
  • 11.7 Checklist for production deployment
  • Summary
  • 12. Evaluations and Benchmarks
  • 12.1 LLM evaluations
  • 12.2 Traditional evaluation metrics
  • 12.3 LLM task-specific benchmarks
  • 12.4 New evaluation benchmarks
  • 12.5 Human evaluation
  • Summary
  • 13. Guide to Ethical GenAI: Principles, Practices, and Pitfalls
  • 13.1 GenAI risks
  • 13.2 Understanding GenAI attacks
  • 13.3 A responsible AI lifecycle
  • 13.4 Red-teaming
  • 13.5 Content safety
  • Summary
  • Appendix A. The Book’s GitHub Repository
  • Appendix B. Responsible AI Tools
  • References
  • Index
  • Back Cover