Book Image

Modern Generative AI with ChatGPT and OpenAI Models

By : Valentina Alto
4.9 (8)
Book Image

Modern Generative AI with ChatGPT and OpenAI Models

4.9 (8)
By: Valentina Alto

Overview of this book

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.
Table of Contents (17 chapters)
1
Part 1: Fundamentals of Generative AI and GPT Models
4
Part 2: ChatGPT in Action
11
Part 3: OpenAI for Enterprises

Generating text

As a language model, ChatGPT is particularly suited for generating text based on users’ instructions.

For example, you could ask ChatGPT to generate emails, drafts, or templates that target a specific audience:

Figure 5.7 – Example of an email generated by ChatGPT

Figure 5.7 – Example of an email generated by ChatGPT

Another example might be asking ChatGPT to create a pitch structure for a presentation you have to prepare:

Figure 5.8 – Slideshow agenda and structure generated by ChatGPT

Figure 5.8 – Slideshow agenda and structure generated by ChatGPT

Note

In Chapter 1, we saw how there are tools that combine different generative AIs. We also saw an example of an AI used for a slideshow presentation – that is, Tome AI. From Figure 5.8, we can get an idea of how the backends of such tools work – starting from the user prompt, they generate the structure of the presentation and its content. Then, in the case of Tome AI or similar tools, the structure is translated into slides, and images...