Modern Generative AI with ChatGPT and OpenAI Models

Book description

Harness the power of AI with innovative, real-world applications, and unprecedented productivity boosts, powered by the latest advancements in AI technology like ChatGPT and OpenAI

Purchase of the print or Kindle book includes a free PDF eBook

Key Features

  • Explore the theory behind generative AI models and the road to GPT3 and GPT4
  • Become familiar with ChatGPT's applications to boost everyday productivity
  • Learn to embed OpenAI models into applications using lightweight frameworks like LangChain

Book Description

Generative AI models and AI language models are becoming increasingly popular due to their unparalleled capabilities. This book will provide you with insights into the inner workings of the LLMs and guide you through creating your own language models. You'll start with an introduction to the field of generative AI, helping you understand how these models are trained to generate new data.

Next, you'll explore use cases where ChatGPT can boost productivity and enhance creativity. You'll learn how to get the best from your ChatGPT interactions by improving your prompt design and leveraging zero, one, and few-shots learning capabilities. The use cases are divided into clusters of marketers, researchers, and developers, which will help you apply what you learn in this book to your own challenges faster.

You'll also discover enterprise-level scenarios that leverage OpenAI models' APIs available on Azure infrastructure; both generative models like GPT-3 and embedding models like Ada. For each scenario, you'll find an end-to-end implementation with Python, using Streamlit as the frontend and the LangChain SDK to facilitate models' integration into your applications.

By the end of this book, you'll be well equipped to use the generative AI field and start using ChatGPT and OpenAI models' APIs in your own projects.

What you will learn

  • Understand generative AI concepts from basic to intermediate level
  • Focus on the GPT architecture for generative AI models
  • Maximize ChatGPT's value with an effective prompt design
  • Explore applications and use cases of ChatGPT
  • Use OpenAI models and features via API calls
  • Build and deploy generative AI systems with Python
  • Leverage Azure infrastructure for enterprise-level use cases
  • Ensure responsible AI and ethics in generative AI systems

Who this book is for

This book is for individuals interested in boosting their daily productivity; businesspersons looking to dive deeper into real-world applications to empower their organizations; data scientists and developers trying to identify ways to boost ML models and code; marketers and researchers seeking to leverage use cases in their domain – all by using Chat GPT and OpenAI Models.

A basic understanding of Python is required; however, the book provides theoretical descriptions alongside sections with code so that the reader can learn the concrete use case application without running the scripts.

Table of contents

  1. Modern Generative AI with ChatGPT and OpenAI Models
  2. Contributors
  3. About the author
  4. About the reviewer
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Download the color images
    6. Conventions used
    7. Get in touch
    8. Share Your Thoughts
    9. Download a free PDF copy of this book
  6. Part 1: Fundamentals of Generative AI and GPT Models
  7. Chapter 1: Introduction to Generative AI
    1. Introducing generative AI
      1. Domains of generative AI
      2. Text generation
      3. Image generation
      4. Music generation
      5. Video generation
    2. The history and current status of research
    3. Summary
    4. References
  8. Chapter 2: OpenAI and ChatGPT – Beyond the Market Hype
    1. Technical requirements
    2. What is OpenAI?
    3. An overview of OpenAI model families
    4. Road to ChatGPT: the math of the model behind it
      1. The structure of RNNs
      2. The main limitations of RNNs
      3. Overcoming limitations – introducing transformers
      4. GPT-3
    5. ChatGPT: the state of the art
    6. Summary
    7. References
  9. Part 2: ChatGPT in Action
  10. Chapter 3: Getting Familiar with ChatGPT
    1. Setting up a ChatGPT account
    2. Familiarizing yourself with the UI
    3. Organizing chats
    4. Summary
    5. References
  11. Chapter 4: Understanding Prompt Design
    1. What is a prompt and why is it important?
    2. Zero-, one-, and few-shot learning – typical of transformers models
    3. Principles of well-defined prompts to obtain relevant and consistent results
    4. Avoiding the risk of hidden bias and taking into account ethical considerations in ChatGPT
    5. Summary
    6. References
  12. Chapter 5: Boosting Day-to-Day Productivity with ChatGPT
    1. Technical requirements
    2. ChatGPT as a daily assistant
    3. Generating text
    4. Improving writing skills and translation
    5. Quick information retrieval and competitive intelligence
    6. Summary
  13. Chapter 6: Developing the Future with ChatGPT
    1. Why ChatGPT for developers?
    2. Generating, optimizing, and debugging code
    3. Generating documentation and code explainability
    4. Understanding ML model interpretability
    5. Translation among different programming languages
    6. Summary
  14. Chapter 7: Mastering Marketing with ChatGPT
    1. Technical requirements
    2. Marketers’ need for ChatGPT
    3. New product development and the go-to-market strategy
    4. A/B testing for marketing comparison
    5. Boosting Search Engine Optimization (SEO)
    6. Sentiment analysis to improve quality and increase customer satisfaction
    7. Summary
  15. Chapter 8: Research Reinvented with ChatGPT
    1. Researchers’ need for ChatGPT
    2. Brainstorming literature for your study
    3. Providing support for the design and framework of your experiment
    4. Generating and formatting a bibliography
    5. Generating a presentation of the study
    6. Summary
    7. References
  16. Part 3: OpenAI for Enterprises
  17. Chapter 9: OpenAI and ChatGPT for Enterprises – Introducing Azure OpenAI
    1. Technical requirements
    2. OpenAI and Microsoft for enterprise-level AI – introducing Azure OpenAI
      1. Microsoft AI background
      2. Azure OpenAI Service
      3. Exploring Playground
    3. Why introduce a public cloud?
    4. Understanding responsible AI
      1. Microsoft’s journey toward responsible AI
      2. Azure OpenAI and responsible AI
    5. Summary
    6. References
  18. Chapter 10: Trending Use Cases for Enterprises
    1. Technical requirements
    2. How Azure OpenAI is being used in enterprises
    3. Contract analyzer and generator
      1. Identifying key clauses
      2. Analyzing language
      3. Flagging potential issues
      4. Providing contract templates
      5. Frontend with Streamlit
    4. Understanding call center analytics
      1. Parameter extraction
      2. Sentiment analysis
      3. Classification of customers’ requests
      4. Implementing the frontend with Streamlit
    5. Exploring semantic search
      1. Document embedding using LangChain modules
      2. Creating a frontend for Streamlit
    6. Summary
    7. References
  19. Chapter 11: Epilogue and Final Thoughts
    1. Recap of what we have learned so far
    2. This is just the beginning
      1. The advent of multimodal large language models
      2. Microsoft Bing and the Copilot system
    3. The impact of generative technologies on industries – a disruptive force
    4. Unveiling concerns about Generative AI
      1. Elon Musk calls for stopping development
      2. ChatGPT was banned in Italy by the Italian “Garante della Privacy”
    5. Ethical implications of Generative AI and why we need Responsible AI
    6. What to expect in the near future
    7. Summary
    8. References
  20. Index
    1. Why subscribe?
  21. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts
    3. Download a free PDF copy of this book

Product information

  • Title: Modern Generative AI with ChatGPT and OpenAI Models
  • Author(s): Valentina Alto
  • Release date: May 2023
  • Publisher(s): Packt Publishing
  • ISBN: 9781805123330