ENGLISH

Exploring GPT-3: An unofficial first look at the general-purpose language processing API from OpenAI

Book information

Publisher
Packt Publishing
Year
2021
ISBN
1800563191, 9781800563193
Language
english
Format
PDF
Filesize
23 MB (23851242 bytes)
Pages
296\296
Time added
2021-08-28 16:48:05

Description

Get started with GPT-3 and the OpenAI API for natural language processing using JavaScript and Python Key FeaturesUnderstand the power of potential GPT-3 language models and the risks involvedExplore core GPT-3 use cases such as text generation, classification, and semantic search using engaging examplesPlan and prepare a GPT-3 application for the OpenAI review process required for publishing a live applicationBook Description Generative Pre-trained Transformer 3 (GPT-3) is a highly advanced language model from OpenAI that can generate written text that is virtually indistinguishable from text written by humans. Whether you have a technical or non-technical background, this book will help you understand and start working with GPT-3 and the OpenAI API. If you want to get hands-on with leveraging artificial intelligence for natural language processing (NLP) tasks, this easy-to-follow book will help you get started. Beginning with a high-level introduction to NLP and GPT-3, the book takes you through practical examples that show how to leverage the OpenAI API and GPT-3 for text generation, classification, and semantic search. You'll explore the capabilities of the OpenAI API and GPT-3 and find out which NLP use cases GPT-3 is best suited for. You'll also learn how to use the API and optimize requests for the best possible results. With examples focusing on the OpenAI Playground and easy-to-follow JavaScript and Python code samples, the book illustrates the possible applications of GPT-3 in production. By the end of this book, you'll understand the best use cases for GPT-3 and how to integrate the OpenAI API in your applications for a wide array of NLP tasks. What you will learnUnderstand what GPT-3 is and how it can be used for various NLP tasksGet a high-level introduction to GPT-3 and the OpenAI APIImplement JavaScript and Python code examples that call the OpenAI APIStructure GPT-3 prompts and options to get the best possible resultsSelect the right GPT-3 engine or model to optimize for speed and cost-efficiencyFind out which use cases would not be suitable for GPT-3Create a GPT-3-powered knowledge base application that follows OpenAI guidelinesWho this book is for Exploring GPT-3 is for anyone interested in natural language processing or learning GPT-3 with or without a technical background. Developers, product managers, entrepreneurs, and hobbyists looking to get to grips with NLP, AI, and GPT-3 will find this book useful. Basic computer skills are all you need to get the most out of this book. Table of ContentsIntroducing GPT-3 and the OpenAI APIGPT-3 Applications and Use CasesWorking with the OpenAI PlaygroundWorking with the OpenAI APICalling the OpenAI API in CodeContent FilteringGenerating and Transforming TextClassifying and Categorizing TextBuilding a GPT-3 Powered Question-Answering AppGoing Live with OpenAI-Powered Apps Cover Title page Copyright and Credits Dedication Foreword Contributors Table of Contents Preface Section 1: Understanding GPT-3 and the OpenAI API Chapter 1: Introducing GPT-3 and the OpenAI API Technical requirements Introduction to GPT-3 Simplifying NLP What exactly is GPT-3? Democratizing NLP Understanding prompts, completions, and tokens Prompts Completions Tokens Introducing Davinci, Babbage, Curie, and Ada Davinci Curie Babbage Ada Content filtering model Instruct models A snapshot in time Understanding GPT-3 risks Inappropriate or offensive results Potential for malicious use Summary Chapter 2: GPT-3 Applications and Use Cases Technical requirements Understanding general GPT-3 use cases Introducing the Playground Getting started with the Playground Handling text generation and classification tasks Text generation Text classification Understanding semantic search The Semantic Search tool Summary Section 2: Getting Started with GPT-3 Chapter 3: Working with the OpenAI Playground Technical requirements Exploring the OpenAI developer console Developer documentation Developer resources Accounts and organizations Pricing and billing Usage reporting Member management Diving deeper into the Playground Choosing the right engine Response length Temperature and Top P Frequency and presence penalty Best of Stop sequence Inject Start Text and Inject Restart Text Show Probabilities Working with presets Grammatical Standard English Text to command Parse unstructured data Summary Chapter 4: Working with the OpenAI API Technical requirements Understanding APIs Getting familiar with HTTP Uniform resource identifiers HTTP methods The HTTP body HTTP headers HTTP response status codes Reviewing the OpenAI API endpoints List Engines Retrieve Engine Create Completions Semantic Search Introducing CURL and Postman Understanding API authentication Keeping API keys private Making an authenticated request to the OpenAI API Working with multiple organizations Introducing JSON Using the Completions endpoint Using the Semantic Search endpoint Summary Chapter 5: Calling the OpenAI API in Code Technical requirements Choosing your programming language Introducing replit Creating a repl Setting your OpenAI API key as an environment variable Understanding and creating the .replit file Using the OpenAI API with Node.js/JavaScript Calling the engines endpoint Calling the Completions endpoint Calling the search endpoint Using the OpenAI API in Python Calling the completions endpoint Calling the search endpoint Using other programming languages Summary Section 3: Using the OpenAI API Chapter 6: Content Filtering Technical requirements Preventing inappropriate and offensive results Understanding content filtering Testing the content filtering process Filtering content with JavaScript Flagging unsafe words with Node.js/JavaScript Filtering content with Python Flagging unsafe words with Python Summary Chapter 7: Generating and Transforming Text Technical requirements Using the examples Generating content and lists Dumb joke generator Mars facts (in most cases) Webinar description generator Book suggestions Children's book generator Translating and transforming text Acronym translator English to Spanish JavaScript to Python Fifth-grade summary Grammar correction Extracting text Extracting keywords HTML parsing Extracting a postal address Extracting an email address Creating chatbots A simple chatbot Summary Chapter 8: Classifying and Categorizing Text Technical requirements Understanding text classification Using the completions endpoint for text classification Content filtering is a text classification task Introducing the classifications endpoint Uploading files Implementing sentiment analysis Assigning an ESRB rating to text Classifying text by language Classifying text from keywords Summary Chapter 9: Building a GPT-3-Powered Question-Answering App Technical requirements Introducing GPT Answers GPT Answers technical overview Hosting the app Introducing the Answers endpoint Setting up and testing Express Creating the API endpoint for GPT Answers Creating the API endpoint Testing our API with Postman Creating the GPT Answers user interface Integrating the Answers endpoint Generating relevant and factual answers Using files with the Answers endpoint Summary Chapter 10: Going Live with OpenAI-Powered Apps Technical requirements Going live Understanding use case guidelines Addressing potential approval issues Content filtering Input and output lengths Request rate limiting Completing the pre-launch review request High-level use case questions Security and risk mitigation questions Growth plan questions Wrapping-up questions Summary Why subscribe? About Packt Other Books You May Enjoy Index

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF