Slides
The following tutorials are mainly based on the excellent course “Building Systems with the ChatGPT API” provided by Isa Fulford from OpenAI and Andrew Ng from DeepLearning.AI.
Take a look at the slides tutorial to learn how to use all slide options.
You have several options to start code development:
Colab: Click on one of the links “💻 Jupyter Notebook” to start a Colab session.
Local: Click on one of the links “💻 Jupyter Notebook” below, go to the Colab menu and choose “File” > “Download” > “Download .ipynb”
Cloud Codespace: Work in a fully configured dev environment in the cloud with a GitHub Codespace VS Code Browser environment.
Local VS Code with Codespace: Use GitHub Codespaces in your local Visual Studio Code environment.
For cost reasons we mainly use OpenAI’s gpt-3.5-turbo model in our tutorials. However, you can simply replace model="gpt-3.5-turbo" with model="gpt-4" in the helper function. Note the price difference between the two models.
1 Basics: Tokens and chat format
In this tutorial, you’ll learn some basic properties of Large Language Models (tokens and the chat format):
2 Classification
Learn how to classify different customer queries:
3 Moderation
The moderations endpoint is a tool you can use to check whether content complies with our usage policies:
4 Chain of Thought Reasoning
Chain-of-thought (CoT) prompting enables complex reasoning capabilities through intermediate reasoning steps. You can combine it with few-shot prompting to get better results on more complex tasks that require reasoning before responding:
5 Prompt Chaining
Prompt Chaining is a technique of connecting multiple tasks to generate complex content by breaking down a large generative task into smaller, more manageable pieces. Examples of prompt chaining are generating product descriptions, creating personalized email campaigns, and generating complex chatbot responses.
6 Check Model Output
Ask the model to verify its own outputs:
7 Build an End-to-End System
This puts together the chain of prompts that you saw throughout the tutorials:
8 Evaluation
Evaluate LLM responses when there is a single “right answer”.
9 Evaluation Part 2
Evaluate LLM responses where there isn’t a single “right answer.”
Resources:
- OpenAI’s Evals is a framework for evaluating LLMs and LLM systems, and an open-source registry of benchmarks (An “eval” is a task used to evaluate the quality of a system’s behavior).