0% found this document useful (0 votes)
16 views13 pages

openai-workingcourse-introduction-to-chatgpt-api-introduction-to-chatgpt

Uploaded by

Yanet Cesaire
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
16 views13 pages

openai-workingcourse-introduction-to-chatgpt-api-introduction-to-chatgpt

Uploaded by

Yanet Cesaire
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 13

Learning Objectives

Learners will be able to…

Analyze the architecture and functionality of the ChatGPT language


model by OpenAI, including its capabilities and limitations.
Utilize the ChatGPT language model to engage in a conversation and
generate human-like responses.
Compare and contrast the different versions of the ChatGPT model,
including their features and performance.

info

Make Sure You Know


You are familiar with Python.

Limitations
This is a gentle introduction. So there is a little bit of Python
programming. The information might not be the most up to date as
OpenAI releases new features.
ChatGPT
ChatGPT is a powerful and innovative language model designed by OpenAI
based on the GPT-3.5 architecture. ChatGPT capabilities allow it to
understand and respond to natural language input in a way that is
strikingly similar to human conversation.

One of the key features of ChatGPT is its ability to generate high-quality


responses to a wide range of prompts, from simple questions to complex
discussions on a wide variety of topics. This is achieved through its
impressive natural language processing (NLP) capabilities, which enable it
to analyze and understand human language patterns and structures, and
generate appropriate responses that are contextually relevant and
linguistically fluent.

In addition to its NLP capabilities, ChatGPT is also capable of learning and


adapting to new data inputs, allowing it to continually improve its
understanding and responses to new topics and conversations. This makes
it an incredibly useful tool for a wide range of applications, from customer
service and chatbot interactions to language translation and even creative
writing.

In terms of how ChatGPT stores information, the model uses a series of


attention mechanisms to weigh the importance of different parts of the
input sequence. This allows the model to focus on the most relevant parts
of the input when generating a response. Please note, ChatGPT is not
connected to the internet, and it can occasionally produce incorrect
answers. It has limited knowledge of world and events after 2021 and may
also occasionally produce harmful instructions or biased content.
GPT
ChatGPT is a powerful language model that is based on the GPT
(Generative Pre-trained Transformer) architecture. This architecture is
widely used in the field of natural language processing and has been
responsible for many recent breakthroughs in language generation and
understanding.

There are several different versions of the GPT architecture that have been
developed over the years, each with its own unique characteristics and
capabilities. Here are a few examples:

GPT-1: This was the original version of the GPT architecture, which was
introduced by OpenAI in 2018. It was trained on a massive corpus of text
data and was capable of generating coherent and grammatically correct
text, although its output was sometimes repetitive and lacked coherence.

GPT-2: This was a significantly more advanced version of the GPT


architecture, which was introduced by OpenAI in 2019. It was trained on an
even larger corpus of text data and was capable of generating much more
complex and coherent text. However, it was also more prone to generating
biased or offensive content, which led to some controversy around its
release.

GPT-3: This is the one of most recent and advanced version of the GPT
architecture, which was introduced by OpenAI in 2020. It was trained on a
massive corpus of text data and is capable of generating text that is often
indistinguishable from that written by humans. It also includes a wide
range of built-in tasks, such as translation and summarization, making it a
versatile tool for a wide range of NLP applications.

In addition to the GPT models, there are several other related architectures
and models that have been developed in recent years, such as BERT,
XLNet, and T5. These models each have their own unique strengths and
weaknesses, and are often used in combination with each other to achieve
the best possible results.

Overall, the different models used by ChatGPT and other language models
represent a significant step forward in the field of natural language
processing, and have the potential to revolutionize the way we interact
with and understand human language.
ChatGPT models
ChatGPT when generating a response give users a set of models to choose
from. The models are GPT-3.5(default), GPT-3.5(Legacy), GPT-4. When
selecting a model for a specific task, ChatGPT considers three key factors:
reasoning, speed, and consciousness.

In terms of models the default GPT-3.5 is the fastest model. However, the
GPT-4 model has a higher level of reasoning and consciousness.

Reasoning: This refers to the model’s ability to understand and process


complex relationships and patterns in language. A model with strong
reasoning capabilities is able to identify and connect ideas across different
sentences and paragraphs, and can generate text that is contextually
relevant and coherent. This is especially important for tasks such as
natural language understanding and dialogs generation.

Speed: This refers to the model’s processing speed and efficiency, which is
important for applications that require real-time or near-real-time
responses, such as chatbots or voice assistants. A model that is able to
generate responses quickly and accurately can improve the user
experience and make the interaction more seamless and natural.

Consciousness: This refers to the model’s ability to understand and


generate text that is appropriate and sensitive to cultural, social, and
ethical considerations. A model that is conscious of these factors is able to
generate text that is inclusive, respectful, and unbiased, and can avoid
generating content that is offensive or harmful.
Website
ChatGPT can be accessed using this link: https://chat.openai.com/

The link should bring you to a website that looks like the image below:

An image displaying a welcome message from ChatGPT their


logo. With the message to log in or sign up.

You can enter your credential if you already have an OpenAI account
otherwise you will have to sign up.

An image displaying the the ChatGPT website. A user has access


to a drop down with the modelts on the center top.

We wont be generating prompts yet, however we will go over the different


settings we have access to on their website. First, at the center top we can
see two buttons allowing us to choose between two versions of ChatGPT
models to use.

In the previous version there was a drop down with the model we will use
for the response we want to generate.

A dropdown menu displaying 3 models provided by ChatGPT.


The 3 models are Default(GPT-3.5),Legacy(GPT-3.5),GPT-4

At the bottom in the middle of the page, there is space for us users to send a
message. This will be the location where we write our prompt.

On the top left, there should be space that says create a new chat. Under the
new chat, there should be a history of all your previous interactions with
ChatGPT. This is one of the most amazing features of ChatGPT its ability to
remember what user said earlier in the conversation. It also allows user to
provide follow-up corrections.

One of the unique feature of ChatGPT is that it can remember conversation.


You can interact with a previous conversation with the pencil next to the
chat history. You can delete a previous conversation by clicking the
trashcan next to it then confirming. If you want to generate a whole new
conversation you can click on the new chat button. You can further clear all
conversation using the clear conversations located at the bottom left.

### Bottom left Settings

Please note that the bottom left setting can look a little different if you have
ChatGPT subscription.

Plus:

image showing the following text: clear conversation, myplan,


settings , get help and log out.
No ChatGPT Plus:

The main difference, is the second thing under clear conversations. If you
have a subscription you should see my plan and if not you should see
upgrade to Plus.

Under that we can access the settings button. Inside the settings tab, we can
switch our ChatGPT to a dark version mode. Additionally, we can use to
export our data. The delete account, which will be used to delete our
ChatGPT account.

img/settings
After the setting, the is the get help link. Following, that we have the logout
button.

Take some time and look at the help section provided by ChatGPT.
Results
ChatGPT can be used to generate prompts now go to the webpage and try
the following prompts. This will help with practice and interaction with the
product. Also, feel free to generate the responses in different chats.

Explain dynamic programming.

One of the feature we can make use of is the ability to edit our past
prompts. Click the edit button on the prompt you wrote earlier, not the
result.Now change your prompt to the following:

Explain dynamic programming to a 6 year old.

ezgif.com-video-to-gif

Additionally, in the gif, you can see next to the response generated there
are thumps up and down if you want as a user to give some feedback.

Create a new chat and try the following prompts


* Got any good ideas for a birthday card for my mom
* Can you write the instructions in french?
* Can you write python code to generate a heart?
img/message

To help generate better results, there are a few strategies that can be
employed. Firstly, it is important to provide clear and specific prompts or
questions to ChatGPT. This helps the model to understand what
information is being requested and generate more relevant responses.

Another strategy is to fine-tune the model on specific tasks or domains. This


involves training the model on a smaller dataset that is specific to the task
at hand, such as answering customer support questions or generating
poetry. Fine-tuning helps to improve the model’s accuracy and generate
more relevant responses for a particular task.

Finally, it is important to continually update ChatGPT with new data and


feedback.

img/feebdack

This helps the model to learn and adapt to new patterns and trends in
language, and generate even better results over time.
Coding Exercise
Coding Exercise Requirement :
* Use the lowest in cost model
* Print only the string response

You might also like