ChatGPT – How does it actually work ?

ChatGPT is making waves across the technology world and has the potential to change how we learn, work and live. But, how is it able to give human-like answers, that are so accurate and relevant ? If you are curious, this article explores the tech behind it in simple terms.

* * *

Within a few weeks of its launch, ChatGPT is making waves across industries and academia, upending the way we work and search for information. It’s too early to know whether ChatGPT is a flash in the pan or the dawn of a new era. Regardless, we should be curious to know how this AI-based chatbot is able to spew out answers almost as well as humans do.

I asked ChatGPT when to pay advance tax in India to avoid interest and penalties. You can see the quality of the response

This article tries to explain the technology behind ChatGPT in simple terms so everyone can understand.

ChatGPT belongs to a new wave of generative AI – a set of algorithms that, when you prompt them, can generate new content like text, images or audio from their vast collection of information. They fall under the broad category of machine learning.

The Transformers

ChatGPT is built on an AI based large-language model which uses a machine learning technique called Transformer (and hence the name GPT, Generative Pre-trained Transformer).

Transformer is good at learning words, the relationship between them and the context behind them. Once it understands meanings in sentences or paragraphs, a Transformer can predict and generate new content when prompted – means it can converse like we do on a variety of topics.

But, to do this well the Transformers first need to digest vast amount of information. The larger the data used the better for the model. The transformer in ChatGPT has been trained on 8 million documents and over 10 billion words from the internet using 175 billion different parameters.

As you would guess, Transformers trained unsupervised are not necessarily accurate. They can often garble the answer or throw completely irrelevant ones when prompted.

So what is to be done to make the Transformers more accurate and relevant, more human like ?

Enter the Humans !

The Humans

To make the Transformers understand the context better when asked a question, they need humans to first give them feedback while they are being trained. This is called as Reinforced Learning from Human Feedback (RLHR).

ChatGPT underwent a two-stage training process with human involvement. In the first stage, humans provided appropriate responses to questions to fine-tune the model’s response generation. In the second stage, the model generated multiple responses to sample questions, which were ranked by humans from best to worst. Finally, the model’s response generation policy was further improved through fine-tuning with new sets of questions.

The last two stages are then repeated continuously until the model gets smarter. With this feedback cycle, the model automatically gets better and better as more people start using it.

ChatGPT explained these steps lucidly in a blog post.

source : chatGPT

Brains and Brawns

It is, however, not enough to have a smart model. To devour tons of documents on the internet and to generate a response when you prompt, ChatGPT needs vast amounts of computing power – something most start-ups can’t afford. This is where Microsoft comes in. In a strategic deal, Microsoft provided a supercomputing platform on their Azure cloud in return for using the models in their products

A note of caution

While ChatGPT is great at doing a few things right, it is a mistake to rely solely on the tool. ChatGPT really does not possess any knowledge per se, but only generates the best predicted output based on data it is fed with. Any biases or low-quality inputs in that data or from the humans that train them can make the model go awry.

Try ChatGPT if you have not done already. We are only just scratching the surface of advanced AI methods that will change how we learn, work and live.

You can start with the links below if you are interested to know more on ChatGPT tech. Happy Learning !

  1. OpenAI Blog
  2. How ChatGPT Works: The Model Behind The Bot
  3. Machine Learning Explained
  4. AI Explainers from Nvidia
  5. How ChatGPT actually works
  6. ChatGPT Is a ‘Very Sophisticated Guessing Engine’