ChatGPT — explained!
everything about the new AI hype, its successes, and also its failures.
The “mighty” ChatGPT has changed the landscape of the internet!
In recent weeks, people have been excited about the capabilities of this new AI tool. It is also breaking new records with over 1 million users signed up in just 5 days, even faster than Instagram:
Chat GPTs answers are faster than googling, and it even provides an additional, very detailed explanation! For example, you can ask ChatGPT: “what are the limitations of python?” or “how can I create a successful startup” — the AI tool has you covered!
But wait, what exactly is ChatGPT? how does it work, and what makes it so powerful? — In this post, I tell you everything you need to know!
If you prefer to watch my YouTube video, click here:
Content:
- Open AI
- What is so special about ChatGPT?
- Architecture and Training of ChatGPT
- Successes
- Failures
- End Note
Open AI
ChatGPT is the new language model by Open AI. An organization, that is known for its innovative and cutting-edge research in the field of artificial intelligence. For example the GitHub Copilot:
Open AI built the engine behind it, which is called “codex”. Many developers are already using it day-to-day to get code suggestions for faster programming workflows.
Another example is DALL-E 2:
A neural network model that is able to generate images from text descriptions, using a combination of natural language processing and image generation techniques. This is an example of “an astronaut riding a horse”.
2. What is special about ChatGPT?
Chat GPT is the attempt to solve a problem only through a human text prompt or instruction, which is different from everything we have seen before. The level of detail and the way the explanations are generated is very unique and this is what makes it feel so special and human-like to interact with.
3. ChatGPT Architecture and Training steps
ChatGPT is a variant of the GPT-3.5 language model that was specifically trained for interacting in a conversational way. The training process was divided into several steps:
1. Pre-Training
They used a pre-trained base model called GPT 3.5 (blog) which was fine-tuned later. By the way, this process in general is called transfer learning, which is a method, where the base model is already trained on general data and has a basic language understanding.
The abbreviation GPT stands for Generative Pre-trained Transformer: it is a special architecture of natural language processing models, that can perform a wide range of language tasks, such as translation, summarization, question answering, and language generation.
It is based on the idea of the transformer architecture, which is a machine learning technique that was invented in 2017 in the paper “attention is all you need”, which allows the model to learn to generate natural language text that is highly coherent and realistic through a technique called “self-attention”. This is the ability to capture the context between a word an all the other words in a sentence.
The GPT and its successors GPT-2 and GPT-3 are basically trained to predict the next word/token for a given context. After each token is produced, that token is added to the sequence of inputs. And that new sequence becomes the input to the model in its next step. And so a whole sentence emerges from it. To get more information about the inner workings of the GPT models I recommend this post.
However, the GPT excels at generating very natural-sounding texts that often give the impression that they were written by a human.
GPT 3.5 is the last version of this architecture and is the base for ChatGPT.
2. Fine Tuning
OpenAI used this model as a base model and fine-tuned it using several techniques:
1.“Supervised Fine-Tuning”
According to their blog post, they built up a new dataset out of conversations with human AI trainers in which they played both sides — the user and an AI assistant. This means they used human demonstrations to guide the model toward desired behavior. This dataset was then mixed with the already existing InstructGPT (another GPT model) dataset which was designed to follow instructions and the model was trained on this newly created dataset.
2. Reinforcement Learning with Human Feedback (RLHF).
This technique was already introduced in their InstructGPT paper and this means, that a human ranked the responses of the AI and gave it some feedback to get better. The resulting reward model (RM) was then used for further fine-tuning.
Fine-tuning language models (and every other model too) with humans in the loop is a powerful tool for improving their safety and reliability!
3. Proximal Policy Optimization
Get Sabrina Göllner’s stories in your inbox
Join Medium for free to get updates from this writer.
Finally, the fine-tuned process included also using a state-of-the-art Reinforcement Learning method called Proximal Policy Optimization, which performed several iterations of this process.
Proximal Policy Optimisation (PPO) is a recent advancement in the field of Reinforcement Learning, which provides an improvement on Trust Region Policy Optimization (TRPO). This algorithm was proposed in 2017 and showed remarkable performance when it was implemented by OpenAI. I can recommend this post for a more detailed post on how PPO works.
Long story short: This step was finally needed to “unlock” capabilities that GPT-3 already had but were difficult to extract only through prompt engineering alone.
Successes:
We can clearly say that ChatGPT has many capabilities like the following:
- Very detailed and human-like natural language generation
- Code generation in any language, it can even act as a Linux terminal:
3. It can find the bugs and vulnerabilities in your code and even explains the fix to you:
4. It can write stories, essays, poems or screenplays of all kinds in various forms.
5. It has the ability to admit and fix mistakes, which is the most amazing thing. Example below:
It can “remember” what happened earlier in the conversation (approximately 3000 words) which makes it easier to make corrections, get more details in the next prompt, or even “discuss” things.
In this task, I tested if it still knows which exactly was the second paragraph and if it still knows the exact content to even know the difference to go more into detail.
That was pretty impressive to see that it worked and the details in the essay were also very knowledgeable.
Limitations:
ChatGPT is the best chatbot I’ve ever seen. It is breathtakingly amazing and highly stupid at the same time. And why?
It still suffers from some key fundamental issues like other models do:
- Limited Data → limited knowledge. ChatGPT is not connected to the internet, and it can occasionally produce incorrect answers. It has limited knowledge of the world and events after 2021.
2. It may also occasionally produce biased content, like almost every ML model. Example below:
3. It struggles with very simple reasoning tasks depending on how these are formatted. Example below:
Here I completely confused the AI and it gave me a completely wrong answer.
4. The model struggles to ignore irrelevant information.
As we can see from the example above, the model could not distinguish between important and unimportant information.
5. Too sensitive to question phrasing leading to inconsistent responses.
6. Alignment problem: since the model is trained in a supervised fashion so the answers are aligned to what the model knows not what humans who labeled the data knew.
7. The answers are way too verbose sometimes.
8. It doesn’t have any ground understanding of the data it was trained on. We still need a way to make the ML model really understand the context and meaning of the data to not result in random nonsense.
Conclusion
My conclusion on this new technical hype: It is definitely a big step in the right direction and will certainly be a great support in the future when it is used in applications to make tasks easier.
Like every great breakthrough, it also has its downsides: It’s still a problem that you can’t rely on the information the way you can when you use a search engine, for example. Therefore, it will not replace them even at this stage. It is far too inconsistent for knowledge retrieval on its own.
I’m curious how it will go on and whether we can really soon try an integration of ChatGPT in the search engine Bing.
YouTube Video
I also made a video to go along with this blog post.
References:
🔗 ChatGPT blog post from OpenAI: https://openai.com/blog/chatgpt/
📜 InstructGPT paper (OpenAI): Ouyang, Long, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang et al. “Training language models to follow instructions with human feedback.” https://arxiv.org/abs/2203.02155
🔗 InstructGPT Blog Post: https://openai.com/blog/instruction-following/
🔗 GitHub Copilot: https://github.com/features/copilot/
🔗 DALL-E 2 Blog Post: https://openai.com/dall-e-2/
🔗 The Verge “Microsoft to challenge Google by integrating ChatGPT with Bing search”: https://www.theverge.com/2023/1/4/23538552/microsoft-bing-chatgpt-search-google-competition
🔗 Transformer Self Attention: https://jalammar.github.io/illustrated-transformer/








