GPT-3
The Ultimate Guide To Building NLP Products With OpenAI API
Sandra Kublik
Shubham Saboo
Copyright 2022 Sandra Kublik and Shubham Saboo
All rights reserved
The characters and events portrayed in this book are fictitious. Any similarity to real persons, living or dead, is coincidental and not intended by the author.
No part of this book may be reproduced, or stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without express written permission of the publisher.
ISBN-13: 9781234567890
ISBN-10: 1477123456
Cover design by: Art Painter
Library of Congress Control Number: 2018675309
Printed in the United States of America
From Shubham
To my mother, Gayatri,
Who never stopped believing in me.
From Sandra
To Rui,
For the endless encouragement and support.
Praise for GPT-3
This book is a perfect starting point for practitioners and developers who want to understand the GPT-3 language model and learn how to build applications on the OpenAI API. Peter Welinder, VP, Product and Partnerships, OpenAI
What is instantly compelling about this book is that a wide variety of technical backgrounds can read this book and create world-class solutions using AI. Noah Gift, Executive in Residence at Duke University, Founder of Pragmatic AI Labs
If youre looking to use GPT-3 or any large language model to build your app or service, this book has everything you need. The book dives deep into GPT-3 and its use cases will help you apply this knowledge to your product. Daniel Erickson, Founder and CEO, Viable
The authors did a remarkable job of providing a deeper understanding of the technical and societal impact of GPT-3. After reading this book, you will feel confident discussing the state of art in artificial intelligence. Bram Adams, Founder of Stenography
The book is awesome for beginners! It even has memes and includes a very necessary chapter on AI and ethics, but its real strength is the step-by-step procedures to work with GPT-3. Ricardo Joseh Lima, Professor of Linguistics at Universidade do Estado do, Rio de Janeiro
A comprehensive deep dive into one of the keystone generative models in natural language processing, with a practical focus on how to use the OpenAI API and integrate it into your own applications. Beyond its technical value, I consider particularly insightful the perspectives provided in the last chapters regarding biases, privacy, and its role in the democratization of AI. Raul Ramos-Pollan, Professor of AI at Universidad de Antioquia in Medellin, Colombia
Preface
GPT-3, or Generative Pre-trained Transformer 3, is a transformer-based large language model developed by OpenAI. It consists of a staggering 175 billion parameters. Anyone can access this large language model via the OpenAI API, a simple-to-use text-in, text-out user interface, without any technical prerequisites. This is the first time in history that an AI model as big as GPT-3 has been remotely hosted and made available to the general public with a simple API call. This new mode of access is called model-as-a-service . Because of this unprecedented access, many people, including the authors of this book, see GPT-3 as a first step towards democratizing artificial intelligence (AI).
With the introduction of GPT-3, it is easier than ever before to build AI applications. This book will show you how easy it is to get started with the OpenAI API. Also, well introduce you to innovative ways to leverage this tool for your use case. Well look at successful startups built on top of GPT-3 and corporations leveraging it in their product landscape and examine problems and potential future trends in its development.
This book is dedicated to people from all backgrounds, not just technical professionals. It should be useful to you if you are:
A data professional looking to gain skills in AI
An entrepreneur who wants to build the next big thing in the AI space
A corporate leader who wants to upgrade their AI knowledge and use it to drive key decisions
A writer, podcaster, social media manager, or other language-based creator working with language who wants to leverage GPT-3s language capabilities for creative purposes
Anyone with an AI-based idea that once seemed technically impossible or too expensive to develop
The first part of the book covers the foundations of OpenAI API. In the book's second part, we explore the colorful ecosystem that has organically evolved around GPT-3.
Chapter 1 lays out the context and basic definitions needed to move comfortably in these subjects. In Chapter 2, we do a deep dive into the API, breaking it down into the most critical elements, such as engines and endpoints, describing their purpose and best practices for readers who wish to interact with them on a deeper level. Chapter 3 provides a simple and fun recipe for your first GPT-3 powered application.
Then, moving the focus to the exciting AI ecosystem, in Chapter 4, we interview founders of some of the most successful GPT-3 based products and apps about their struggles and experiences interacting with the model on a commercial scale. Chapter 5 looks at how enterprises view GPT-3 and its adoption potential. We discuss the problematic implications of wider GPT-3 adoption, such as misuse and bias, and progress in addressing those issues in Chapter 6. Finally, in Chapter 7, we look to the future, walking you through the most exciting trends and possibilities arising as GPT-3 settles into the broader commercial ecosystem.
Contents
Chapter 1: The Large Language Model Revolution
"art is the debris from the collision between the soul and the world" #gpt3
"technology is now the myth of the modern world" #gpt3
"revolutions begin with a question, but do not end with an answer" #gpt3
"nature decorates the world with variety" #gpt3
Imagine waking up to a beautiful, sunny morning. Its Monday, and you know the week will be hectic. Your company is about to launch a new personal-productivity app, Taskr, and start a social media campaign to inform the world about your ingenious product.
This week, your main task is writing and publishing a series of engaging blog posts.
You start by making a to-do list:
Write an informative and fun article about productivity hacks, including Taskr. Keep it under 500 words.
Create a list of 5 catchy article titles.
Choose the visuals.
You hit Enter, take a sip of coffee, and watch an article unravel on your screen, sentence by sentence, paragraph by paragraph. In 30 seconds, you have a meaningful, high-quality blog post, a perfect starter for your social media series. The visual is fun and attention-grabbing. Its done! You choose the best title and begin the publishing process.
This is not a distant, futuristic fantasy but a glimpse of the new reality made possible by advancements in AI. As we write this book, many such applications are being created and deployed to a broader audience.
GPT-3 is a cutting-edge language model created by OpenAI, a company at the frontier of artificial intelligence R&D. OpenAIs research paper announcing GPT-3 was released in May 2020, following a launch of access to GPT-3 via OpenAI API in June 2020. Since the GPT-3 release, people around the world coming from different backgrounds, including technology, art, literature, marketing, etc., have already found hundreds of exciting applications of the model that have the potential to elevate the ways we communicate, learn, and play.