To use the OpenAI API, you need to get your API key from here: https://platform.openai.com/account/api-keys
Then, you need to create a file called api_keys.py
in the same folder as your notebooks. The file should have the following content:
API_KEY = 'sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
Replace the x's with your actual API key. Do not share your API key with anyone else.
This course teaches you how to use a large language model (LLM) to quickly build new and powerful applications using the OpenAI API. You will learn:
- How LLMs work and what they can do
- How to write effective prompts for different tasks
- How to use the Chat Completions API and the Completions API
- How to fine-tune and customize your own models
- How to build a custom chatbot
The course consists of four modules:
- Module 1: Introduction to LLMs and prompt engineering
- Module 2: Summarizing, inferring, and transforming text
- Module 3: Expanding text and building a chatbot
- Module 4: Fine-tuning and customizing models
Each module contains video lectures, interactive examples, quizzes, and assignments.
The course is taught by Isa Fulford (OpenAI) and Andrew Ng (DeepLearning.AI).
The course is beginner-friendly. Only a basic understanding of Python is needed. But it is also suitable for advanced machine learning engineers wanting to approach the cutting-edge of prompt engineering and use LLMs.
The course is free for a limited time during the DeepLearning.AI learning platform beta. You can enroll here: https://learn.deeplearning.ai/
I also used another course as a reference for learning prompt engineering. It is called Learn Prompting: Your Guide to Communicating with AI [^1^][2]. It is an open source curriculum that covers the basics of AI, machine learning, and prompt engineering. It also provides many examples and exercises for using ChatGPT and other AI tools for various tasks. Some of the topics include:
- How to write good instructions for ChatGPT
- How to use ChatGPT for text generation, summarization, translation, and more
- How to use ChatGPT for image generation, editing, and captioning
- How to use ChatGPT for audio transcription and translation
- How to use ChatGPT for data analysis and visualization
- How to use ChatGPT for gaming and entertainment
You can access the course here: https://learnprompting.org/
In addition to the course content, I also added some of my personal experiments with prompt engineering. I tried to apply the techniques I learned to different domains and tasks that interest me. Some of the experiments include: