How ChatGPT Works: A Deep Dive Into Its Innovative Technology

calendar May 26, 2023
author Written by Artur Glukhovskyy

chatgpt landing page

You’ve no doubt read about OpenAIs latest groundbreaking technology and how it’s been whipping the internet into a frenzy.

 

We’re talking about ChatGPT (Generative Pre-trained Transformer) of course.

 

The sentient-like chatbot that will steal your job, write your college papers and reject the notion that Christoper Colombus arrived in America circa 2015 (wait, what?).

 

In this article, we’ll examine some of the science behind this sophisticated AI to let you know how ChatGPT actually works and tackles a big Range of Tasks.

 

Don’t worry, we’ll keep it as human-friendly as possible!

 

TABLE OF CONTENT

1. What does chatGPT stand for? 

2. Large Language Model: what does it mean? 

3. Supervised vs. unsupervisd learning in AI 

4. RHLF model: what is it? 

5. How chatGPT works in practice

6. Conclusion 

7. FAQs

 

What Does ChatGPT Stand For?

To truly comprehend the intricacies of ChatGPT, we must first uncover the meaning behind its name. So, let's dive into the acronym and decode it together.

 

  • The "Chat” component refers to the chatbot itself - the virtual assistant responding to your input sentence.
  • The “Generative” component refers to the AI’s ability to generate natural-sounding human text.
  • The “Pre-trained” component refers to all of the text datasets that have been fed into the model.

    In ChatGPT’s case, this is reportedly around 45TB worth of data, including books and texts, which roughly equates to one million feet of bookshelf space.

    Think about how you might study for a test by reading a few books before sitting an exam, the “training” is kind of like that.
  • The “Transformer” component refers to the machine learning architecture that the model is based on. Transformers use previous data (inputs) to understand the context and then make predictions for the output based on this.

 

When we bring this all together we get ChatGPT.

 

Now, it’s worth noting that all of this fancy technology was implemented in GPT-3, the model that ChatGPT is built on.

 

The evolutionary jump that separates Chat from its predecessors is the inclusion of Reinforcement Learning from Human Feedback (RLHF) combined with Supervised Learning (more on these later).

 

 

ChatGPT is a Large Language Model, What Does That Mean?

 

LLM how it works

 

Large Language Models (LLMs) at their very basic level are fed massive amounts of data, passed through the transformer architecture with the final goal of predicting what word will come next in a sequence of words.

 

The sophistication and accuracy of these predictions are influenced by how much data, and how many parameters (the number of factors it considers before making a decision) the model has.

 

Pretty much the same as how humans think!

 

How many parameters does ChatGPT have we hear you ask… 1.3 billion.

 

The vast amount of data and parameters the model is “trained” with is what makes its computational potency so incredible.

 

It knows a lot and therefore can produce more complex and accurate answers to user prompts.

 

What this means for ChatGPT users is that when they ask the AI to do something, ChatGPT will answer your query with an unprecedented level of detail that reads like natural human language.

 

Whether that’s answering a question, writing code, composing a marketing email headline or a romantic poem.  

 

 

Supervised vs Unsupervised learning in AI

As we established earlier, ChatGPT is an iteration of the original GPT-3 model which is a fine-tuned version of previous models.

 

What made GPT-3 model and similar AI models so successful was how they combined supervised learning process and reinforcement learning with human feedback.

 

When we talk about AI pre-training process, it refers to these two common approaches: supervised and unsupervised learning.

 

Supervised learning refers to the process of training a model using training datasets that map an input to a corresponding output. Humans are involved in this process to label data.

 

Because the data is labelled, the model understands that specific prompts link to specific responses.

 

All of this data forms a neural network architecture which acts like our human brain, but made of artificial neurons.

 

Within the network are all of the digital pathways that an AI travels across to find answers to questions.

 

Let’s use a customer service chatbot as an example of supervised learning in action:

 

When you visit a website, give it a few seconds and a chatbox will pop up in the corner of the screen.

 

These helpful chatbots are used to save the company time and resources while helping customers get answers quickly and resolve a wide range of issues.

 

When you engage in a conversation with the chatbot, you’re witnessing supervised learning in real-time.

 

You ask a question (human input) and the chatbot gives relevant response (output) using the data it's been trained with.

 

For example, you might ask:

- “What are your returns policies?” and the chatbot will respond with something like

- “We operate a 30-day no-hassle returns policy. You can find out more about how to return your purchase using this link.”

 

The chatbot has been taught that ‘X’ question equals ‘X’ answer.

 

Cute Droids talking to each other

 

Now imagine this principle being scaled to millions of inputs and outputs.

 

It would be a colossal undertaking for a human to train an AI on every conceivable input and outcome that may arise from a user prompt.

 

That’s where unsupervised learning comes in and also what makes ChatGPT so special.

 

Unsupervised learning refers to training a model on datasets with no specific output corresponding to the input. No human is involved in data labeling.

 

Instead, the model tries to recognise patterns in the input data to provide a contextualised response that mimics human-like responses.

 

ChatGPT is essentially predicting what the answer should be based on all of the data it has been trained on.

 

Now, the obvious criticism and one that OpenAI, the company behind it openly admit, is that ChatGPT will give sometimes inaccurate, biased or nonsensical responses.

 

To combat this and further refine the model, OpenAI uses reinforcement learning with human feedback.

 

 

Let's explain RHLF models: what are they?

RLHF is basically like having someone give you feedback on your work until you get it right.

 

If we apply this to the pre - training stage of an AI like ChatGPT here’s what happens:

 

  • The human AI trainers provide both sides of the conversation as the user and the AI assistant.
  • They then use model-written suggestions (from the AI) to compose their responses.
  • The resulting dialogue dataset is then combined with the existing datasets to create a new dialogue format.

 

OpenAI then pushed this one step further by implementing a reward system for its Artificial Intelligence.

 

This way it could learn how to weigh its responses and choose the most appropriate answer.

 

 

Untitled design-1

 To create a reward model for reinforcement learning, we needed to collect comparison data, which consisted of two or more model responses ranked by quality.

 

To collect this data, we took conversations that AI trainers had with the chatbot.

 

We randomly selected a model-written message, sampled several alternative completions, and had AI trainers rank them.

 

Using these reward models, we can fine-tune the model using Proximal Policy Optimization. We performed several iterations of this process.”


ChatGPT and how it works

 

What this all boils down to is the fact that ChatGPT is essentially using a sort of computer logic to determine an answer.

 

If the input from a user is false it can flag that and dispute the information being asked of it to create a coherent response:

 

 

ChatGPT can also reject toxic queries that are inappropriate or offensive:

 

 

By combing supervised learning (pumping all of the information in) and RLHF (feedback and reward) ChatGPT is trained to generate human-sounding responses that are both coherent and accurate a lot of the time.

 

How ChatGPT Works in Practice

So now you understand a bit about what powers ChatGPT but how does this translate into a real-world scenario?

 

 

Let’s say you’re shopping for a new car and want to find the most efficient vehicle, you might ask this:

 

 

As you can see, ChatGPT has gathered online information to direct its response but can’t accurately give a definitive answer.

 

Instead, it uses inference to identify patterns in the user query and language to predict a response that sounds strikingly nuanced and human.

 

And it’s in these predictions that the magic happens. Through a combination of natural language processing and machine learning algorithms, ChatGPT is utilising all of its “training” to give the best possible outcome for your query.

 



ChatGPT: Aligning Human Language with Machine Thinking

ChatGPT is a marvellous technological feat. While its applications are still being explored, there is much to be excited about in terms of how AI can assist humans in various tasks.

 

Aside from any malicious intentions, ChatGPT and AI in general have immense value for society, ranging from healthcare assistance to revolutionizing education and enhancing productivity. The possibilities are endless.

 

But that’s thinking ahead. What we have now is a very clever chatbot that takes everything it has learned to produce answers when prompted, and for now, that’s good enough.

 

Want to Learn More About AI for Business?

You’re in the right place! AI is a fascinating field and one that is building tremendous traction across the business landscape.

As technology advances, artificial intelligence applications for business are becoming more plausible in everyday practice.

AI is being used to save time and increase productivity outputs over many different roles and sectors.

It’s no longer a far cry into the future, it’s here, available, and ready to be implemented.

So how can you learn more about using AI in business?

As a leading educational course provider, we created the most effective AI for business course you can find! 

This course will help you and your team boost productivity with AI solutions and make data-driven decisions for the future.

 

6 Modules | 24 lessons | 24 videos | 6 tests | 6 exercises

  • Module 1: AI and Machine Learning Fundamentals
  • Module 2: AI business strategy
  • Module 3: GenAI for text: ChatGPT and prompt engineering
  • Module 4: GenAI for design: text prompts and visual communication
  • Module 5: AI for productivity
  • Module 6: AI-powered predictive insights 

👉 Check out our course here

Growth Tribe AI for business course

 

FAQs

How to hack chat GPT? 

In our opinion, the best way to hack CharGPT is: to know it as much as you can.

 

Knowing how to structure the prompts is the key: prompt engineering it's a real job. 

Learning by doing is the best tip we can give to you. 

 

Here are two LinkedIn creators tha can help you a lot to master ChatGPT: 

 

Isabella Bedoya 

Isabella Bedoya

 

Ruben Hassid

Ruben Hassid LinkedIn

 

 

How many words can chat GPT handle?

Even big language models have limits. ChatGPT can only handle up to 3000 words at a time. That's about 5 pages of text.

 

If you give ChatGPT a prompt that's longer than 3000 words, it will either stop processing the prompt or it will generate a response that's incomplete or inaccurate.

 

There are a few ways to work around the 3000-word limit. One way is to break up your prompt into smaller chunks and feed those chunks into ChatGPT one at a time. Another way is to use the "continue" command to tell ChatGPT to continue generating a response from where it left off.

 

It's important to remember that the 3000-word limit is not the only limitation of ChatGPT. ChatGPT can also be inaccurate or incomplete when processing prompts that are complex or that require a lot of background knowledge.

 

If you are using ChatGPT for a task that requires accuracy or completeness, it's important to be aware of these limitations.

 

How to register for chat GPT? 

  1. Sign Up for an OpenAI Account 
  2. Verify Your Account

  3. Accept ChatGPT Terms & Conditions

  4. Start Chatting!

You can find a more detailed guide over here

 

Learning with Growth Tribe couldn't be easier. All of our courses are designed to be flexible for the learner with self-paced content so you can manage your time and learning, to best suit your lifestyle. 

 

Join a community of over 35,000 certified alumni who share a passion for growing their skills and future-proofing their careers. 

 

ChatGPT-Blog-Banner

Latest articles

AI in Finance: Why You Need It Now

Imagine a world where loans are approved in seconds. Sounds...

ChatGPT Search Unveiled: Should You Make The Switch Now?

Picture this: You’re no longer just “searching” the web—you’re...

Shadow AI Explained: How to Harness Hidden AI Without the Risks

Picture this: your team is under pressure to deliver results—fast....

The 33 best AI tools for commercial teams

The tools are split into 2 categories The best AI tools for your...